Lion Cipher Lab

Exploit and fix clickjacking in your lab

Why it matters

Clickjacking (also called UI redress) is a deceptively simple attack that keeps working against real sites: an attacker loads a target page in an invisible iframe, stacks it on top of a decoy the user WANTS to click ('Play video', 'Claim prize', 'Accept cookies'), and lines up the target's dangerous button — Delete account, Transfer money, Grant this app access — exactly under the decoy. The victim, already logged in to the target in another tab, clicks what looks like the decoy and actually fires the hidden action on their own authenticated session. Nothing looks wrong; there is no phishing…

What you'll learn

Steps in this lab

  1. The vocabulary: framing, clickjacking, and the UI-redress family
  2. Set up: confirm Python, make a folder, install Flask
  3. Build the VULNERABLE victim app (a state-changing button, no framing protection)
  4. Build the attacker page — the transparent-iframe overlay
  5. Run the exploit and watch the click get redressed
  6. Fix it: frame-ancestors 'none' (and X-Frame-Options for old browsers)
  7. Reload the attack and watch the browser refuse the frame
  8. Judgment: 'none' vs 'self' vs an allowlist, and why the other 'fixes' aren't
  9. What you did — and the reflex to keep

Open the full interactive lab →