Lion Cipher Lab

Exploit and fix reverse tabnabbing

Why it matters

Reverse tabnabbing is a quiet, high-trust phishing move. A site you trust (a forum, a docs page, a company intranet) links out to something it does not fully control — a user-submitted post, a partner page, an ad — and opens it in a new tab. If that link does not cut the back-channel, the page that just opened receives a live window.opener handle pointing at the tab you came from. While you read the new tab, the opened page sets window.opener.location to a look-alike login page. You switch back to the original tab, see what looks like the site you trusted asking you to 'log in again,' and…

What you'll learn

Steps in this lab

  1. The vocabulary: new tabs, window.opener, and reverse tabnabbing
  2. Set up: confirm Python, make the folders
  3. Build the VULNERABLE trusted site (opens a link without cutting the opener)
  4. Build the attacker's pages — the opener hijack and the phishing clone
  5. Run the exploit and watch your original tab get hijacked
  6. Fix it: noopener on the LINKING page (anchor rel and window.open option)
  7. Reload the attack and confirm the handle is gone
  8. Judgment: where this really bites, and what does NOT fix it
  9. What you did — and the reflex to keep

Open the full interactive lab →