The dangers of having too many tabs open.
How The Attack Works
- A user navigates to your normal looking site.
- You detect when the page has lost its focus and hasn’t been interacted with for a while.
- Replace the favicon with the Gmail favicon, the title with “Gmail: Email from Google”, and the page with a Gmail login look-a-like. This can all be done with just a little bit of Javascript that takes place instantly.
- As the user scans their many open tabs, the favicon and title act as a strong visual cue—memory is malleable and moldable and the user will most likely simply think they left a Gmail tab open. When they click back to the fake Gmail tab, they’ll see the standard Gmail login page, assume they’ve been logged out, and provide their credentials to log in. The attack preys on the perceived immutability of tabs.
- After the user has entered their login information and you’ve sent it back to your server, you redirect them to Gmail. Because they were never logged out in the first place, it will appear as if the login was successful.
Aza Raskin’s Tabnapping is a proof-of-concept for a fiendish attack: a tab that waits until you’re not watching, then turns itself into a convincing Google login screen that you assume you must have opened.
Actually, it’s even sneakier: it can use CSS-based analysis to figure out which websites you login to, and then can use cross-site scripting to reload a different tab — another one that you’re not looking at — to turn itself into a convincing login screen.
To see it in action, check out Aza Raskin’s site, then navigate away in another tab for a little.