
Uno strumento di test Python completo per CVE-2023-44487, la vulnerabilità Rapid Reset di HTTP/2. Questa versione avanzata offre un controllo granulare sui parametri di test, molteplici modelli di attacco e avanzate capacità di monitoraggio.
Uno strumento di test Python completo per CVE-2023-44487, la vulnerabilità HTTP/2 Rapid Reset. Questo repository contiene sia strumenti di test dell'attacco che strumenti incentrati sulla verifica.
Questo strumento è destinato SOLO a scopi educativi e test autorizzati!
CVE-2023-44487, nota anche come "HTTP/2 Rapid Reset," è una vulnerabilità critica nel protocollo HTTP/2 che consente agli attaccanti di:
Punteggio CVSS: 7.5 (Alto)
Impatto: Denial of Service, Esaurimento delle Risorse
h2: pip install h2git clone https://github.com/madhusudhan-in/CVE_2023_44487-Rapid_Reset.git
cd CVE_2023_44487-Rapid_Reset
pip install h2
chmod +x *.py
python3 --version # Should be 3.7+
cve_2023_44487_verifier_enhanced.pyScopo: Rilevamento dei segnali di enforcement per la verifica post-patch e controlli di conformità
# Basic verification
python3 cve_2023_44487_verifier_enhanced.py target.com
# Multiple concurrent connections
python3 cve_2023_44487_verifier_enhanced.py target.com -c 5 -s 500
# Verbose output with debugging
python3 cve_2023_44487_verifier_enhanced.py target.com -v -c 3 -s 1000
# Baseline test only (normal requests)
python3 cve_2023_44487_verifier_enhanced.py target.com --baseline-only
Lo script fornisce un verdetto intelligente basato sui segnali di enforcement conformi a RFC 9113:
Server sends GOAWAY with ENHANCE_YOUR_CALM (0xb) error code
Classification: NOT VULNERABLE — protocol-layer enforcement is active
Meaning: HTTP/2 implementation has proper rate-limiting controls
50%+ of connections terminated via TCP reset
Classification: LIKELY PROTECTED — verify with edge/infrastructure team
Meaning: Edge appliance or DDoS protection engaged at transport layer
Per-second reset rate drops significantly over time (late buckets <60% of early)
Classification: PARTIAL PROTECTION — confirm with infrastructure team
Meaning: Server or edge slowing the attack adaptively
Server sends REFUSED_STREAM (0x7) responses
Classification: PARTIAL PROTECTION — review rate limits
Meaning: Some stream-level rate-limiting in place
No ENHANCE_YOUR_CALM GOAWAY, no TCP resets, no throttling detected
Classification: VECTOR EXERCISABLE — exploitability unconfirmed
Important: This doesn't prove DoS exploitability. Edge volumetric/behavioral
protections (Akamai, CloudFlare) may engage at higher scales
============================================================
ENFORCEMENT SIGNAL ANALYSIS
============================================================
Server SETTINGS (initial frame):
HEADER_TABLE_SIZE = 4096
ENABLE_PUSH = True
MAX_CONCURRENT_STREAMS = 128
INITIAL_WINDOW_SIZE = 65535
MAX_FRAME_SIZE = 16384
→ MAX_CONCURRENT_STREAMS=128 is conservative (good post-CVE default)
GOAWAY breakdown across connections:
ENHANCE_YOUR_CALM (0xb): 3/5
Other GOAWAY codes: 1/5
No GOAWAY received: 1/5
TCP reset (RST at transport): 0/5
Total RST_STREAM frames from server: 2
REFUSED_STREAM frames from server: 0
Connections showing adaptive throttling: 1/5
============================================================
VERDICT
============================================================
✅ ENFORCEMENT CONFIRMED
3/5 connection(s) received GOAWAY with ENHANCE_YOUR_CALM (0xb).
This is the canonical signal that the CVE-2023-44487 mitigation is active.
Classification: NOT VULNERABLE — protocol-layer enforcement is engaged.
# Verify patch deployment with 10 connections, 500 streams each
python3 cve_2023_44487_verifier_enhanced.py prod-api.example.com \
-c 10 \
-s 500 \
-d 0.0001 \
-v
# Test non-standard HTTPS port
python3 cve_2023_44487_verifier_enhanced.py example.com \
-p 8443 \
-c 5 \
-s 1000
# Minimal load compliance test
python3 cve_2023_44487_verifier_enhanced.py example.com \
-c 3 \
-s 200 \
--baseline-only
ENHANCE_YOUR_CALM (Codice di errore 0xb):
REFUSED_STREAM (Codice di errore 0x7):
Analisi della velocità di reset al secondo:
TCP RST a livello di trasporto:
import asyncio
import subprocess
def run_verification(target: str, num_connections: int = 3):
cmd = [
'python3', 'cve_2023_44487_verifier_enhanced.py',
target,
'-c', str(num_connections),
'-s', '500',
'-v'
]
result = subprocess.run(cmd, capture_output=True, text=True)
# Parse verdict from output
if "ENFORCEMENT CONFIRMED" in result.stdout:
print(f"✅ {target} is protected")
return "protected"
elif "LIKELY PROTECTED" in result.stdout:
print(f"⚠️ {target} has edge-level protection")
return "edge_protected"
else:
print(f"❌ {target} shows no enforcement")
return "vulnerable"
# Run test
status = run_verification("example.com", 5)
#!/bin/bash
# Monitor critical services weekly
TARGETS="api.example.com web.example.com cdn.example.com"
LOG_DIR="/var/log/cve-2023-44487"
mkdir -p "$LOG_DIR"
for target in $TARGETS; do
python3 cve_2023_44487_verifier_enhanced.py "$target" \
-c 3 \
-s 500 \
-v > "$LOG_DIR/$target-$(date +%Y%m%d).log" 2>&1
done
rapid_reset_test.pyScopo: Test completo dell'attacco HTTP/2 Rapid Reset con molteplici pattern
python3 rapid_reset_test.py https://target-server.com
python3 rapid_reset_test.py https://target.com \
--connections 50 \
--requests 1000 \
--delay 0 \
--pattern rapid_reset \
--track-latency \
--output json
python3 rapid_reset_test.py https://target.com \
--pattern burst_reset \
--burst-size 5 \
--burst-delay 2.0 \
--custom-headers "User-Agent: Mozilla/5.0" \
--jitter 0.3
python3 rapid_reset_test.py https://target.com \
--window-size 32768 \
--frame-size 32768 \
--header-table-size 8192 \
--enable-push \
--priority-frames \
--randomize-streams
| Opzione | Descrizione | Default |
|---|---|---|
--pattern TYPE | Pattern di attacco da utilizzare |
Pattern disponibili:
rapid_reset - Attacco rapid reset standardburst_reset - Attacchi a raffichegradual_reset - Velocità crescente gradualmenterandom_reset - Temporizzazione casualecontinuation_flood - Flooding con frame CONTINUATIONmixed_pattern - Combinazione di patternFormati di output disponibili:
console - Output console leggibilejson - JSON leggibile dalla macchinacsv - CSV compatibile con fogli di calcoloxml - Formato XML strutturatoLo strumento valuta automaticamente la vulnerabilità:
"No module named 'h2'"
pip install h2
Connessione rifiutata / timeout
curl -I --http2 https://target.comImportError con i moduli h2
pip install --upgrade h2
python3 --version # Must be 3.7+
Permesso negato
chmod +x *.py
python3 cve_2023_44487_verifier_enhanced.py target.com
Abilita la registrazione verbose:
python3 cve_2023_44487_verifier_enhanced.py target.com -v
Testa con parametri minimi:
python3 cve_2023_44487_verifier_enhanced.py target.com -s 10 -c 1
Verifica il supporto HTTP/2:
python3 -c "import h2; print('h2 library OK')"
Questo repository è destinato a professionisti della cybersecurity, ricercatori e amministratori di sistema per testare i propri sistemi o sistemi per i quali dispongono di esplicita autorizzazione.
Punti Legali Chiave:
Ricorda: Da un grande potere deriva una grande responsabilità. Utilizza questi strumenti in modo etico e legale.
Questo strumento è fornito sotto licenza MIT. Consultare il file LICENSE per i dettagli.
| Opzione | Descrizione | Default |
|---|
host | Hostname di destinazione (obbligatorio) | - |
-p, --port | Porta di destinazione | 443 |
--no-ssl | Disabilita SSL/TLS | False (SSL abilitato) |
-s, --streams | Numero di stream per connessione | 1000 |
-d, --delay | Ritardo tra le operazioni sugli stream (secondi) | 0.001 |
-c, --connections | Numero di connessioni concorrenti | 1 |
--baseline-only | Esegue solo il test di baseline (nessun attacco) | False |
-v, --verbose | Output verbose/debug | False |
| Causa di chiusura | Significato |
|---|
goaway_enhance_your_calm | GOAWAY 0xb ricevuto (miglior indicatore della correzione CVE) |
goaway_* | GOAWAY con altro codice di errore |
tcp_reset | RST TCP ricevuto (intervento a livello di perimetro) |
broken_pipe / recv_error | Errore di connessione durante la comunicazione |
eof_no_goaway | EOF inatteso senza GOAWAY |
no_close_no_enforcement | Connessione rimasta aperta (nessun enforcement rilevato) |
| Opzione | Descrizione | Default |
|---|
-c, --connections N | Numero di connessioni concorrenti | 1 |
--connection-timeout SEC | Timeout di connessione in secondi | 10 |
--read-timeout SEC | Timeout di lettura per le risposte | 5 |
--connection-delay SEC | Ritardo tra le connessioni | 0.0 |
| Opzione | Descrizione | Default |
|---|
-r, --requests N | Richieste per connessione | 100 |
--delay SEC | Ritardo tra HEADERS e RST_STREAM | 0.001 |
--request-delay SEC | Ritardo tra le richieste | 0.0 |
--jitter FACTOR | Fattore di randomizzazione della temporizzazione | 0.0 |
| rapid_reset |
--burst-size N | Richieste per raffica | 10 |
--burst-delay SEC | Ritardo tra le raffiche | 0.1 |
| Opzione | Descrizione | Default |
|---|
--window-size BYTES | Dimensione della finestra iniziale HTTP/2 | 65535 |
--frame-size BYTES | Dimensione massima dei frame | 16384 |
--header-table-size BYTES | Dimensione della tabella header HPACK | 4096 |
--enable-push | Abilita il server push HTTP/2 | False |
--rst-error-code CODE | Codice di errore RST_STREAM | 8 |
| Opzione | Descrizione | Default |
|---|
--output FORMAT | Formato di output | console |
--output-file FILE | Nome del file di output | generato automaticamente |
--verbose, -v | Output verbose | False |
--debug | Registrazione di debug | False |
--log-file FILE | Registra su file | None |
| Caso d'uso | Strumento | Motivo |
|---|
| Verifica post-patch | cve_2023_44487_verifier_enhanced.py | Rileva i segnali di enforcement |
| Controllo di conformità | cve_2023_44487_verifier_enhanced.py | Convalida la mitigazione CVE |
| Valutazione dell'infrastruttura | cve_2023_44487_verifier_enhanced.py | Verdetti chiari e attuabili |
| Ricerca sugli attacchi | rapid_reset_test.py | Molteplici pattern di attacco |
| Test di prestazioni | rapid_reset_test.py | Metriche complete |
| Pattern personalizzati | rapid_reset_test.py | Configurazione granulare |