跳到正文
Skillpedia
安全48k · #4863

hunt-clickjacking

它能做什么

这个工具用于检查网站是否可能被诱导,让用户在不知情的情况下点击某些内容。它的做法是检查该网站是否允许自己被嵌入到另一个网站中,并且是不可见的状态。

适用场景

  • ✓当你获得许可,正在测试网站的安全性时。
  • ✓当你想检查“支付”“确认”之类的重要按钮是否可能在用户不知情的情况下被点击时。
  • ✓当你想了解网站如何防范这类攻击时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-clickjacking/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-clickjacking/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“检查网站 'example.com' 是否可能被诱导,让用户点击一个隐藏的按钮。”

每周 5 个新技能,1 分钟读完。

工作原理

该工具首先检查网站的“规则”,看它是否允许被其他网站展示。如果没有明确的防护规则,它就会尝试在一个不可见的“框架”(frame)中展示该网站,以此判断重要操作能否被执行。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

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 a Sec-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=Lax or SameSite=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.

When to Use

…

常见问题

什么是点击劫持(Clickjacking)?

这是一种攻击方式。恶意网站会在不可见的框架中加载目标网站。用户以为自己在和恶意网站互动,实际上却在不知不觉中点击了目标网站上的按钮或链接。

哪些网站最容易受到攻击?

涉及登录、支付、重要设置修改或应用授权的网站,都是高价值的攻击目标。

网站如何保护自己?

网站可以使用 X-Frame-Options 或 Content-Security-Policy 等安全“响应头”,阻止自己被其他网站以框架的形式展示。

详情

作者的原始描述

Hunt Clickjacking

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4863
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能