🕵️ Specter
Autonomous AI security-reconnaissance agent — powered by Claude.
Give it a target. Specter plans and runs its own recon — enumerating subdomains, resolving DNS, fingerprinting live hosts, cross-referencing CVEs — then writes a severity-graded findings report. Claude drives the loop; your tools are its hands; an authorization scope keeps it honest.
What makes it different
Most recon tools are scripts you orchestrate. Specter is an agent: Claude decides what to do next based on what it has found so far. Discover a subdomain running Confluence? It looks up Confluence CVEs. Find a live host? It audits its security headers. It stops when it has enough to report — no fixed playbook.
It's the third piece of an AI-security stack: offsec-mcp gives agents the tools, vigil reviews code, and Specter is the agent that autonomously uses the tools.
Guardrails first
Autonomy without limits is a footgun, so Specter is bounded in code:
- Passive by default. Subdomain/DNS/RDAP/CVE lookups never touch the target.
- Active tools are scope-gated.
http_probe,security_headers, andport_scanrefuse to run unless the host is in--scope. Out-of-scope calls return an error the agent is told not to retry — it notes the host and moves on. - Step budget.
--max-stepsbounds how long the agent runs. - Read-mostly: it observes and reports; it does not exploit.
Install & run
export ANTHROPIC_API_KEY=...
# passive-only recon (safe against any domain you're allowed to research)
uvx specter-agent example.com
# authorize active probing of specific hosts
uvx specter-agent example.com --scope "example.com,*.example.com" --out report.md
Live tool activity streams to stderr; the Markdown report goes to stdout (or --out).
Options
| Flag | Default | Description |
|---|---|---|
--scope |
(passive only) | Hosts/CIDRs the agent may actively probe (domains, wildcards, CIDRs) |
--model |
claude-opus-5 |
Claude model driving the agent |
--max-steps |
24 |
Maximum agent steps |
--out |
(stdout) | Write the report to a file |
--quiet |
off | Don't stream tool activity |
The agent's tools
| Tool | Type | What it does |
|---|---|---|
recon_subdomains |
passive | Sub-domains from Certificate Transparency |
dns_lookup |
passive | A/AAAA/MX/NS/TXT/CNAME via DoH |
whois |
passive | Registration data via RDAP |
cve_search |
passive | High-severity CVEs by product (NVD) |
http_probe |
active | Status, headers, tech fingerprint |
security_headers |
active | Security-header audit |
port_scan |
active | Common-port TCP scan |
Example report (shape)
# 🕵️ Specter — recon report: `example.com`
_Model: claude-opus-5 · 11 steps · 8 tool calls (2×http_probe, 1×recon_subdomains, ...)_
## Executive summary
Mapped 37 subdomains; 12 live. One host runs an outdated component with a critical CVE...
## Attack surface
- api.example.com (200, nginx), staging.example.com (401), ...
## Findings
### Critical
- `wiki.example.com` runs Confluence, matching CVE-2024-XXXX (CVSS 9.8) ...
### Medium
- `example.com` is missing Content-Security-Policy and HSTS ...
## Recommendations
1. Patch Confluence on wiki.example.com immediately ...
How it works
Specter uses the Anthropic SDK's tool runner — Claude's agentic loop — with the tools above exposed as functions. Each turn, Claude reasons about prior results and calls the next tool; the loop ends when it stops calling tools and writes the report. Tool errors (including scope refusals) are fed back so the agent adapts instead of crashing.
Development
uv pip install -e ".[dev]"
pytest # scope guard, tool gating, and agent orchestration (mocked client)
ruff check .
Part of an AI × Security toolkit
- offsec-mcp — MCP server giving AI agents offensive-security tools (recon, CVE, JS analysis)
- specter — autonomous AI recon agent that drives those tools end-to-end · (this repo)
- vigil — AI security review for every pull request
- mcpscan — security scanner for MCP servers (tool poisoning, injection surfaces)
- State of MCP Security — research: 87% of scanned MCP servers expose a medium+ hardening issue
License & use
MIT — see LICENSE. For authorized security assessment only. You are responsible for having permission to assess any target; the scope guard is a safeguard, not a substitute for authorization. See SECURITY.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file specter_recon-0.1.0.tar.gz.
File metadata
- Download URL: specter_recon-0.1.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a624fab330f96b396e2b06bbb5f626c29649295cff5ce10b8af0b69fc454b598
|
|
| MD5 |
100eb323c823bf357f1999ea0e8a182c
|
|
| BLAKE2b-256 |
57d89280b365dbaf5849c68cf7feb69412fd5b0e1c00d0b847f5992536872aa9
|
File details
Details for the file specter_recon-0.1.0-py3-none-any.whl.
File metadata
- Download URL: specter_recon-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
817693bccdb3977909d623c762d473811f6b0d95156673296ca908447c29d08a
|
|
| MD5 |
de51542582e16f91af6b838ad21da104
|
|
| BLAKE2b-256 |
98af74c4c132ab94dec5fbb665466a0a1378cef440bc5af411ee7bb59e25767d
|