
CVE-2020-1938 (Ghostcat) Tomcat AJP Datei-Lesen/Datei-Einbinden PoC mit Python-3-Port
CVE-2020-1938 (CNVD-2020-10487) Tomcat AJP-Protokoll Datei-Lesen / Datei-Einbindung Exploit-POC in python3-konvertierter Version.
Original (python2) Autor: ydhcui — https://github.com/YDHCUI/CNVD-2020-10487-Tomcat-Ajp-lfi
python3 "Tomcat-ROOT-Pfad-Datei-Einbindung(CVE-2020-1938)-python3.py" -p 8009 -f /test.txt 127.0.0.1
| Parameter | Beschreibung | Standardwert |
|---|
target | Zielhost / IP | Pflichtfeld |
-p, --port | AJP-Port | 8009 |
-f, --file | Zu lesender Dateipfad | WEB-INF/web.xml |
import io, StringIO → io.BytesIO (AJP-Daten sind binäre Byteströme).encode('base64') → base64.b64encode(...).decode('utf-8')res geändert zu b"" Byte-Verkettungb"".join(...) danach UTF-8-DekodierungReproduktionsdetails: http://www.svenbeast.com/post/fqSI9laE8/