
CVE-2020-1938 (Ghostcat) Tomcat AJP lecture de fichier/inclusion de fichier PoC avec port python3
CVE-2020-1938 (CNVD-2020-10487) Exploitation POC de lecture de fichier / inclusion de fichier via le protocole AJP de Tomcat — version convertie en python3.
Auteur de la version originale (python2) : ydhcui — https://github.com/YDHCUI/CNVD-2020-10487-Tomcat-Ajp-lfi
python3 "Tomcat-ROOT路径下文件包含(CVE-2020-1938)-python3.py" -p 8009 -f /test.txt 127.0.0.1
| Paramètre | Description | Valeur par défaut |
|---|
target | Hôte / IP cible | Obligatoire |
-p, --port | Port AJP | 8009 |
-f, --file | Chemin du fichier à lire | WEB-INF/web.xml |
import io, StringIO → io.BytesIO (les données AJP sont un flux d'octets binaires).encode('base64') → base64.b64encode(...).decode('utf-8')res est remplacée par une concaténation d'octets b""b"".join(...)Détails de reproduction : http://www.svenbeast.com/post/fqSI9laE8/