A Claude Code skill bundle for bug hunting and external red-team work - 82 skills, 15 slash commands, 681 disclosed-report patterns curated across 24 core vulnerability classes, plus enterprise identity + infrastructure attack matrices.
Python ai-securityanthropicapplication-securitybug-bountybugbountybugcrowdclaudeclaude-codeclaude-skillsethical-hackinghackeroneoffensive-securitypentestingred-teamsecurity-toolsweb-security
Four engagement-derived false-positive guards (hunt-dispatch, triage-validation, hunt-source-leak, hunt-ssrf) (#53)
Sachin Sharma5e78b5e275d8
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex fa7b744..574fd06 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -41,6 +41,32 @@ versioning is loosely [SemVer](https://semver.org/) at the bundle level.rejected it**. Surfaced by real multi-harness testing.### Changed+- **Four engagement-derived false-positive guards** — hardening in `hunt-dispatch`,+ `triage-validation`, `hunt-source-leak`, and `hunt-ssrf`, each closing a specific way the+ toolkit produced or nearly produced a wrong finding on a real authorized test.+ `hunt-dispatch` gains a mandatory **`step 0` 404 baseline for all modes** — record status ++ byte length + body hash per host from two bogus paths, and treat no path as "found" until its+ response differs from that control; SPA/CDN estates return HTTP 200 with the app shell for+ everything, so `security.txt`, revalidate routes and framework dev endpoints all appear to+ exist when they don't. Previously `step 1` was red-team only, leaving WAPT runs with no+ fingerprinting phase at all. `hunt-dispatch` also gains **`subagent scope inheritance`**:+ scope is not inherited implicitly, so delegated prompts must carry the authorized host list+ verbatim as data, treat mid-run discoveries as report-only, apply an action-verb deny-list+ **before** any read-shaped allow-list (a path ending `/status` can still be a refund route),+ and spell "read-only" out as forbidden verbs — as an adjective it does not stop an agent+ POSTing `{}` to a `generate*` endpoint and creating a real record. `triage-validation` gains+ **THE LAYER-ORDERING TRAP** after Q7: a validation error does *not* prove auth was passed,+ because a sanitiser or body parser ahead of the auth middleware yields an identical response+ shape — re-test with a minimal well-formed body, and read input-shape errors as a parser vs+ domain-field errors as business logic. `hunt-source-leak` Phase 2 now requires resolving the+ **current** build hash before testing and before re-verifying; content-hashed bundles rotate+ on deploy, so a 404 at a recorded `.map` URL is a new build, not remediation. `hunt-ssrf`+ gains per-parameter callback attribution (Burp keys interactions by payload ID, not subdomain,+ so sub-tagging one payload is not distinguishable — use a fresh payload per candidate+ parameter, and record the negative controls) plus a **blind vs full-read** check, since a+ returned upstream body is what moves a finding off the never-submit list.+ The 7-Question Gate and never-submit list are deliberately unchanged — both worked, and+ rejecting DNS-only SSRF is what forced the check that established full-read.- **Dispatch dedup (description-scoping only — bodies unchanged)** — `hunt-jwt-crypto` set as theJWT-crypto owner (`hunt-ato`/`hunt-auth-bypass`/`hunt-api-misconfig` defer to it); `bb-local-toolkit`differentiated from `bug-bounty` (had a byte-identical description); scoped `hunt-sqli`↔`hunt-nosqli`,diff --git a/skills/hunt-dispatch/SKILL.md b/skills/hunt-dispatch/SKILL.mdindex 8ece720..7f591fb 100644--- a/skills/hunt-dispatch/SKILL.md+++ b/skills/hunt-dispatch/SKILL.md@@ -29,6 +29,44 @@ hunt-dispatch mode=wapt box=blackboxhunt-dispatch mode=wapt box=greybox```+## step 0 — 404 baseline (ALL modes, mandatory, before any enumeration)++run this for **every** host before probing a single path. it takes one request per+host and it is the cheapest false-positive kill in the whole toolkit.++many modern estates (SPA / Next.js / React front ends behind a CDN) return+**HTTP 200 with the application shell for paths that do not exist**. a status code+therefore proves nothing. without a recorded control, `/.well-known/security.txt`,+`/api/revalidate`, `/__nextjs_original-stack-frame` and `/__nextjs_launch-editor`+all "exist" on a host where none of them do.++```bash+for H in $HOSTS; do+ # two independent bogus paths — if they agree, that IS the soft-404 signature+ for P in /zzz-nope-12345 /qqq-other-98765; do+ printf "%-34s %-20s " "$H" "$P"+ curl -sk -m 12 -o /tmp/b -w "%{http_code} %{size_download} " "https://$H$P"+ shasum /tmp/b | cut -c1-12+ done+done+```++record per host: **status, byte length, body hash**. that triple is the control.++**the rule: no path is "found" until its response differs from the control.**+a 200 that matches the control hash is a soft 404. a 404 whose body differs from+the control may be a real handler. compare bodies, never status codes alone.++re-derive the baseline per host — it differs across an estate. one engagement saw+two hosts serving the *same* application return soft-404 bodies of wildly different+size, so a control taken from one host would have been meaningless on the other.+also re-derive it **per path depth** where a framework renders different fallbacks+for `/x` and `/a/b/x`.++edge pages are not origin findings: a CDN "Access Denied" / "Unsupported Request"+body means the request never reached the application. classify it as edge+behaviour and move on.+## step 1 — fingerprint (red team only)fingerprint **every** live host, not just the apex. for multi-host / wildcard@@ -285,6 +323,35 @@ loaded for wapt ({blackbox|greybox}): {N} skillsreporting: bb-methodology, security-arsenal, triage-validation```+## subagent scope inheritance++if any part of the hunt is delegated to subagents, scope does **not** inherit+implicitly. every subagent prompt must carry:++1. **the authorized host list, verbatim, as data.** not "the target estate", not+ "*.target.com" — the explicit list. a subagent cannot infer the boundary.+2. **the discovered-host rule:** hosts found mid-run (via CT logs, CSP headers,+ JS bundles, CNAME chains, error messages) are **report-only**. resolve DNS,+ record, hand back. never probe, never write, until the operator re-authorizes.+3. **a deny-list of action-executing endpoints, applied BEFORE any allow-list.**+ deny by verb-in-name first: `refund`, `settle`, `payout`, `transfer`, `adjust`,+ `disburse`, `create`, `update`, `delete`, `rotate`, `reset`, `send`, `initiate`,+ `generate`, `process`. only then allow read-shaped names. order matters —+ a path like `refund/batch/status` matches the read-shaped keyword "status"+ but is a refund route; an allow-list applied first would probe it.+4. **"read-only" spelled out as forbidden verbs**, not as an adjective. "read-only"+ is routinely interpreted as "don't be destructive", which does not stop an agent+ sending `{}` to an endpoint whose name starts with `generate*` and creating a+ real record on production.++**lesson from an authorized engagement:** a subagent was told READ-ONLY and still+(a) created a live record on production because it expected `{}` to return a+validation error, and (b) wrote an object to a cloud bucket that was never on the+authorized list — one the parent prompt had named only for a DNS check. both were+disclosed in the deliverable. the fix is structural: pass scope as data, deny+by verb before allowing by verb, and treat every discovered host as out of scope+until told otherwise.+## step 4 — return control to /huntafter taxonomy print, hand control back to `/hunt` for step 3 (sibling delegation) and step 4 (active testing). do not run probes here — this skill only loads context.diff --git a/skills/hunt-source-leak/SKILL.md b/skills/hunt-source-leak/SKILL.mdindex e7f004d..627cb57 100644--- a/skills/hunt-source-leak/SKILL.md+++ b/skills/hunt-source-leak/SKILL.md@@ -49,6 +49,33 @@ done## Phase 2 — Source Map Discovery+> **Always resolve the CURRENT build hash before testing, and again before+> re-verifying.** Bundle filenames are content-hashed, so they rotate on every+> deploy. A `.map` URL recorded yesterday can 404 today while the map is still+> fully exposed under a new name. **A 404 at the old URL is not remediation** —+> it is a new build.+>+> ```bash+> # ALWAYS derive the hash live, never reuse a recorded URL+> HASH=$(curl -s "https://$TARGET/" | grep -oE 'main\.[a-f0-9]+\.js' | head -1)+> curl -s -o /dev/null -w '%{http_code} %{size_download} %{content_type}\n' \+> "https://$TARGET/static/js/${HASH}.map"+> ```+>+> **Lesson from an authorized engagement.** A large production map was found at+> `main.<hashA>.js.map`. On re-verification that URL returned a small HTML+> soft-404 and the finding was nearly closed as fixed. The bundle had rotated to+> `main.<hashB>.js` — and the map was still published at `main.<hashB>.js.map`,+> same size. Nothing had been remediated.+>+> Tell the client this explicitly in the report: **redeploying does not fix source+> map exposure.** Only `GENERATE_SOURCEMAP=false` (or stripping `.map` at deploy)+> plus a CDN purge closes it. A team that redeploys and re-checks the old link+> will wrongly declare victory.+>+> Same rule applies to any content-hashed artifact: chunk files, CSS maps,+> `asset-manifest.json`, and staging equivalents.+```bash# Step 1: Get asset manifest to find all JS bundle pathscurl -s "https://$TARGET/asset-manifest.json" | python3 -m json.tool 2>/dev/nulldiff --git a/skills/hunt-ssrf/SKILL.md b/skills/hunt-ssrf/SKILL.mdindex 023cf5a..953bbd1 100644--- a/skills/hunt-ssrf/SKILL.md+++ b/skills/hunt-ssrf/SKILL.md@@ -40,7 +40,13 @@ OOB means: a Burp Collaborator domain, an `interactsh-client` listener, a canary### Default workflow-1. **Plant the Collaborator subdomain first** (sub-tag it per sink: `dlsrcurl.<collab>`, `import.<collab>`, etc., so callbacks tell you which sink fired).+1. **Plant the Collaborator payload first.** Sub-tagging (`dlsrcurl.<collab>`,+ `import.<collab>`) only works if your listener actually reports the queried+ subdomain back to you — **verify that before relying on it.** Burp's+ `get_collaborator_interactions` keys results by **payload ID, not by subdomain**,+ so several sub-tags generated from one payload are indistinguishable in the+ output. When that is the case, **generate a fresh payload per candidate+ parameter** and send exactly one request per payload.2. **Send the request** to the target endpoint.3. **Wait 30–120 seconds**, then poll the OOB listener.4. **Only after a confirmed callback** do you claim SSRF.@@ -48,6 +54,57 @@ OOB means: a Burp Collaborator domain, an `interactsh-client` listener, a canary**Lesson from a authorized engagement:** SharePoint's `/_layouts/15/download.aspx?SourceUrl=` returned 500 with the title `"The Web application at <attacker-URL> could not be found"`. Initial scan flagged this as SSRF (server clearly processed the URL). 38 Collaborator-tagged payloads across 12+ URL-accepting parameters yielded **zero DNS or HTTP interactions**. The "echo" was client-side error-string formatting; the server never made an outbound HTTP request. The path is actually an SP-internal `SPFile`/`SPWebApplication` resolver, not a generic URL fetcher. Reporting this as SSRF would have been N/A'd at triage.+### Attribute the callback to ONE parameter before reporting++A callback proves the server made a request. It does **not** tell you which+parameter caused it, and the fix depends entirely on that.++```+BAD — four candidate fields, one payload, fired in one batch+ -> callbacks arrive, attribution impossible, retest required++GOOD — fresh payload per field, one request each, poll between+ url -> callbacks <- this is the sink+ apiUrl -> none+ endpoint -> none+ target -> none+```++**Run the negative control.** A parameter that produces *no* callback is evidence,+and it belongs in the report — it is what lets the client fix the right field+instead of allowlisting the wrong one.++**Lesson from an authorized engagement.** A server-side request-forwarding endpoint+accepted both `url` and `apiUrl`. The application's own stored config used `apiUrl`,+so that was the obvious suspect — but `apiUrl` was inert and **`url` was the live+sink**.+Batch-firing both had produced callbacks with no attribution; only per-payload+isolation identified the real parameter. A report naming `apiUrl` would have sent+the client to patch a field that does nothing.++### Blind vs full-read — establish which before scoring++After a callback confirms the request leaves the server, **check whether the+upstream response body is returned to you.** These are different findings:++- **Blind** (callback only, no body): on the never-submit list standalone. Needs an+ internal service reached, or data returned, to be reportable.+- **Full-read** (upstream body in the response): substantially higher severity —+ read arbitrary internal endpoints directly.++```bash+# one request settles it: fetch something with a known, recognisable body+-d '{"url":"https://example.com/"}'+# {"statusCode":200,"data":"<!doctype html>...<title>Example Domain</title>..."}+# ^ body returned = full-read, not blind+```++Also body-diff a known-internal target against a known-external one. A **distinct+status** on a link-local address (e.g. `401` from `169.254.169.254` where every+other target returns `200`) is the metadata service answering — that proves reach+to a non-internet-routable address, which a status code alone otherwise cannot.++---## Attack Surface Signalsdiff --git a/skills/triage-validation/SKILL.md b/skills/triage-validation/SKILL.mdindex 59c37c4..8a6c780 100644--- a/skills/triage-validation/SKILL.md+++ b/skills/triage-validation/SKILL.md@@ -97,6 +97,55 @@ Check the NEVER SUBMIT list below. If it's on this list without a chain → **KI---+## THE LAYER-ORDERING TRAP — read before claiming any auth bypass++**A validation error does NOT prove you passed authentication.**++This is the highest-confidence false positive in the auth-bypass class, because the+evidence looks concrete. The reasoning that fails:++> "I sent an unauthenticated request and got back `400 — field X is required`.+> A validation error means the request cleared auth and reached business logic.+> Therefore auth is missing."++That inference is only valid if auth runs *before* input handling. Many stacks put a+**global input sanitiser, body parser, or schema filter in front of the auth+middleware.** A malformed body is then rejected before auth is ever consulted, and+the response is indistinguishable from "auth passed, validation failed."++**The test: re-send with a minimal WELL-FORMED body.**++```bash+# malformed body — trips the sanitiser, which runs FIRST+curl -s -X POST https://target/api/v1/resource -d '{'+# 400 {"code":"ERR-INPUT-0001","message":"Invalid text. Only permitted+# characters are allowed"} <- looks like auth bypass++# same endpoint, well-formed empty object — now auth is reached+curl -s -X POST https://target/api/v1/resource -H 'Content-Type: application/json' -d '{}'+# 401 {"code":"ERR-AUTH-0001","message":"Not authenticated. Please log in."}+```++**Only the second response tells you where the auth layer sits.**++**Lesson from an authorized engagement.** On a production API, a malformed body+returned a validation-shaped `400` on the large majority of endpoints tested. Read+as an auth bypass, that is a Critical filed against production infrastructure+covering financial and administrative operations. It was a sanitiser reacting to+the `{` character before auth ran — every one of those endpoints returned `401` to+a well-formed `{}`. The false Critical was avoided only because someone re-tested.++**Rules:**+- Layer ordering is not observable from a single response. Never infer it.+- Probe auth with the *simplest valid* body the parser will accept, not a malformed one.+- If the error text is about **input shape or character class**, you are talking to a+ parser or sanitiser, not to business logic.+- If the error text names a **domain field** (`accountId is required`) AND a+ well-formed body still returns it, that is a real signal — proceed to Q6.+- Applies equally to WAF and CDN layers: an edge block is not an origin response.++---+## 4 PRE-SUBMISSION GATESRun in sequence. ALL 4 must PASS.