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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

specter_recon-0.1.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

specter_recon-0.1.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

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

Hashes for specter_recon-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a624fab330f96b396e2b06bbb5f626c29649295cff5ce10b8af0b69fc454b598
MD5 100eb323c823bf357f1999ea0e8a182c
BLAKE2b-256 57d89280b365dbaf5849c68cf7feb69412fd5b0e1c00d0b847f5992536872aa9

See more details on using hashes here.

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

Hashes for specter_recon-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 817693bccdb3977909d623c762d473811f6b0d95156673296ca908447c29d08a
MD5 de51542582e16f91af6b838ad21da104
BLAKE2b-256 98af74c4c132ab94dec5fbb665466a0a1378cef440bc5af411ee7bb59e25767d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page