smartworldarafath/rea_skill

payloads-cache-deception

Web Cache Deception (WCD) is a security vulnerability that occurs when a web server or caching proxy misinterprets a client's request for a web resource and subsequently serves a different resource, which may often be more sensitive or private, after cachin…

Zobacz źródło

Jak używać

  1. Skopiuj polecenie instalacji i sprawdź źródła przed instalacją we własnym środowisku agenta.
  2. W oryginale sprawdź wymagane narzędzia, dane dostępowe i obsługiwane środowiska.
  3. Opisz dane wejściowe i oczekiwany rezultat; porównaj wynik ze źródłami.
npx skills add https://github.com/smartworldarafath/rea_skill --skill payloads-cache-deception

Przed rozpoczęciem

  • Instalacja nie obejmuje subskrypcji modelu, limitu API ani uprawnień do plików.
  • Gwiazdki i instalacje pokazują aktywność, a nie niezależny test jakości lub bezpieczeństwa.
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

Web Cache Deception Payloads

Source: PayloadsAllTheThings/Web Cache Deception Category: payloads-web | Skill ID: payloads-cache-deception

Overview

Web cache deception payloads for stealing sensitive cached responses from authenticated users.

This skill integrates the full PayloadsAllTheThings (PATT) payload library for the Web Cache Deception Payloads domain into the REA_Skill framework. Use it during authorized penetration testing, bug bounty research, security audits, and CTF challenges.

Workflow

1. Recon & Identification

  • Identify the target technology stack and injection points
  • Enumerate endpoints, parameters, and input vectors
  • Determine applicable payload categories from the reference below

2. Payload Selection

  • Browse the PATT payload library for the attack class
  • Select encoding-appropriate payloads for the target environment
  • Consider WAF bypass variants and obfuscation techniques

3. Exploitation (Authorized Only)

  • Test payloads in order: passive → active → escalation
  • Document every payload tested and its response
  • Capture PoC evidence (screenshots, HTTP logs, curl output)

4. Verification & Reporting

  • Confirm the vulnerability with a clean minimal PoC
  • Map findings to CVE/CWE where applicable
  • Report with remediation recommendations and code fixes

Full PATT Reference

Web Cache Deception

Web Cache Deception (WCD) is a security vulnerability that occurs when a web server or caching proxy misinterprets a client's request for a web resource and subsequently serves a different resource, which may often be more sensitive or private, after caching it.

Summary

Tools

Methodology

Example of Web Cache Deception:

Imagine an attacker lures a logged-in victim into accessing http://www.example.com/home.php/non-existent.css

  1. The victim's browser requests the resource http://www.example.com/home.php/non-existent.css
  2. The requested resource is searched for in the cache server, but it's not found (resource not in cache).
  3. The request is then forwarded to the main server.
  4. The main server returns the content of http://www.example.com/home.php, most probably with HTTP caching headers that instruct not to cache this page.
  5. The response passes through the cache server.
  6. The cache server identifies that the file has a CSS extension.
  7. Under the cache directory, the cache server creates a directory named home.php and caches the imposter "CSS" file (non-existent.css) inside it.
  8. When the attacker requests http://www.example.com/home.php/non-existent.css, the request is sent to the cache server, and the cache server returns the cached file with the victim's sensitive home.php data.
WCD Demonstration
WCD Demonstration

Caching Sensitive Data

Example 1 - Web Cache Deception on PayPal Home Page

  1. Normal browsing, visit home : https://www.example.com/myaccount/home/
  2. Open the malicious link : https://www.example.com/myaccount/home/malicious.css
  3. The page is displayed as /home and the cache is saving the page
  4. Open a private tab with the previous URL : https://www.example.com/myaccount/home/malicious.css
  5. The content of the cache is displayed

