
CVE-2020-1938 (Ghostcat) Tomcat AJP file read/file include PoC with python3 port
CVE-2020-1938 (CNVD-2020-10487) Tomcat AJP protocol file read / file include vulnerability exploit POC python3 port.
Original (python2) author: 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
| Parameter | Description | Default |
|---|---|---|
target | Target host / IP | Required |
-p, --port | AJP port | 8009 |
-f, --file | File path to read | WEB-INF/web.xml |
import io, StringIO → io.BytesIO (AJP data is a binary byte stream).encode('base64') → base64.b64encode(...).decode('utf-8')res changed to b"" byte concatenationb"".join(...) then decoded as UTF-8Reproduction details: http://www.svenbeast.com/post/fqSI9laE8/