
Strumento di valutazione della sicurezza da riga di comando per applicazioni React e Next.js, che analizza i React Server Components per individuare configurazioni errate, con scansione multi-target, rilevamento WAF e supporto proxy.
Framework di valutazione della sicurezza per applicazioni web React e Next.js
Questo strumento è progettato esclusivamente per test di sicurezza autorizzati.
Gli utenti sono gli unici responsabili di garantire la conformità a tutte le leggi applicabili.
React2Shell Scanner è un framework di valutazione della sicurezza da riga di comando progettato per aiutare i professionisti della sicurezza a identificare potenziali vulnerabilità nelle applicazioni web React e Next.js. Si concentra sull'analisi delle implementazioni di React Server Components (RSC) per individuare comuni errori di configurazione della sicurezza.
| Funzionalità | Descrizione |
|---|---|
| 🎯 Scansione Multi-Target | Scansiona singoli URL o elenchi di target |
| 🔄 Test Concorrenti | Multi-thread per una valutazione efficiente |
| 🛡️ Rilevamento WAF | Identifica e analizza le risposte WAF |
| 📊 Monitoraggio Progressi | Barra di avanzamento visiva con tqdm |
| 🔧 Header Configurabili | Iniezione di header personalizzati |
| 🌐 Supporto Proxy | Instradamento tramite proxy HTTP/HTTPS |
| 📝 Formati di Output | Generazione di report JSON e testo |
| 🎨 CLI Colorata | Output terminale chiaro e codificato a colori |
# Clona il repository
git clone https://github.com/wi3memake/React2Shell-Scanner.git
cd react2shell-scanner
# Crea un ambiente virtuale (consigliato)
python -m venv venv
source venv/bin/activate # Linux/Mac
.\venv\Scripts\activate # Windows
# Installa le dipendenze
pip install -r requirements.txt
requests>=2.28.0 # Libreria client HTTP
tqdm>=4.64.0 # Visualizzazione barra di avanzamento
urllib3>=1.26.0 # Gestione URL
# Singolo target
python react2shell.py.py -u https://example.com
# Con output dettagliato
python react2shell.py.py -u https://example.com -v
# Scansione da file
python react2shell.py.py -l targets.txt
# Con thread concorrenti
python react2shell.py.py -l targets.txt -t 10
# Header personalizzati
python react2shell.py.py -u https://example.com -H "Authorization: Bearer token"
# Tramite proxy
python react2shell.py.py -u https://example.com --proxy http://127.0.0.1:8080
# Salta la verifica SSL
python react2shell.py.py -u https://example.com --no-verify
# Output su file
python react2shell.py.py -u https://example.com -o results.json
| Argomento | Abbreviazione | Descrizione | Predefinito |
|---|---|---|---|
--url | -u | URL del singolo target | - |
--list | -l | File con gli URL dei target | - |
--threads | -t | Thread concorrenti | 5 |
--timeout | - | Timeout della richiesta (secondi) | 10 |
--proxy | - | URL del proxy (http/https) | - |
--headers | -H | Header personalizzati | - |
--output | -o | Percorso del file di output | - |
--no-verify | - | Salta la verifica SSL | False |
--verbose | -v | Output dettagliato | False |
--waf-bypass | - | Modalità bypass WAF | False |
--bypass-size | - | Dimensione payload bypass (KB) | 128 |
React2Shell Web Application Security Assessment Framework
[*] Avvio della valutazione di https://example.com
[*] Analisi dei React Server Components...
[*] Test del comportamento dei redirect...
[+] Valutazione completata
Target: https://example.com
Stato: Analizzato
Codice di Risposta: 200
Server: Next.js
Versione React: 18.2.0
RSC Rilevato: Sì
Tempo di Valutazione: 1.23s
{
"target": "https://example.com",
"timestamp": "2025-01-15T10:30:00Z",
"results": {
"status_code": 200,
"server": "Next.js",
"rsc_detected": true,
"headers": {
"content-type": "text/html",
"x-powered-by": "Next.js"
},
"assessment_time": 1.23
}
}
React2Shell-Scanner/
├── react2shell.py.py # Script principale dello scanner
├── requirements.txt # Dipendenze Python
└── README.md # Documentazione
Crea un file di testo con un URL per riga:
https://target1.com
https://target2.com
https://target3.com/api
Passa più header con flag -H ripetuti:
python react2shell.py.py -u https://example.com \
-H "Authorization: Bearer token123" \
-H "X-Custom-Header: value" \
-H "Cookie: session=abc123"
# Proxy HTTP
--proxy http://127.0.0.1:8080
# Proxy HTTPS
--proxy https://proxy.example.com:8443
# Proxy Autenticato
--proxy http://user:[email protected]:8080
# Esempio GitHub Actions
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run security scan
run: python react2shell.py.py -u ${{ secrets.TARGET_URL }} -o results.json
import subprocess
import json
# Esegui lo scanner
result = subprocess.run(
['python', 'react2shell.py.py', '-u', 'https://example.com', '-o', 'results.json'],
capture_output=True,
text=True
)
# Analizza i risultati
with open('results.json') as f:
findings = json.load(f)
Timeout di Connessione
# Aumenta il timeout
python react2shell.py.py -u https://example.com --timeout 30
Errori del Certificato SSL
# Salta la verifica (solo per test)
python react2shell.py.py -u https://example.com --no-verify
Limitazione della Frequenza
# Riduci i thread
python react2shell.py.py -l targets.txt -t 2
Accogliamo con favore contributi che migliorano:
Invia problemi e pull request su GitHub.
Questo progetto è concesso in licenza sotto la MIT License.
Test di Sicurezza Resi Efficienti
🔒 Testa Sempre in Modo Responsabile 🔒