此脚本用于演示 Grafana 目录遍历漏洞(CVE-2021-43798),影响 Grafana 版本 8.0.0-beta1 至 8.3.0。 主要用于 CTF 中的演示。使用 Python 编写,仅依赖标准库模块。请仅用于合法目的,例如测试和 CTF。
wget https://raw.githubusercontent.com/Jroo1053/GrafanaDirInclusion/master/exploit.py
usage: exploit.py [-h] -u TARGET_URL -p TARGET_PORT [-o OUTPUT_FILE] -f TARGET_FILE
Grafana CVE-2021-43798 (File Read Exploit)
optional arguments:
-h, --help show this help message and exit
-u TARGET_URL Target URL
-p TARGET_PORT Target Port
-o OUTPUT_FILE Output File
-f TARGET_FILE Remote File To Read