Community写作与编辑github.com

yaklang/web-cache-deception

Web缓存欺骗与投毒剧本。当CDN、反向代理或应用程序缓存可能因路径混淆或缓存键操纵而向其他用户提供敏感认证内容时使用。

web-cache-deception 是什么?

此技能提供了一个全面的Web缓存欺骗与投毒剧本,专为安全研究人员和渗透测试人员设计。其主要目标是帮助用户识别和利用由于CDN、反向代理或应用程序缓存配置不当导致的漏洞,这些漏洞可能通过路径混淆或缓存键操纵,将敏感认证内容泄露给其他用户。该技能支持与多种平台集成,并提供了一个结构化的方法,包括侦察、攻击和利用阶段,以及详细的检查列表和命令示例。通过遵循此剧本,用户可以系统地测试Web应用程序对缓存欺骗攻击的脆弱性,并理解如何操纵缓存行为以访问未经授权的数据。该技能基于yaklang开发,提供了清晰的步骤和实用示例,确保用户能够有效地执行测试并记录发现。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/yaklang/hack-skills/tree/main/skills/web-cache-deception

Installed? Explore more 写作与编辑 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

web-cache-deception 是做什么的?

Web缓存欺骗与投毒剧本。当CDN、反向代理或应用程序缓存可能因路径混淆或缓存键操纵而向其他用户提供敏感认证内容时使用。

概述

此技能旨在帮助安全专业人员识别和利用Web缓存机制中的漏洞,特别是缓存欺骗和投毒攻击。它提供了从侦察到利用的逐步指导,包括用于测试和验证的实用命令。

适用场景

  • CDN缓存:如Cloudflare、Akamai、Fastly等,可能缓存动态内容。
  • 反向代理:如Nginx、Apache HTTP Server,可能因路径处理不当而错误缓存页面。
  • 应用缓存:如Redis、Memcached,可能缓存敏感API响应。

工作原理

Web缓存欺骗攻击利用缓存键和请求路径的差异。例如,通过向请求附加一个无害的静态资源扩展名(如.css),攻击者可能诱使缓存服务器将认证的HTML页面视为可缓存资源,并将之公开提供。

侦察阶段

  1. 识别目标URL:
    curl -I https://example.com/private/profile
    
  2. 检查缓存头:查找X-Cache、Cache-Control、Age等头信息。
  3. 测试路径混淆:
    curl -I https://example.com/private/profile/test.css
    

利用阶段

  1. 操纵缓存键:尝试添加静态资源扩展名,观察缓存行为。
    curl -I https://example.com/private/profile/.css
    
  2. 验证缓存共享:以非认证用户身份访问同一URL,若获得认证内容,则成功。
    curl https://example.com/private/profile/test.css
    

高级技术

  • 双点后缀:使用file..css等模式绕过某些过滤器。
  • 路径分隔符混淆:使用/或%23等字符。
  • 缓存头操纵:通过设置自定义头(如X-Forwarded-Host)来影响缓存键。

注意事项

  • 仅在获得授权的情况下进行测试。
  • 记录所有发现以备报告。
  • 了解目标使用的缓存系统及其特定规则。

参考资源

  • OWASP Web Cache Deception Attack
  • PortSwigger 相关教程
  • 各缓存平台文档

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

yaklang/401-403-bypass-techniques

401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP method tampering, header injection, protocol downgrade, and automated bypass tools.

yaklang/active-directory-acl-abuse

Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS reading, GPO abuse, and BloodHound-guided attack paths.

yaklang/active-directory-certificate-services

AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to enrollment, CA officer abuse, and certificate-based persistence.

yaklang/active-directory-kerberos-attacks

Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting, golden/silver/diamond tickets, delegation abuse, or pass-the-ticket attacks.

yaklang/ai-ml-security

AI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples, model poisoning, model stealing, data privacy attacks (membership inference, model inversion), and autonomous agent security risks.

yaklang/android-pentesting-tricks

Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView vulnerabilities, intent redirection, root detection bypass, tapjacking, and backup extraction during authorized mobile security assessments.

yaklang/anti-debugging-techniques

Anti-debugging detection and bypass playbook. Use when reversing protected binaries that detect debuggers via ptrace, PEB flags, timing checks, or signal/exception handlers on Linux and Windows.

yaklang/api-auth-and-jwt-abuse

API authentication and JWT abuse playbook. Use when testing bearer tokens, API keys, claim trust, header spoofing, rate limits, and API auth boundary weaknesses.

yaklang/api-authorization-and-bola

API authorization and BOLA testing playbook. Use when APIs expose object identifiers, nested resources, hidden writable fields, or weak function-level authorization.

yaklang/api-recon-and-docs

API reconnaissance and documentation review playbook. Use when discovering endpoints, schemas, versions, OpenAPI specs, hidden docs, and surface area for API testing.

yaklang/api-sec

Entry P1 category router for API security. Use when choosing between API recon, authorization, token abuse, and hidden-parameter workflows before any deeper API topic skill.

yaklang/arbitrary-write-to-rce

Arbitrary write to RCE playbook. Use when you have an arbitrary write primitive (from heap exploitation, format string, or OOB write) and need to convert it into code execution by targeting GOT, hooks, _IO_FILE vtable, exit_funcs, TLS_dtor_list, modprobe_path, .fini_array, or C++ vtables.

yaklang/authbypass-authentication-flaws

Authentication bypass testing playbook. Use when assessing login flows, password reset logic, account recovery, MFA bypass, token predictability, brute-force resistance, and session boundary flaws.

yaklang/auth-sec

Entry P1 category router for authentication and authorization. Use when testing login flows, sessions, object authorization, JWT, OAuth, CORS, CSRF, and enterprise SSO weaknesses before any deeper auth topic skill.

yaklang/binary-protection-bypass

Binary protection bypass playbook. Use when identifying and bypassing ASLR, PIE, NX/DEP, stack canary, RELRO, FORTIFY_SOURCE, CET, and MTE protections in ELF binaries to enable exploitation.

yaklang/browser-exploitation-v8

Browser and V8 exploitation playbook. Use when exploiting JavaScript engine vulnerabilities including JIT type confusion, incorrect bounds elimination, and V8 sandbox bypass to achieve renderer RCE and sandbox escape in Chrome/Chromium.

yaklang/business-logic-vuln

Entry P1 category router for business logic testing. Use when workflow abuse, race conditions, pricing flaws, or multi-step state attacks matter more than parser-level input injection.

yaklang/business-logic-vulnerabilities

Business logic vulnerability playbook. Use when reasoning about workflows, race conditions, price manipulation, coupon abuse, state machines, and multi-step authorization gaps.

yaklang/classical-cipher-analysis

Classical cipher analysis playbook. Use when encountering substitution ciphers, Vigenere, transposition, XOR, or encoded text in CTF challenges that requires frequency analysis, Kasiski examination, or known-plaintext cryptanalysis.

yaklang/clickjacking

Clickjacking playbook. Use when testing whether target pages can be framed, whether X-Frame-Options or CSP frame-ancestors are properly configured, and whether UI redress attacks can trigger sensitive actions.

相关技能