joaoreis13/flight-risk
GitHub: joaoreis13/flight-risk
针对 CVE-2025-55182 React2Shell 远程代码执行高危漏洞的综合安全工具包,提供从依赖扫描、漏洞验证到云环境日志溯源的完整处置方案。
Stars: 0 | Forks: 0
# flight-risk
**CVE-2025-55182 (React2Shell)** 的安全工具包 —— 这是一个存在于 React Server Components 中,CVSS 评分 10.0 的预认证远程代码执行 (RCE) 漏洞。支持扫描、检测、关联和测试。
## 包含内容
| 工具 | 功能说明 |
|---|---|
| **[react2shell-scanner](react2shell-scanner/README.md)** | 扫描 GitHub 组织和 GCP 项目中存在漏洞的 React/Next.js 依赖。支持授权漏洞测试(安全探测、文件读取、目录列表、命令执行)。 |
| **[gcp-ioc-scanner](gcp-ioc-scanner/README.md)** | 查询 GCP Cloud Logging,跨多个项目和 Kubernetes 服务匹配失陷指标 (IOC) 模式。支持可插拔的 IOC 定义。 |
| **[gcp-log-correlator](gcp-log-correlator/README.md)** | 基于时间接近度关联同一 Pod 上的 GCP 日志事件 —— 例如,找出是哪个 HTTP 请求触发了 RCE 错误。 |
## 快速开始
```
# 克隆
git clone https://github.com/YOUR_USER/flight-risk.git
cd flight-risk
# 安装依赖
pip install -r react2shell-scanner/requirements.txt
pip install pyyaml # for gcp-ioc-scanner
# 使脚本可执行
chmod +x react2shell-scanner/bin/*
chmod +x gcp-ioc-scanner/gcp-ioc-scanner
chmod +x gcp-log-correlator/gcp-log-correlator
# Authenticate
gh auth login # GitHub scanning
gcloud auth application-default login # GCP scanning + log analysis
```
## 使用方法
所有命令均在代码库根目录下运行。
### 扫描 GitHub 组织中存在漏洞的依赖
```
react2shell-scanner/bin/scan-github \
--org YOUR_GITHUB_ORG \
--output ./results/github
```
### 扫描 GCP 项目中存在漏洞的容器镜像
```
react2shell-scanner/bin/scan-gcp \
--project YOUR_GCP_PROJECT \
--output ./results/gcp
```
### 综合扫描 (GitHub + GCP)
```
react2shell-scanner/bin/scan-all \
--org YOUR_GITHUB_ORG \
--project YOUR_GCP_PROJECT \
--output ./results
```
### 安全漏洞检测(无代码执行)
```
python3 react2shell-scanner/cli.py https://your-app.example.com
```
### 授权漏洞测试
```
# Dry run — 显示 payload 但不发送
python3 react2shell-scanner/cli.py --dry-run --verbose https://your-app.example.com
# 通过 RCE 读取文件
python3 react2shell-scanner/cli.py --method read-file https://your-app.example.com /etc/hostname
# 通过 RCE 列出目录
python3 react2shell-scanner/cli.py --method list-dir https://your-app.example.com /app
# 通过 RCE 执行命令
python3 react2shell-scanner/cli.py --method exec-cmd https://your-app.example.com "id"
# 批量目标
python3 react2shell-scanner/cli.py --targets targets.txt --output results.json
```
### 扫描 GCP 日志以查找 IOC 模式
```
gcp-ioc-scanner/gcp-ioc-scanner \
--targets gcp-ioc-scanner/examples/targets-example.yaml \
--iocs gcp-ioc-scanner/iocs/cve-2025-55182.yaml \
--start 2026-01-01 \
--end 2026-04-01 \
--output ./results/ioc-scan
```
### 关联日志事件(查找导致 RCE 的请求)
```
gcp-log-correlator/gcp-log-correlator \
--project YOUR_GCP_PROJECT \
--namespace frontend \
--pod-pattern "web-app.*" \
--trigger-filter 'severity=ERROR' \
--preceding-filter 'httpRequest.requestMethod:*' \
--window 30s \
--start 2026-04-01T00:00:00Z \
--end 2026-04-02T00:00:00Z \
--format json,markdown \
--output ./results/correlation
```
## Docker
```
cd react2shell-scanner
docker compose -f docker/docker-compose.yml build
docker compose -f docker/docker-compose.yml run scanner-shell
```
## 目录结构
```
flight-risk/
├── README.md
├── LICENSE
├── react2shell-scanner/
│ ├── bin/ # scan-github, scan-gcp, scan-all
│ ├── cli.py # Exploit testing CLI
│ ├── exploit.py # Exploitation logic
│ ├── utils.py # Shared utilities
│ ├── lib/ # Shell + Python helpers
│ ├── vuln-defs/ # Pluggable vulnerability definitions
│ ├── docker/ # Containerized scanning
│ ├── examples/ # Example scripts
│ ├── test-app/ # Vulnerable Next.js fixture
│ └── requirements.txt
├── gcp-ioc-scanner/
│ ├── gcp-ioc-scanner # IOC log scanner
│ ├── iocs/ # IOC pattern definitions
│ └── examples/ # Target config examples
└── gcp-log-correlator/
├── gcp-log-correlator # Event correlator
└── examples/ # Correlation examples
```
## 环境要求
- Python 3.10+
- GitHub CLI (`gh`)
- Google Cloud SDK (`gcloud`)
- `jq`
- Docker 20.10+ (可选)
## CVE-2025-55182
| | |
|---|---|
| **CVSS** | 10.0 严重 |
| **攻击向量** | 网络 / 预认证 / 无需用户交互 |
| **React** | 19.0.0 - 19.2.0(已在 19.3.0 版本修复) |
| **Next.js** | 14.3.0 - 15.3.5, 16.0.0 - 16.0.7(已在 15.3.6, 16.0.8 版本修复) |
| **根本原因** | React Flight 协议中的不安全反序列化 |
| **影响** | 以应用程序进程用户身份实现完全 RCE |
## 法律声明
**仅供授权使用。** 本工具包含漏洞利用代码。请仅针对您拥有或已获得明确书面授权测试的系统使用。未经授权的使用可能违反《计算机欺诈和滥用法》(18 U.S.C. 1030) 及相关法律。
## 许可证
MIT -- 详见 [LICENSE](LICENSE)。
标签:0day漏洞, CISA项目, Cutter, CVE-2025-55182, CVSS 10.0, GCP Cloud Logging, GCP安全, GitHub安全, IOC扫描, K8s安全, Python, RCE, React2Shell, React Server Components, Web截图, XXE攻击, 失陷标示, 子域名变形, 安全工具包, 容器安全, 无后门, 日志关联分析, 漏洞利用测试, 编程工具, 网络安全, 请求拦截, 远程代码执行, 逆向工具, 隐私保护