
CVE-2020-1938 (Ghostcat) Tomcat AJP file read/file include PoC with python3 port
CVE-2020-1938 (CNVD-2020-10487) Tomcat AJP 协议文件读取 / 文件包含漏洞利用 POC 的 python3 转换版。
原版(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
| 参数 | 说明 | 默认值 |
|---|---|---|
target | 目标主机 / IP | 必填 |
-p, --port | AJP 端口 | 8009 |
-f, --file | 读取的文件路径 | WEB-INF/web.xml |
import io,StringIO → io.BytesIO(AJP 数据是二进制字节流).encode('base64') → base64.b64encode(...).decode('utf-8')res 改为 b"" 字节拼接b"".join(...) 后按 UTF-8 解码