IF YOU USE CLAUDE CODE FOR PENETRATION TESTING, THIS PROXY BELONGS IN YOUR SETUP.
LLM-anonymization by zeroc00I.
The problem it solves: every bash output, file read, nmap result, and grep snippet that Claude Code processes gets sent to Anthropic's API. On a client engagement, that means real hostnames, internal IPs, domain usernames, hashes, credentials, and org names, leaving your machine.
This proxy sits in between. Claude never sees the real data. Your terminal does.
HOW IT WORKS
You set:
ANTHROPIC_BASE_URL=http://localhost:8080
That's it.
@claudeai Code runs normally. Every outbound message passes through two anonymization layers before reaching Anthropic, and every response is deanonymized before Claude Code sees it.
Layer 1: Regex (deterministic)
Covers everything with a known pattern:
> IPv4/IPv6, CIDRs
> MD5, SHA1, SHA256, NTLM hashes
> MACs, emails, domains, FQDNs, URLs
> AWS/cloud tokens, JWTs, API keys, session tokens
Layer 2: Local LLM via
@ollama (
@Alibaba_Qwen 3:1.7b by default)
Covers everything context-dependent:
> Bare hostnames (DC01, FILESERVER-PRD)
> Domain usernames (CONTOSO\jsmith)
> Cleartext passwords
> Org names, person names, internal project names
> Sensitive file paths
SURROGATE FORMAT
Surrogates are realistic but non-routable:
> 192.168.1.10 becomes 203.0.113.47 (RFC 5737 TEST-NET)
> contoso.local becomes xkqpzt.pentest.local
> john.smith becomes user_rfkw
> C0nt0s0@2024! becomes [CRED_XK9A2B3C]
The same original always maps to the same surrogate within an engagement. Mappings persist in SQLite, isolated per ENGAGEMENT_ID so the same IP at two different clients maps to different surrogates.
COVERAGE
49 pentest fixtures. 645 test items. 100% catch rate enforced.
Fixtures include: nmap, mimikatz, CrackMapExec, Burp Suite HTTP history, enum4linux, LDAP dumps, Metasploit, Kerberos, NTLM, AWS keys, AD CS, Empire C2, Pacu, Volatility, GoPhish, Shodan, CloudTrail, Zeek conn.log.
0% leak policy in integration tests: if any string in must_anonymize appears in anonymized output, the test fails.
SELF-IMPROVEMENT LOOP
When new tool output formats aren't covered, the improvement cycle is:
1. Add a new fixture with must_anonymize and safe_to_keep lists
2. Run auto_improve.py (no Ollama needed, completes in 5 seconds)
3. It classifies leaks, applies safe regex fixes automatically
4. Run integration tests with Ollama to validate the full pipeline
Fixes from one fixture reliably improve others. Domain\user patterns added for CrackMapExec also improved Responder and NTDS fixtures.
DEPLOYMENT
Option A: VPS SSH tunnel (proxy and Ollama on remote VPS, nothing installed locally)
Option B: Native Python local Ollama (Apple Silicon)
Option C: Full Docker (CPU only)
No privacy guarantee against metadata or writing-style correlation. Check your NDA before using cloud AI on client engagements, regardless.