Video of the attack by Omer Gil - Web Cache Deception Attack in PayPal Home Page ![DEMO](https://vimeo.com/249130093)

Example 2 - Web Cache Deception on OpenAI

  1. Attacker crafts a dedicated .css path of the /api/auth/session endpoint.
  2. Attacker distributes the link
  3. Victims visit the legitimate link.
  4. Response is cached.
  5. Attacker harvests JWT Credentials.

Caching Custom JavaScript

  1. Find an un-keyed input for a Cache Poisoning
js
    Values: User-Agent
    Values: Cookie
    Header: X-Forwarded-Host
    Header: X-Host
    Header: X-Forwarded-Server
    Header: X-Forwarded-Scheme (header; also in combination with X-Forwarded-Host)
    Header: X-Original-URL (Symfony)
    Header: X-Rewrite-URL (Symfony)
  1. Cache poisoning attack - Example for X-Forwarded-Host un-keyed input (remember to use a buster to only cache this webpage instead of the main page of the website)
js
    GET /test?buster=123 HTTP/1.1
    Host: target.com
    X-Forwarded-Host: test"><script>alert(1)</script>

    HTTP/1.1 200 OK
    Cache-Control: public, no-cache
    [..]
    <meta property="og:image" content="https://test"><script>alert(1)</script>">

Tricks

The following URL format are a good starting point to check for "cache" feature.

  • https://example.com/app/conversation/.js?test
  • https://example.com/app/conversation/;.js
  • https://example.com/home.php/non-existent.css

Detecting Web Cache Deception

  1. Detecting delimiter discrepancies: /path/<dynamic-resource>;<static-resource>
  • For example: /settings/profile;script.js
  • If the origin server uses ; as a delimiter but the cache isn't
  • The cache interprets the path as: /settings/profile;script.js
  • The origin server interprets the path as: /settings/profile
  • For more delimiter characters: see Web cache deception lab delimiter list
  1. Detecting normalization: /wcd/..%2fprofile
  • If the origin server resolved the path traversal sequence but the cache isn't
  • The cache interprets the path as: /wcd/..%2fprofile
  • The origin server interprets the path as: /profile

CloudFlare Caching

CloudFlare caches the resource when the Cache-Control header is set to public and max-age is greater than 0.

In Cloudflare CDN, one can implement a Cache Deception Armor, it is not enabled by default. When the Cache Deception Armor is enabled, the rule will verify a URL's extension matches the returned Content-Type.

CloudFlare has a list of default extensions that gets cached behind their Load Balancers.

7ZCSVGIFMIDIPNGTIFZIP
AVIDOCGZMKVPPTTIFFZST
AVIFDOCXICOMP3PPTXTTFCSS
APKDMGISOMP4PSWEBMFLAC
BINEJSJAROGGRARWEBPMID
BMPEOTJPGOTFSVGWOFFPLS
BZ2EPSJPEGPDFSVGZWOFF2TAR
CLASSEXEJSPICTSWFXLSXLSX

Exceptions and bypasses:

  • If the returned Content-Type is application/octet-stream, the extension does not matter because that is typically a signal to instruct the browser to save the asset instead of to display it.
  • Cloudflare allows .jpg to be served as image/webp or .gif as video/webm and other cases that we think are unlikely to be attacks.
  • Bypassing Cache Deception Armor using .avif extension file - fixed

Labs

References


REA MCP Integration

javascript
// REA MCP — Automated payload injection via REA tools
// Use analyze_function, procedure_pseudo_code, or observe_native_calls
// to identify injection sinks, then apply payloads from this skill.

Legal Notice

⚠️ Authorized Use Only. All payloads in this skill are for security research, penetration testing with written permission, CTF competitions, and defensive study. Unauthorized use against systems you do not own or have explicit permission to test is illegal.
z tego samego repozytorium

Więcej Skills

Wszystkie Skills
smartworldarafath
Społeczność

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

Instalacje / 1h
2
GitHub Stars
5
Aktualizacja
8 lis
smartworldarafath
Społeczność

agent-reach

Read-only access to internet platforms (Twitter/X, Reddit, YouTube subtitles, GitHub, LinkedIn, Bilibili, web). Use when the agent needs to search, read web links, retrieve social discussions, CVE/vulnerability intel, or when standard web search/fetch is blocked or insufficient.

Instalacje / 1h
2
GitHub Stars
5
Aktualizacja
8 lis
smartworldarafath
Społeczność

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

Instalacje / 1h
2
GitHub Stars
5
Aktualizacja
8 lis
smartworldarafath
Społeczność

anti-ai-slop-writing

Produces human-sounding text that avoids detectable AI writing patterns. Activates on any writing task — tweets, emails, articles, bios, captions, reports, copy, messages, LinkedIn posts, cover letters, README files, or any content where the output must not read as AI-generated. Enforces banned vocabulary, structural variety, punctuation discipline, accuracy rules, and voice calibration. Use when the user says "write," "draft," "rewrite," "make this sound human," "anti-slop," "not AI," or any va

Instalacje / 1h
2
GitHub Stars
5
Aktualizacja
8 lis