Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
An autonomous agent that acts as a DEF CON-level Certified Ethical Hacker, using tools such as Nuclei, sqlmap, ffuf, Burp, ZAP, and the Social Engineering Toolkit (SET), (labs, CTFs, HackTheBox, TryHackMe, and bug bounties with a written scope).
Fetched from the repository for this visit.
ARCHIVED — 2026-04-03 This project has been discontinued. It successfully demonstrated that AI can automate complex offensive security tasks autonomously. The approach has since been superseded by AI agents with dedicated skills, which achieve better results with less custom infrastructure. The code is preserved here as a proof-of-concept.
An autonomous AI red team agent that thinks, adapts, and hacks like a real attacker.

Phantom is an open-source autonomous offensive security agent. Point it at an authorized target, and it reasons through the entire attack chain on its own — no predefined phases, no hand-holding, no fixed script. It forms its own attack hypotheses, pursues multiple vectors simultaneously, writes custom tools when it needs them, and delivers a full debrief when it's done.
This project exists to prove one thing: AI can do offensive security autonomously.
Legal notice: Use only on systems you own or have written authorization to test. Nothing in this repository grants permission to target third-party systems.
Most security tools run a checklist. Phantom doesn't. It:
Linux / macOS:
curl -fsSL https://raw.githubusercontent.com/kmdn-ch/phantom-ethical-redteam/main/get.sh | bash
Windows (PowerShell):
irm https://raw.githubusercontent.com/kmdn-ch/phantom-ethical-redteam/main/get.ps1 | iex
git clone https://github.com/kmdn-ch/phantom-ethical-redteam.git ~/phantom
cd ~/phantom
chmod +x install.sh
./install.sh
source .venv/bin/activate
export $(cat .env)
python3 agent/main.py --v3
python3 agent/main.py --v3 --resume 20260318_120000
Phantom works with any of these out of the box. Local models via Ollama are fully supported — no cloud required.
| Provider | Default Model | API Key Env Var |
|---|---|---|
| Anthropic (Claude) | claude-sonnet-4-6 | ANTHROPIC_API_KEY |
| OpenAI (ChatGPT) | gpt-5.4 | OPENAI_API_KEY |
| xAI (Grok) | grok-4-20-beta | XAI_API_KEY |
| Google (Gemini) | gemini-3.0-pro | GEMINI_API_KEY |
| Mistral | mistral-large-latest | MISTRAL_API_KEY |
| DeepSeek | deepseek-chat-v3.2 | DEEPSEEK_API_KEY |
| Ollama (local) | deepseek-v3.2:cloud | (none) |
Phantom v3 runs a Plan-Act-Observe-Reflect loop driven by a hypothesis priority queue — not a turn counter.
Mission start
│
├─ Seed: 6 concurrent initial hypotheses per target
│ "SQLi/SSTI/SSRF on all input surfaces"
│ "Exposed .env/.git/swagger/admin endpoints"
│ "Default credentials on auth surfaces"
│ "Open ports → targeted service attacks"
│ ...
│
└─ Loop (runs until all hypotheses exhausted):
PLAN — LLM picks highest-priority hypotheses, creates multi-vector plan
ACT — Runs up to 4 tools in parallel
OBSERVE — Extracts findings, feeds new hypotheses back into queue
REFLECT — If stalled: pivot. If critical found: escalate immediately.
STRATEGIST (every 5 turns) — Injects high-level attack chain analysis
Every confirmed finding automatically generates follow-up hypotheses:
The mission ends when the queue is exhausted — not when a timer runs out.
=== Turn 1/100 ===
Phantom: Forming initial hypotheses. Pursuing 3 vectors simultaneously.
<plan_create objective="Web injection + config exposure + auth" priority="0.95">
<action tool="run_auto_recon" args='{"target": "https://target.com"}' priority="0.9"/>
<action tool="run_nuclei" args='{"target": "https://target.com"}' priority="0.85"/>
<action tool="forge_tool" args='{"description": "SSTI probe all reflected params"}' priority="0.8"/>
</plan_create>
>> Running: run_auto_recon, run_nuclei, forge_tool
[INFO] Port 22 open: OpenSSH 8.9
[INFO] Port 443 open: HTTPS / Apache 2.4.51
[HIGH] CVE-2023-2745: wp-admin path traversal
[CRITICAL] SSTI confirmed: /search?q={{7*7}} returns 49
=== Turn 2/100 ===
Phantom: Critical SSTI confirmed. Spawning exploit chain immediately.
>> Running: forge_tool (RCE via SSTI), screenshot
[CRITICAL] RCE: /search?q={{"".__class__.__mro__[1]...}} returns uid=33(www-data)
[CRITICAL] Persistence: cron job written to /etc/cron.d/phantom
=== MISSION COMPLETE ===
Findings: 14 | Chains: 3 | Critical: 2 | High: 5
# config.yaml
provider: "anthropic" # anthropic | openai | grok | gemini | ollama | mistral | deepseek
model: "" # leave empty for provider default
autonomous: true
max_autonomous_turns: 100 # hard cap; mission usually ends earlier via hypothesis exhaustion
pause_every_n_turns: 10 # operator checkpoint interval (v2 only; v3 runs fully autonomous)
# Performance
max_parallel_tools: 4 # concurrent tool execution per turn
requests_per_second: 5 # rate limit for tool calls
retry_max: 3 # retries with exponential backoff
# Stealth
stealth_profile: "normal" # silent | stealthy | normal | aggressive
# proxy: "http://127.0.0.1:8080" # route through Burp
scopes/current_scope.md)# Authorized targets
https://target.com
https://api.target.com
192.168.1.0/24
# Authorization: Pentest contract signed 2026-03-15
phantom/
agent/
main.py # Entry point (--v3 flag for autonomous engine)
orchestrator.py # PAOR loop + hypothesis engine integration
agent_client.py # v2 legacy loop
providers/ # 7 LLM provider adapters
reasoning/
hypothesis_engine.py # Priority queue driven by findings
planner.py # XML plan block parser
reflector.py # Stall detection + pivot decisions
strategist.py # Attack chain analysis
context_manager.py # Token-budget-aware prompt builder
tools/ # Tool implementations
models/ # Data models (findings, graph, events, state)
prompts/
system_prompt_v3.txt # Attacker-mindset system prompt
initial_mission.txt # Aggressive mission seed template
forge_tool_prompt.txt # Script generation format instructions
tests/ # 246 unit tests
scopes/ # Scope templates
install.sh / install.ps1 # Interactive installers
get.sh / get.ps1 # One-liner downloaders
Compare two sessions to see what got fixed and what's still open:
Mission Diff: session_A -> session_B
NEW (1):
[+] [HIGH] CVE-2024-1234
RESOLVED (8):
[-] [CRITICAL] CVE-2023-2745
[-] [HIGH] SQLi on /api/users
PERSISTENT: 7 findings
[*] Executing 4 tools in parallel: ...) and findings ([!] [CRITICAL] ...) onlyHypothesisEngine.burst_launch()fetch_exploit tool — searches ExploitDB (searchsploit) and GitHub PoC repos for CVEs and known vulnerabilities; downloads and executes exploit scripts against authorized targets via sandbox_check_mission_complete hypothesis path; fixed stale finding injection on text-only turns; updated 7 stale tests to match current output format<reflection> blocks and drives actual pivot decisions[CRITICAL] tags that tools never emit)This tool is for authorized penetration testing only. Running it against systems you do not have written permission to test is illegal. The authors are not responsible for misuse.
Built by KMDN — Switzerland
GitHub checked 40h ago - refresh overdue. Recently viewed repositories target hourly refresh.