作者: Derek Odiorne
GitHub: @dodiorne
版本: 1.2
最后更新: 2025年5月21日
MITRE ATT&CK 技术: T1190 – 利用面向公众的应用程序
该工具是一个黑盒漏洞扫描器,用于检测 CVE-2022-31813,这是 Apache HTTP Server ≤ 2.4.53 中使用 mod_proxy 和 ProxyPassMatch 时存在的路径遍历和访问控制绕过漏洞。
它专为渗透测试人员和红队操作人员设计,提供一种非侵入性且可观察的方法来检测此漏洞,而无需访问服务器配置。
pip install requests selenium pandas --break-system-packages 🛠️ 确保 ChromeDriver 已安装并位于您的 PATH 中。
⚙️ 使用方法 扫描单个主机(默认 80 端口)
python3 cve_2022_31813_checker.py -t example.com 扫描指定端口上的主机
python3 cve_2022_31813_checker.py -t example.com --port 8080 扫描多个主机 创建一个 targets.txt 文件:
example.com 192.168.1.10 web.server.org 然后运行:
python3 cve_2022_31813_checker.py -f targets.txt --port 8000 📁 输出 执行后,您将获得一个类似这样的目录:
cve_31813_output_20250521_153000/ ├── results.csv
└── screenshots/
├── example_com_80__app_.._admin.png
├── ...
🚀 示例用法 该脚本支持通过 HTTP 或 HTTPS 扫描单个或多个主机,并自动检测 HTTPS 重定向以进行回退。
🔹 扫描单个目标(默认:HTTP 80 端口) python3 cve_2022_31813_checker.py -t example.com
🔹 通过 HTTPS(443 端口)扫描单个目标 python3 cve_2022_31813_checker.py -t example.com --scheme https --port 443
🔹 在自定义端口(例如 8080)上扫描单个目标 python3 cve_2022_31813_checker.py -t example.com --port 8080
🔹 从文件扫描多个目标 创建一个类似这样的 targets.txt 文件: example.com 192.168.1.100 secure.company.org
python3 cve_2022_31813_checker.py -f targets.txt python3 cve_2022_31813_checker.py -f targets.txt --scheme https --port 443