此工具是 CVE-2023-44487(又称 HTTP/2 快速重置攻击)的概念验证(PoC)程序。该漏洞允许攻击者通过 HTTP/2 连接快速发送 RST_STREAM 帧来执行拒绝服务(DoS)攻击,从而使目标服务器不堪重负。
使用以下命令安装所需的 Python 库:
pip install -r requirements.txt
或者,您也可以单独安装它们:
pip install httpx==0.24.0
pip install h2==4.1.0
pip install tqdm==4.66.1
pip install xlsxwriter==3.1.6
克隆仓库
git clone https://github.com/yourusername/CVE-2023-44487-HTTP-2-Rapid-Reset-Exploit-PoC.git
cd CVE-2023-44487-HTTP-2-Rapid-Reset-Exploit-PoC
设置虚拟环境(可选但推荐)
python3 -m venv venv
source venv/bin/activate
安装依赖
pip install -r requirements.txt
--url:要测试的 URL(例如 https://example.com 或 http://example.com)--bulk:包含要测试的 URL 列表的文件--port:指定端口(HTTPS 默认为 443,HTTP 默认为 80)--output:保存结果的输出文件(.csv、.txt 或 .xlsx)测试单个 URL
python3 main.py --url https://example.com
从文件测试多个 URL
python3 main.py --bulk urls.txt
指定自定义端口
python3 main.py --url http://example.com --port 8080
将结果保存到文件
python3 main.py --bulk urls.txt --output results.xlsx
[
{
"Timestamp": "2024-12-03 10:00:00",
"URL": "https://example.com",
"HTTP/2 Support": "Yes",
"Vulnerable": "VULNERABLE",
"Details": "RST_STREAM sent successfully"
},
{
"Timestamp": "2024-12-03 10:00:05",
"URL": "http://testsite.com",
"HTTP/2 Support": "No",
"Vulnerable": "SAFE",
"Details": "Downgraded to HTTP/1.1"
}
]
RST_STREAM 帧的响应方式提示其可能易受 CVE-2023-44487 攻击。建议进行进一步的手动验证。httpx==0.24.0
h2==4.1.0
tqdm==4.66.1
xlsxwriter==3.1.6
假设您有一个名为 urls.txt 的文件,其中包含:
https://example.com
http://testsite.com
https://vulnerable-site.com
命令:
python3 main.py --bulk urls.txt --output results.csv
示例 results.csv:
Timestamp,URL,HTTP/2 Support,Vulnerable,Details
2024-12-03 10:15:00,https://example.com,Yes,VULNERABLE,RST_STREAM sent successfully
2024-12-03 10:15:05,http://testsite.com,No,SAFE,Downgraded to HTTP/1.1
2024-12-03 10:15:10,https://vulnerable-site.com,Yes,VULNERABLE,RST_STREAM sent successfully
注意: 请将 https://vulnerable-site.com 替换为您有权测试的实际网站。
如果您需要进一步的帮助或修改,请随时告知!
| 时间戳 | URL | HTTP/2 支持 | 漏洞状态 | 详细信息 |
|---|
| 2024-12-03 10:00:00 | https://example.com | 是 | 易受攻击 | RST_STREAM 发送成功 |
| 2024-12-03 10:00:05 | http://testsite.com | 否 | 安全 | 已降级到 HTTP/1.1 |