此 PowerShell 脚本仅供授权渗透测试使用。它用于测试 Fortinet FortiWeb 设备是否存在 CVE-2025-25257——/api/fabric/device/status 端点中的未经身份验证的 SQL 注入漏洞。
该脚本:
重要免责声明:
此工具仅用于道德、授权的渗透测试或漏洞评估场景。未经授权的使用可能违反《计算机欺诈和滥用法》(CFAA)或您所在司法管辖区的等效法规。在运行此脚本之前,请确保已获得目标所有者的明确许可。作者对滥用行为不承担任何责任。
Invoke-WebRequest。git clone https://github.com/mr-r3b00t/CVE-2025-25257.git
cd CVE-2025-25257
脚本位于 script.ps1。
从 PowerShell 运行脚本,使用以下选项之一:
指定单个 IP 或 DNS 名称,可选择带端口(例如 192.168.1.1:443)。
.\script.ps1 -Target "192.168.1.1:443"
或者不带端口(扫描默认端口):
.\script.ps1 -Target "example.com"
提供一个文本文件,每行一个目标(例如 targets.txt)。
.\script.ps1 -InputFile "targets.txt"
示例 targets.txt 内容:
192.168.1.1:443
example.com
10.0.0.1
脚本将输出每个目标和端口的结果,包括:
示例输出:
Testing https://192.168.1.1:443/api/fabric/device/status for CVE-2025-25257
Endpoint accessible (HEAD 200 OK). Proceeding with GET request for vulnerability test.
GET Response Status: 200
Potential vulnerability detected (200 OK with payload). Check content for confirmation.
GET Response Content: {"devices": [...]}
Authorization 头中使用 SQL 注入测试(Bearer AAAAAA'or'1'='1)。欢迎贡献!请 fork 仓库并提交 pull request,包含改进、错误修复或附加功能。
本项目采用 MIT 许可证 - 详见 LICENSE 文件。
如有问题或疑问,请提交 GitHub issue。