Skip to main content

🕵️ 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.

Python Agent CI License


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, and port_scan refuse 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-steps bounds 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.

Release files for specter-recon 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for specter-recon 0.1.0
File Size Uploaded
specter_recon-0.1.0.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for specter-recon 0.1.0
File Interpreter ABI Platform
specter_recon-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.1 kB

Release files / specter_recon-0.1.0.tar.gz

Download URL specter_recon-0.1.0.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a624fab330f96b396e2b06bbb5f626c29649295cff5ce10b8af0b69fc454b598
BLAKE2b-256 checksum
How to use checksums
57d89280b365dbaf5849c68cf7feb69412fd5b0e1c00d0b847f5992536872aa9
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / specter_recon-0.1.0-py3-none-any.whl

Download URL specter_recon-0.1.0-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
817693bccdb3977909d623c762d473811f6b0d95156673296ca908447c29d08a
BLAKE2b-256 checksum
How to use checksums
98af74c4c132ab94dec5fbb665466a0a1378cef440bc5af411ee7bb59e25767d
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page