A browser-in-the-browser (BitB) attack draws a fake sign-in pop-up, with address bar and padlock, inside a web page to steal passwords. How to spot it.
A browser-in-the-browser (BitB) attack draws a fake pop-up window inside an ordinary web page, complete with a title bar, a padlock, and a trusted address like accounts.google.com. The "window" is just HTML and CSS on the attacker's page, so whatever the user types into it goes straight to the attacker.
It works because single sign-on trained everyone to expect a login window to pop up over a site when they click "Sign in with Google" or "Sign in with Microsoft." The researcher mr.d0x published the technique and ready-to-use templates in March 2022, describing a page that "simulates a browser window within the browser to spoof a legitimate domain" and noting that "very few people would notice the slight differences between the two" (mr.d0x). The templates are public, so the barrier to entry is low.
How a browser-in-the-browser attack works
- The lure page. The victim lands on a site with a reason to sign in: a giveaway, a shared document, a tournament registration.
- The click. They press a "Sign in with..." button. A link can even show a real domain when hovered, while a script quietly opens the fake window instead of following it.
- The fake window. Group-IB broke the kits it studied into three parts: a header with window control buttons, a fake address bar showing the legitimate URL and a padlock, and an iframe that loads the attacker's login form.
- The capture. The user signs in. The attacker's server can check the credentials against the real service in real time and ask for the 2FA or SMS code next, depending on what the real service demands.
- The takeover. With a valid password and code, the attacker signs in and can lock the victim out by changing recovery details.
Real-world examples
- Steam account theft. In September 2022 Group-IB reported a BitB campaign against Steam users, lured with tournament invitations, discounted tickets, and free in-game items (Group-IB). Its CERT found "more than 150 fraudulent resources mimicking Steam" in July of that year, and noted that "the fake window always displays an SSL certificate lock symbol." High-profile player accounts were valued at $100,000 to $300,000.
- Public templates. mr.d0x's 2022 post shipped templates for common pop-up styles, so a convincing fake window takes no design work.
Warning signs and detection signals
Most of these checks come from Group-IB's guidance. They work because a fake window cannot behave like a real one:
- Drag it. A fake window cannot be moved outside the browser window it lives in.
- Check the taskbar. A real pop-up appears as its own window; a fake one does not.
- Minimize it. On a fake window the "minimize" button tends to close it.
- Click the padlock. A real browser shows certificate details; a fake padlock does nothing.
- Try the address bar. A fake one is not editable or does not behave like the browser's own.
- Watch the password manager. It will not offer to fill, because the page's real domain is the attacker's.
For a SOC, the signals are an iframe login form on a page that is not your identity provider, credential posts to unexpected hosts, and window-chrome images or CSS embedded in a page that has no reason to draw them.
How Surface stops it
Surface Vision checks the page the user is actually on, and a BitB kit still has to put a login form there.
- Kit signatures. Surface's phishing kit signatures include a browser-in-the-browser category.
- Page checks. Lookalike and homoglyph domain detection, visual similarity, and cloned-page fingerprinting run on the page itself, not on the address bar the kit draws.
- Local and resilient. Detection runs in the browser and keeps working if the Surface server is down.
Surface also tracks passkey adoption so you can measure your phishing-resistant sign-in rate. Passkeys are bound to the real site's origin, so a fake window on another domain has nothing to capture. For the wider program, see phishing and social engineering defense.
If it already happened
- Reset the password and revoke active sessions for the account the user signed into.
- Check what changed. Look for new recovery emails, phone numbers, MFA methods, and connected apps, and roll back anything the user did not add.
- Rotate reused passwords. If the same password works anywhere else, change it there too.
- Block the lure domain and search browser and proxy logs for other users who reached it.
- Move high-value accounts to passkeys or FIDO2 keys, which do not sign in to the wrong origin.
Related techniques: AiTM phishing, consent phishing, and HTML smuggling.