Hunt: Web Cache Attacks (golden-image rework + 2026 research)
Turn a cache-fronted surface into evidence-carrying CANDIDATES for web cache poisoning and cache deception. This skill produces candidates, never verdicts - findings leave ONLY through the G1 proof gate (triage).
Current emphasis (update on wiki harvest): parameter cloaking and cache-key normalization gaps over plain unkeyed X-Forwarded-Host reflection; desync-to-cache chains (a poisoned 302 landing in a CDN cache entry = persistent takeover) - the newest harvested technique leads until superseded.
Assumes hunt-core for the scope gate, two-account rule,
confirmation gate, enumeration limits, stop conditions, wiki protocol,
FIND output, and Deadends. Do not re-derive any of that here.
Wiki
Hub: [[web-moc]] - Primary page: [[web-cache-poisoning]] - Payload
arsenal: wiki/payloads/web-cache.md
Anchors: [[web-cache-deception]], [[web-cache-attacks]],
[[http-host-header-attacks]], [[http-request-smuggling]]
REFS: [[web-cache-poisoning]], wiki/payloads/web-cache.md
mcp__wiki-search__query (lex) "web cache poisoning deception unkeyed input cache-key path confusion desync to cache" via wiki-search MCP - ONLY on a concrete hint the map above does not cover; not a blanket first step.
Shared bypass arsenal (blocked implies research, but walk this first): skills/exploit/hunt/hunt-cache/references/bypass-arsenal.md - delimiter-differential deception (/api/me;x.css), key-normalization collisions, static-rule confusion, Host-port key exclusion (Cloudflare).
Paths (binding - define once at the top of the run notes)
# seat side (wsl) - engagement tree is DOUBLE-NESTED in VMshare:
ENG_DIR=/mnt/c/Users/Lenovo/Desktop/VMshare/<eng>/<eng>
RUN=$ENG_DIR/hunt/cache/<host>
# VM side (WHERE tools run, same tree through the VMware share):
ENG_DIR=/mnt/VMshare/<eng>/<eng>
RUN=$ENG_DIR/hunt/cache/<host>
Corpus and probes live in the VMshare tree; the VM runs tools against the /mnt/VMshare spelling as user tz; the seat reads the same bytes at the /mnt/c/Users/Lenovo/Desktop/VMshare spelling. The repo tree targets/ is admin/ingest only - probe artifacts NEVER land there.
Transport
Every VM-native command block ships through ONE documented transport:
cd /mnt/c/Users/Lenovo/Documents/ObisidianVaults/ZTorch/ZTorch && bash scripts/vm-ssh.sh '<command>'
- vm-ssh lands as user tz (NOT root): no root-only paths, no sudo.
- vm-ssh.sh takes the command as ONE argument; quotes ship as base64
(
echo <b64> | base64 -d | bashinside the vm-ssh argument). - Non-login shells do NOT source profile.d: target-facing fetches MUST use /opt/scope-shim/bin/{curl,httpx} by absolute path.
- Shim verdict semantics (verified live): out-of-scope dies rc 126 (never work around); in-scope passes; UNKNOWN gets an ADVISORY - not approval; verify against scope.md and self-deny.
- Param Miner and poisoned-request replay run seat-side in Burp; long VM loops run detached (vm-scan.sh) - the bridge drops at ~2min.
Entry gate
All four must pass; each is falsifiable:
Active engagement exists (repo tree targets//active.md) and is on targets//scope.md in-scope. Scope-guard is the deny. (targets/ is the repo admin tree; $ENG_DIR holds corpus and run artifacts only - see Paths.)
hunt-core loaded (skills/exploit/hunt/hunt-core/SKILL.md).
Producer verified - at least ONE of: (a) $ENG_DIR/state.md asset table has >= 1 endpoint row for with cache signals (Age / X-Cache / CF-Cache-Status / Cache-Control noted in the tech column);
(b) $ENG_DIR/hunt/smuggling//raw/edge-map.md exists (a smuggling run already mapped the edge);
(c) kickoff seeded $RUN/raw/cache-map.md. None = dispatch the surface lane first; never probe blind.Toolchain preflight (fails LOUD):
for t in /usr/bin/jq /usr/bin/python3 \ /opt/scope-shim/bin/curl; do [ -x "$t" ] || { echo "MISSING TOOL: $t"; exit 1; } done # seat-side: Burp + Param Miner (hunt-burp owns install)
Checklist (mandatory)
Copy checklist.md (this skill's dir) to
$ENG_DIR/hunt/cache/<host>/cache-checklist.md at run start.
Unchecked at stop = UNCHECKED lane, re-run from the first unchecked
step. The SKILL.md text and the checklist header agree byte-for-byte
on that copy target.
Nudge
Review-skill re-injection text (pinned; NOTE: completion-gate emits its own generic nudge - both mean: resume at the first unchecked box):
Your work was just reviewed by the review skill and it was found
that you either missed a step of analysis, or didn't generate an
artifact of sufficient proof. Look at the markdown based checklist
and the output for each step, find what you missed, and complete
that step.
Confirmation gate
Web cache poisoning is a blind / OOB-capable class: the win is a response served to OTHER clients, unobservable from your own session.
NOT confirmation: your own cached response reflected back to you alone; a single response that might be per-user; an Age / X-Cache: hit change with no cross-session retrieval; the payload echoed in your own request.
IS confirmation: a poisoned or deceived response served to a DIFFERENT session and reproduced in a clean session (fresh profile, no cached state, cache-buster OFF); or an OOB callback to your unique Collaborator/interactsh subdomain from a resource you injected into the cached page.
When you plant a blind/OOB payload, append a row to
targets//oob.md: | <token> | <sink url+param> | cache | <date> | waiting | | (token | sink | class | planted | status | source).
The recon-capture hook flips waiting -> HIT; a HIT row is the gate to
scaffold the FIND. Do NOT claim a blind cache poisoning without
cross-session proof or a HIT row.
Methodology
Rank before testing. Unkeyed headers that reflect (X-Forwarded- Host, X-Forwarded-Scheme, X-Host, X-Forwarded-For, custom headers a page reflects into links/scripts - highest hit-rate vector; discover with Param Miner); path/parameter cloaking (static-looking suffixes and delimiter tricks that desync what the cache keys on from what the origin serves - primary deception vector); CDN edges and cache-key normalization gaps (case, trailing slash, duplicate params differing from origin routing).
Step 1 - Cache identification + key analysis
Compare X-Cache/Age across requests; determine what is KEYED (usually
method + host + path + some query) vs UNKEYED (most headers, some
params). ALWAYS attach a unique cache-buster while probing so you
never touch a shared key. Row schema endpoint | cache product | key inputs | unkeyed inputs | evidence @ $RUN/raw/cache-map.md:
{ \
echo "/ | Cloudflare | host+path | X-Forwarded-Host | param-miner"
echo "/api/data | app-cache | host+path+q | fat GET body | probe"
} >> "$RUN"/raw/cache-map.md
Step 2 - Unkeyed input discovery (Param Miner, seat-side)
Param Miner guesses up to 65,536 param/header names per request, harvesting candidates from in-scope traffic; auto-mine with a thread pool for thousands of requests. Each discovered unkeyed input that affects the response = a poisoning candidate row @ $RUN/probes/unkeyed.jsonl.
Step 3 - Poisoning
Make the unkeyed input produce harm (XSS payload in a reflected header, redirect target, resource swap of a script src), then confirm the CACHED poisoned response is served to a fresh request (cache-buster OFF) - and cross-session per the gate. Variants: fat GET (body params on a GET past a keyed query string), parameter cloaking, cache-key normalization gaps.
Step 4 - Deception
Trick the cache into storing a victim's private page: request a private page with an appended static-looking suffix or delimiter - /account/profile.css, /account/profile/nonexistent.js, path-parameter ;, encoded %2f. If the origin returns the private content but the cache stores it as static -> retrieve another user's data unauthenticated. Confirm with the two-account canary (A's private marker readable by B / an unauthenticated fetch).
Step 5 - Desync-to-cache chain (2026)
An H2.0/CL.0 desync whose poisoned 302 lands in a CDN cache entry (e.g. for a JS file) becomes persistent site takeover: always test whether a confirmed desync's output gets cached, and lead the report with cache-poisoning impact when triage wants more than a DoS. The cache-buster paradox applies here from the smuggling side: probe BOTH with and without the buster. Hand the desync mechanics to hunt-smuggling; this skill owns the cached-persistence leg.
Step 6 - Exit artifact (candidates)
Merge probe JSONLs; candidates.md every class section present; pointer $ENG_DIR/hunt-cache-.md:
CACHE-HUNT-DONE unkeyed=<n> poison=<n> deception=<n> desync-chain=<n>
Plus _requests.md rows (lane = hunt-cache), state.md asset rows, Deadends rows with the WHY.
Every probe JSONL row: {class, host, endpoint, method, evidence (absolute probes/raw/ path), observed, confidence}. Request/response pairs under $RUN/probes/raw/ (sha256 filenames).
Chaining
An unkeyed input reflected into HTML/JS turns poisoning into STORED XSS served to every client hitting that key - escalate the payload with hunt-xss. A reflected X-Forwarded-Host in a redirect or absolute link gives open redirect / resource swap to all users. Both raise impact from self-only to mass; prove reach on a benign key, then stop.
Evasion
When the input looks keyed or filtered: header-name variants (X-Forwarded-Host vs X-Host vs Forwarded), duplicate/pollute the param so the cache keys one occurrence and the origin reads another, exploit cache-key normalization (case, trailing slash, %2f), fat GET to smuggle the value past a keyed query string.
Validation
- Proof = victim-visible effect: account A poisons, account B (second session, clean cache) receives the payload. Single-session hits are SELF-poisoning only.
- Negative control: the unpoisoned key variant returns clean content to B.
- Counterevidence: X-Cache MISS on B's control request disproves persistence.
False Positives
- CDN caching static assets read as "poisoned" (cache working as designed).
- Vary/Cookie keying already isolating users.
- Fat GET rejected by the router (413/400): the technique, not the app, failed.
- Single-user reflected content with zero cross-user path.
Cross-routing
- hunt-smuggling when the poison injector is a request desync.
- hunt-ssrf when the unkeyed input is an internal fetch whose response gets cached.
- Not this skill: ordinary stale TTL on public content (ops note, not a finding).
Severity
HIGH (stored XSS / redirect to all users, or PII disclosure via deception); CRITICAL if it yields mass account takeover; MEDIUM if self-only / weak impact.
Deadends
Append: - [ ] web-cache <host> -- key includes host+all reflective
params; deception suffixes not cached (Cache-Control: private)
N/A escapes
- "N/A: no cache layer detected"
- "N/A: private pages behind auth lack static-suffix confusion" An N/A tick is a claim with a reason, never a silent pass. Identical strings in SKILL.md and checklist.md.
Bitter-pill variant
Freehand run: skip checklist + numbered steps, one freehand pass over the cache map, output ONLY $RUN/analysis/bitter-pill.md (tried/found/ dismissed, every claim carries evidence). The cross-session/OOB gate survives freehand. Declare with a _requests.md row (lane = hunt-cache-bitterpill).
Depth walk (mandatory)
Walk EVERY applicable row of the payload arsenal page cited above.
Record each row in $RUN/coverage-depth.md as a table
| row | state | evidence | where state is probed, blocked, or
N/A, and evidence is a probe-pair path or a Deadends.md line. A bare
probed with no evidence reference fails the completion gate
(NEEDS-REVIEW). N/A rows cite why (surface shape forbids it).
Blocked implies research: before any Deadend is claimable on a blocked
row, (a) walk the arsenal page's bypass-ladder rows for that control
class, and (b) run one wiki query AND one mcp__wigolo__search for the
specific tech-plus-control bypass. Results, or a genuine null, land in
coverage-depth.md. "No research tried" is not a claimable state.
Exit artifact + handoff
ONE exit artifact set: $RUN/candidates.jsonl + candidates.md +
$ENG_DIR/hunt-cache-.md (pointer with CACHE-HUNT-DONE + counts).
Consumer (triage) finds at $RUN: raw/cache-map.md, probes/.jsonl,
probes/raw/, candidates.{jsonl,md}. Findings leave ONLY through G1.
Distill: python3 scripts/wiki-stage.py --kind technique --slug <slug> --target-page techniques/web/web-cache-poisoning.md (deception-path
findings: --target-page techniques/web/web-cache-deception.md).
Stop conditions
Terminal states complete; TRAFFIC-AFFECTING RULE: poisoning the shared/production cache can serve malicious content to every real user hitting that key - demonstrate on a benign, self-scoped cache key (a unique cache-buster or your own path) and STOP at proof; do not mass-poison a shared key; do not leave a live payload in the production cache. Nothing written into skill dirs; no unchecked boxes above REVIEW; hunt-core stop conditions fire unchanged.
Attack surface
APPROACH: Identify the cache and its key (Age/X-Cache), then rank unkeyed reflected headers (X-Forwarded-Host etc., discover with Param Miner) for poisoning and static-suffix/delimiter path confusion for deception; always probe with a unique cache-buster.
AVOID: Your own cached response reflected back to you, a single maybe-per-user response, or an X-Cache: hit with no cross-session retrieval is NOT confirmation - the poisoned/deceived response must reach a DIFFERENT session (or an OOB HIT).