
Cantina 是一个符合 OSCP 规范的网络侦察编排器。提供端口发现、服务枚举和插件分发。不进行漏洞利用。不自动运行凭据喷洒。
quick / full / udp / vuln / recon / all / deep)_commands.log 审计日志,以及可选的 HTML/JSONnmap,以及插件所调用的服务工具(若存在)# list plugins (no scan)
python tools/cantina.py --list-plugins
# single host
python tools/cantina.py 10.10.10.5 -t quick
# recon with full scan + plugins
python tools/cantina.py 10.10.10.5 -t recon \
--force-services tcp/80/http tcp/445/smb tcp/22/ssh \
-o ./out -j
# multi-target concurrent
python tools/cantina.py -T hosts.txt -t all --max-workers 3 --timeout 90
静默模式 CLI(不显示横幅):python tools/cantina.py TARGET -q
将模块放入 plugins/ 目录下(或使用 --plugins-dir):
PLUGIN = {
"name": "my_enum",
"services": ["ftp"],
"ports": [21],
"enabled": True,
"replaces_builtin": True,
"description": "FTP enum (enum only)",
"legal": "enumeration-only; OSCP-safe; no exploit/spray auto-run",
}
def match(signals):
return signals.get("svc_type") == "ftp" or int(signals.get("port") or 0) == 21
def run(ctx):
art = ctx.port_dir / "plugin_my_enum.txt"
art.write_text(f"enum note for {ctx.target}:{ctx.port}\n")
return {"ok": True, "artifact": str(art)}
replaces_builtin: True 会跳过该服务对应的旧 monorepo 分支,从而避免重复运行。
pip install pytest
python -m pytest tests/ -q
仅进行枚举。仅限已授权目标以及自有实验室 / OSCP 考试范围。您需自行负责测试范围。
tools/ CLI tools (run with: python tools/<tool>.py)
cantina.py CLI + orchestrator
cantina_plugins.py discover / select / run
plugins/ service enum plugins
assets/banner.txt CLI terminal banner
banner.jpg README hero image
tests/ unit tests (stubbed tools)
lab/ optional multi-service lab ground truth
fixtures/ nmap parse fixtures