hunt-clickjacking
它能做什么
这项技能检查敏感页面是否因缺少框架保护标头而可以被其他网站嵌入。它适用于对登录、支付和账户设置页面进行的经授权测试。
适用场景
- ✓当登录或支付页面可能缺少 X-Frame-Options 或 frame-ancestors 保护时。
- ✓当你想检查账户设置页面能否被嵌入框架时。
- ✓当 OAuth 授权页面在安全测试范围内时。
技能链接
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-clickjacking/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我在经授权的测试中检查,我们的账户设置页面能否被嵌入到其他网站中。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查响应标头中的框架保护设置,然后在浏览器中测试敏感操作能否在框架内完成。只有当该操作确实可以完成时,它才会报告发现的问题。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
What is Clickjacking
Clickjacking (UI Redressing) lets an attacker load a target page inside a transparent iframe on a malicious site. The victim sees the attacker's decoy UI but clicks the hidden target UI beneath it. No JavaScript on the target is required.
Highest-value targets:
- Login / authentication pages — force login with attacker credentials
- Money transfer / checkout / "confirm payment" buttons
- Account settings (email change, password change, 2FA disable)
- OAuth / social-login "Authorize app" confirmation dialogs
- Admin actions (delete, promote user, change role)
Protection Headers
Two mechanisms prevent framing:
X-Frame-Options: DENY # strongest — blocks all framing
X-Frame-Options: SAMEORIGIN # allows same-origin frames only
Content-Security-Policy: frame-ancestors 'none' # CSP equivalent of DENY
Content-Security-Policy: frame-ancestors 'self' # CSP equivalent of SAMEORIGIN
If NEITHER is present, the page is frameable from any origin.
How to Test
Header-absence is the trigger for investigation, not the finding. Two steps:
Step 1 — Header check (screening). Fetch the target page and inspect the response headers:
curl -sI https://target.example/account/transfer | grep -iE 'x-frame-options|content-security-policy'
If BOTH X-Frame-Options and CSP frame-ancestors are absent, the page is a candidate. If either is present and restrictive (DENY/SAMEORIGIN/frame-ancestors 'none'|'self'), stop — it's protected.
Step 2 — Prove it actually frames and clicks (required for a real finding). Build a minimal PoC and load it in a real browser:
<!doctype html>
<h1>Win a prize — click below</h1>
<iframe src="https://target.example/account/transfer"
style="opacity:0.1;position:absolute;top:0;left:0;width:1000px;height:800px"></iframe>
Confirm ALL of the following, or it is not exploitable:
- The page actually renders inside the iframe (no framebusting JS that blanks/redirects it — e.g.
if(top!==self)breakout, or aSec-Fetch-Dest/JS frame check). - The sensitive action still works while framed — critically, the action must succeed cross-site. If it relies on a session cookie set
SameSite=LaxorSameSite=Strict(the modern default), the cookie is not sent on the cross-site framed request, and the clickjack fails. Verify the victim's authenticated state carries into the frame. - The target is a state-changing action (transfer, settings/email/password change, 2FA disable, OAuth authorize, admin action), not a read-only page.
Strategy: target the most sensitive action pages first — severity scales directly with what the victim is tricked into doing.
False Positives
- Public, read-only pages (home/marketing) lacking frame protection are low/informational — no sensitive action to redress.
- APIs and non-HTML endpoints (JSON, images) are not clickjacking targets.
- Header-absence alone is NOT a finding. SameSite cookies, framebusting JS, or the lack of any sensitive framed action can each fully defeat it — which is why Step 2 is mandatory.
Proof Requirements
A valid clickjacking report shows: (1) the target page rendered inside an attacker-controlled iframe in a real browser, (2) a sensitive state-changing action reachable by a framed click while the victim is authenticated (cookies survive the cross-site context), and (3) a screenshot/recording of the overlay. Reporting missing headers with no working frame PoC is a documentation-quality issue, not a vulnerability.
常见问题
什么是点击劫持?
指用一个隐藏的页面覆盖在假页面上,使用户在不知情的情况下点击了真实页面。
缺少标头就足以成为发现的问题吗?
不够。技能说明,缺少标头只是起点,必须通过浏览器测试证明敏感操作确实可以完成。
哪些标头很重要?
技能提到 X-Frame-Options,以及 Content-Security-Policy 中的 frame-ancestors 设置。
详情
作者的原始描述
Hunt Clickjacking — missing X-Frame-Options / CSP frame-ancestors lets an attacker embed the target page in an invisible iframe and trick victims into clicking buttons they cannot see (UI redressing). Targets: login flows, money transfers, account settings, OAuth confirmation pages. Confirm by fetching the page, then PROVE it frames in a real browser and a sensitive state-changing action survives the cross-site context (SameSite cookies / framebusting JS can defeat it) — header-absence alone is not a finding.
热度
- GitHub 星标
- 5.4k
- 排名
- #14900
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
apk-redteam-pipeline
5.4k帮你的智能体测试 Android 应用的安全弱点,从找到 APK 文件、反编译,到检查是否暴露了敏感信息。
bugcrowd-reporting
5.4k帮你的智能体撰写更好的 Bugcrowd 漏洞报告,选择正确的类别,并回应“超出范围”的异议。
cloud-iam-deep
5.4k帮你的智能体在经授权的安全测试中,检查找到的云凭据在 AWS、Azure 或 Google Cloud 上能访问哪些内容。
enterprise-vpn-attack
5.4k帮你的智能体在经授权的测试中,检查 Cisco、Fortinet、Citrix 等厂商 VPN 和远程访问设备是否存在已知弱点。