9 ms·
Using the HTML5 Fullscreen API for Phishing Attacks
- anonymfus 14y agoSo many people there write about warnings... Imagine you opened new fresh HTML5-based game. It requested fullscreen, you allowed. You finished game and clicked on "Exit fullscreen" button. Then, instead of canceling fullscreen mode, you got just perfect illusion of it. Site author created almost complete replacement of your browser or ever your OS UI. So when you created new tab and entered news.ycombinator.com address it was loaded via proxy. May be it's already happened in this demo. Wake up, Neo, and press Esc to exit from Matrix, ...sorry, from Fullscreen Mode.
- jpxxx 14y agoBrilliant, terrifying, wonderfully crafted and well-communicated work. Where do we go from here?
- tlrobinson 14y agoI don't know about your browser, but mine (Chrome 22) showed a very obvious warning that my browser was now in fullscreen mode. I certainly wouldn't be tricked by this, but someone less technically savvy could be.
- chaud 14y agoFirefox has a big warning that asks permission and dims the background, making it difficult to use until you select allow or deny, so it won't work as well with Firefox. Chrome 23 just makes it full screen with a small notice.
- jpxxx 14y agoThis is true, I saw it too. But a popup telling the user to 'Allow Fullscreen?' is semantically equivalent to "Click Yes If You Want To Log On To Your Bank" for most users. The least savvy are UI-blind, a big portion won't realize a transition just occurred, and a great majority of them will not read the warning beyond the first line.
- chaud 14y agoIf that is the case, how is it a significantly worse problem than a regular link to a fake site?
- jpxxx 14y agoFake and malicious URLS can be filtered against and intercepted. This trick dodges those systems... but it still requires a malicious 'source' page to serve it up. Hrm. I imagine all of the payload (save for the return trip) could be put into innocent looking client-side Javascript, but that doesn't get around the fact that someone's still got to serve the JS...
- jpxxx 14y agoYeah, that's all I've got. The only scenario protecting the unsophisticated here is that the malicious javascript (presumably) has to be delivered from some domain, and domain filtering is in full effect almost everywhere. This API means that if a malicious JS can be executed, it's game over for a number of defenses that only communicate visually.
- ricardobeat 14y agoThe domain where this is hosted would get added to the blacklist pretty quickly too.
- feross 14y agoGood question. The key difference is that using the Fullscreen API let's you fake the "green location bar" which, thanks to hundreds of PSAs from the tech community over the years, has become synonymous with "this site is safe and secure".
- ygra 14y agoThe problem is that for many years the browser's chrome/UI was in fact a place not hijackable by web sites. In contrast to things that appear within the normal client area as the often-spoofed yellowish notification bar of old Internet Explorer versions (the newer one at the bottom now sees this as well). I think Firefox opted for a very deliberate design in security-critical cases that will always appear from within the chrome and never overlay the page in a way that could be spoofed by clever CSS. Of course, now with pages requesting to go fullscreen there isn't a browser UI anymore that could show things that cannot normally appear in the page content. Hitting F11 previously at least was something no web page could ever do by itself. On the other hand, having to wade through warnings like Firefox' SSL warnings probably scares away users from fullscreen games and developers from using the feature. I wouldn't really have an answer to anything of that. I don't even know whether I embedded a question, I think it was just rambling :-)
- mistercow 14y agoBoth Chrome and Firefox show warnings when a page uses the fullsrceen API. Is there a browser out there that doesn't?
- feross 14y agoThe latest version of Safari shows no warning on fullscreen, making users very vulnerable. The only indication is a short, half-second animation (it's much shorter than the usual OS X fullscreen animation). After that, there's no indication that you're in fullscreen mode.
- othermaciej 14y agoSafari also completely disallows keyboard input in fullscreen mode, which majorly mitigates the vulnerability.
- mistercow 14y agoDoes it also disable using any kind of keyboard event? Because if so, that cuts out a ton of legitimate use cases for full screen. If not, it just makes the vulnerability slightly more of a pain to exploit.
- andrewfelix 14y agoThe demo you've put together is very nice. It even accounts for the different UI styling of individual browsers. However in all cases that the link worked, I received a very large warning that has to be manually dismissed. This is not a rhetorical question; do you think people would ignore the warning and continue to use the site? An easier phishing technique would be to manipulate the address to appear legitimate using pushState.
- feross 14y ago"do you think people would ignore the warning and continue to use the site?" I actually made this demo back in April but just got around to posting about it now. In the meantime, Firefox and Chrome have made their warning messages more prominent. Still, I think it's a pretty major issue. Experienced web users won't be fooled by something like this. But, even if 1% of users are fooled by this technique, that's still potentially thousands of innocent web users, which I think is unacceptable.
- yati 14y agoExactly, and the dumbness to smartness ration in this world is very high, so a serious attack is likely to affect far more than 1% of the visitors :O
- jpxxx 14y agoThe words 'dumb' and 'smart' are inflammatory and useless in this context. A substantial portion of desktop Internet users will click anything that comes up in order to get to their destination. This attack triggers no 'warning' that would cause the user unease. The most obnoxious case is Firefox presenting "Allow or Deny Fullscreen?" a question that doesn't imply any danger or downside. A number of victims might even see it as a new kind of convenience, since their phone and tablet already do everything in fullscreen.
- shock3naw 14y agoTo corroborate your point, one of the Chromium developers spoke about this sort of problem, but in the context of invalid SSL certificates and the associated warning that Chrome displays. A ridiculous percentage of users ignored the warning that the site they were visiting wasn't verified and simply clicked 'Visit this site anyway.' Most users don't understand that there are potentially serious costs to ignoring security warnings.
- yati 14y agoGreat job! But originally, I opened that link in a new tab while I was still reading the article. It obviously did not work :P I've this habit of opening most links in a new tab!
- Zancarius 14y agoSame here. I have an addiction to opening everything remotely interesting in a new tab, and my initial reaction was "I don't think this worked?" Otherwise, it's pretty frightening, because I can imagine that in spite of the browser warnings, there are many non-savvy users who probably wouldn't give it a second thought. As a KDE user, the blatant Gnome UI was kind of glaring but otherwise well done. ;)
- yati 14y agohaha, this indeed is frightening, and intelligent designers will push this to do something really neat. Let's hope it's a POC and not a real attack. Let us not forget that there are far more dumb people than smart people on our planet! ;)
- esolyt 14y agoNot even Gnome. It is Ubuntu interface. I guess they were assuming most Linux users are Ubuntu users.
- feross 14y agoYep, that's what I assumed. :) Also, for a proof-of-concept you're lucky I even took screenshots in any Linux ;)
- skeletonjelly 14y agoI did the same (new tab) and thought "oohh it looks and reacts just like the real thing!". Had to read a bit more to see what I was meant to do.
- improv32 14y agoNot working for me. Chrome 22.0.1229.92 on Win 8 RTM It doesn't go full screen at all, it just stays in the window normally.
- w00kie 14y agoGoogle Chrome asks for authorization to enter fullscreen mode. I've updated my browser this morning to Version 22.0.1229.92 m, is it new?
- esolyt 14y agoUpdated just now. 22.0.1229.92 on Linux does not ask for authorization but it displays a permanent notification.
- AngryParsley 14y agoThat's clever. It was pretty obvious to me, since I run Chrome in presentation mode (no UI elements visible) and Chrome popped up a dialog box telling me about the switch to full-screen mode. Still, I can see how a lot of people could be tricked by this. I can't think of a better solution than extant phishing site blacklists. Full-screen mode can be useful, but it and other HTML5 features can be used for phishing or to generally annoy users. I'm wondering how soon it will be before someone makes the HTML5-equivalent of ClickToFlash.
- skeletonjelly 14y agoBy presentation mode you mean fullscreen (F11)? I had a quick search and couldn't find anything conclusive. It's an OSX specific thing?
- AngryParsley 14y agoI don't have a Windows machine or VM, but it looks like full-screen mode on Linux is the same as presentation mode on OS X: the UI is completely hidden unless you move the mouse to the top of the screen. In addition to presentation mode, Chrome for OS X has a separate full-screen mode that always shows the tabs and buttons.
- skeletonjelly 14y agoThanks! Looks like Chrome doesn't do this on Windows but it's similar to how Firefox has always done fullscreen.
- FooBarWidget 14y agoIn OS X, "Full screen" triggers the Lion native full screen mechanism. In this mode Chrome is full-screen but you still see the toolbar. "Presentation mode" is more like what "Full screen" did before Lion, or how full screen behaves on other OSes: no toolbar.
- wtallis 14y agoNoScript already inherently blocks this, and even if you allow the domain that provides the script that tries to go full-screen, and allow the full-screen transition, the web page pretending to be a desktop doesn't cover the NoScript toolbar that's still prompting for permissions on the other domains. I suspect the anti-clickjacking measures would kick in if the phishing site tried to incorporate the real site as a base layer. NoScript does not seem to have any features targeted directly at HTML5 fullscreen, though.
- jeswin 14y agoThe concept is clever, and very interesting. However, most users (even experienced users) don't look at the url when visiting information-sensitive websites and www.bankofamerica.fsh4.com would still not alarm them. They don't understand the SSL icon either.
- ygra 14y agoThere was an interesting research a few years ago regarding the SSL icon. Since in many users the idea is actually finely-ingrained that a padlock means security on a website they just made the favicon into a lock. A surprisingly large number of users was fooled by that. I guess the "padlock means secure" has been superceded a little by "address bar is green somewhere" by now, but the problem remains the same.
- shardling 14y agoThat's why Firefox no longer has the favicon in the URL bar.
- deleted 14y ago[deleted]
- damncabbage 14y agoThe user can hover their mouse over the link and their status bar will show https://www.bankofamerica.com, as expected. Google search results use a similar technique to show you the "right" link when you hover. (It's only when you click the link does it muck around with the DOM to insert the google.com/... redirect link.)
- feross 14y agoYep. Try Right Click > Copy Link Address. It copies the google.com/... redirect link, which is how I first learned that they were doing this.
- damncabbage 14y agoTo see how it works: * Open a search in Chrome, and open up the Inspector (making sure not to right-click any links you want to inspect), * Find an <a href="..."> tag for a search result. * Right-click the tag in the Inspector, go Break On... => Attributes Modifications. * Right-click the link like you usually would to copy it, and see what happens.
- peterjmag 14y agoThat's not what's happening here though. The JS in the demo doesn't change the href attribute of the link, it just adds an event handler that prevents the real link from loading using e.preventDefault() and then triggers full screen.
- damncabbage 14y agoSorry, I wasn't very clear; I'm just saying that both this and Google Search spoofs the status bar by obscuring what a link will do until it's clicked.
- guelo 14y agoThis is pissing me off. The link hover should be sacred, browsers shouldn't allow any trickery there.
- SwaroopH 14y agoHow about onscreen keyboards? They will still work, right? Funny how they are supposed to "beef up" security.
- isalmon 14y agoIt does not work when you open the link in a new tab. The font on the screenshot is not the same that I have when I go to their website, so that would alarm me. Otherwise it's pretty clever.
- nikcub 14y agoWhen the standard was being ratified, this came up on the mailing list (I can't find the link right now, I am on my cell). The solution was that to recommend vendors print warning labels across the top or add a layer of permissions around the feature - which Chrome and Safari have done. for eg. when I open it I get a message saying 'Chrome is currently in fullscreen mode'. They will likely both also add permission boxes similar to when the browser requests your location. It is good for developers to understand this, though, but I wouldn't say that the spec is broken, or that this is a bad feature, it can be implemented securely and with warnings. Anti-phishing education for users should involve primarily talking about not trusting links anywhere and typing in the address directly. Edit: Here it is from the Spec: http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#security-and-privacy-considerations http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#... > 7. Security and Privacy Considerations > User agents should ensure, e.g. by means of an overlay, that the end user is aware something is displayed fullscreen. User agents should provide a means of exiting fullscreen that always works and advertise this to the user. This is to prevent a site from spoofing the end user by recreating the user agent or even operating system environment when fullscreen. See also the definition of requestFullscreen(). > To prevent embedded content from going fullscreen only embedded content specifically allowed via the allowfullscreen attribute of the HTML iframe element will be able to go fullscreen. This prevents untrusted content from going fullscreen. I am most familiar with Safari and Chrome (have been meaning to get up-to-date with Firefox, which has had a lot of good work put into it) but all of the major browser vendors have done something around this in their own way with both desktop and mobile releases. It is at the discretion of each vendor how they implement security warnings or settings around full screen mode. They all have slightly different implementations but the end result is that they go some way towards preventing a phishing attack using Fullscreen. That said, it was a good idea to bring this issue to the attention of developers and users as a potential attack vector and as a demonstration of why the security dialogs are important. Edit II: The whatwg thread where the security considerations are discussed begins here: http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-December/024582.html http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-Dec... The first post rightly points out that Flash had the feature implemented in a non-secure manner for a long time.
- cfinke 14y ago
- est 14y agoonly works if you browse in maximum window browsers.
- jkeesh 14y agoWow Feross. Another sweet demo. I still feel like there is so much to learn about security, but what I am always amazed at is that the "social engineering" attacks seem to be the problems that we can never solve. Yes, there is a technical component (HTML5 full screen api), but at its core this is a phishing attack, a "fool the user" attack, and not an actual technical security flaw. Basically, if I wasn't paying attention, I feel like this was good enough to fool me. What can be done to save the casual, but maybe unfortunately inept internet user?
- feross 14y agoThanks Jeremy! "What can be done to save the casual, but maybe unfortunately inept internet user?" That's a really good question and unfortunately I don't think anyone has a good answer.
- cdi 14y agoOn linux it tries to emulate Ubuntu with default settings, while I have Cinnamon and different theme and fonts, different user name. Didn't terrify me.
- antihero 14y agoBut then, people with custom WMs and whatnot (I'm using herbstluft WM and Zukitwo) aren't exactly the target market are they.
- blaines 14y agoI think the "Door Study" [1] was the best part! It's hilarious, and horrible that the guy didn't notice the swap. Maybe I've just lived in a big city long enough that I'm not surprised by the World Famous Bushman [2] or people's swindling. [1] http://www.youtube.com/watch?v=FWSxSQsspiQ&feature=player_embedded http://www.youtube.com/watch?v=FWSxSQsspiQ&feature=playe... [2] http://en.wikipedia.org/wiki/World_Famous_Bushman http://en.wikipedia.org/wiki/World_Famous_Bushman
- feross 14y agoI saw the World Famous Bushman in SF last year -- I had no idea that he was "world famous" and had his own Wikipedia article! Neat.
- geon 14y agoI was thinking the door-guy-swap footage where the victim noticed the swap must be perfect material for "Just for Laughs" [1]. Inversely, the "failed" Just for Laughs-material where the victims don't react must be perfect research material. [1] http://www.youtube.com/watch?v=662KGcqjT5Q http://www.youtube.com/watch?v=662KGcqjT5Q
- sesqu 14y agoDerren Brown did a couple of bits on the door study that you might enjoy: https://www.youtube.com/watch?v=vBPG_OBgTWg https://www.youtube.com/watch?v=vBPG_OBgTWg
- amadeus 14y ago[firstWorldProtection]Not rMBP optimized. Was painfully obvious to spot[/firstWorldProtection]
- skeletonjelly 14y agoFunnily enough Safari is the only browser that doesn't alert the user about fullscreen mode. http://imgur.com/a/jdcI7 http://imgur.com/a/jdcI7 (via cfinke)
- feross 14y agoLOL. I took the screenshots before I had a rMBP and didn't bother to update them. I figured I'd get called out on this :)
- borlak 14y agoA similar issue was shown when Adobe Flash fullscreen was first introduced (I think it was just Macromedia at the time, but anyway). When you went to fullscreen in flash, it printed a giant "you are now in fullscreen mode" in the middle of the screen, but somebody showed that simply by printing similar text all over your screen, it hid that warning very well.
- hatu 14y agoYeah but nowadays you can't use the keyboard while fullscreen in Flash do prevent this type of phishing.
- jmitcheson 14y agoYou're being a bit disingenuous by not mentioning the inbuilt protections that the HTML5 Fullscreen API offers. "Also, any alphanumeric keyboard input while in full-screen mode causes a warning message to appear; this is done to help guard against phishing attacks. The following keys are the only ones that don't cause this warning message to appear (...)" (https://developer.mozilla.org/en-US/docs/DOM/Using_full-screen_mode https://developer.mozilla.org/en-US/docs/DOM/Using_full-scre...) The article and demo are nice though. Good work.
- feross 14y agoThat documentation is out-of-date. There were no warnings on keyboard input in Firefox or Chrome. I went fullscreen on a Facebook photo and was able to leave a comment without any issues. Safari, on the other hand, appears to prevent keyboard input, which I just recently found out.
- statictype 14y agoCompletely unrelated, I'm going to configure my build process to play that awesome mario death music when a build fails.
- fmavituna 14y agoChromeless windows issues all over again. I don't know why people don't get their lessons from history. In 2004 pretty much the same vulnerability exploited in IE and later on this feature removed from IE: http://www.kb.cert.org/vuls/id/490708 http://www.kb.cert.org/vuls/id/490708
- jiggy2011 14y agoThere will always be ways of exploiting things like this. Perhaps the solution could be to handle this at the network level. In other words create what is effectively a "personal information firewall" built into the browser. Have the browser detect when certain information is about to be send over the network, it would need to be checked prior to being passed to SSL. Things that fit formats like CC numbers or authorisation codes for banks. There could then be a prompt appear on top of all active windows saying "A CC number is about to be sent to xxx" Allow/Deny. I suppose this would be difficult because phishers could re-encode data using JS into some other format before it is sent. So you would need some of mapping keyboard inputs to networking events.
- eslaught 14y agoThis has been solved with information flow security (see [1]), but the problem is that performance degrades enough that no one actually uses it. [1]: http://cseweb.ucsd.edu/~lerner/papers/pldi09-sif.pdf http://cseweb.ucsd.edu/~lerner/papers/pldi09-sif.pdf
- cryptbe 14y agoPretty nice demo. The fullscreen notification can be fake with either bankofarnerica.com or http://en.wikipedia.org/wiki/IDN_homograph_attack http://en.wikipedia.org/wiki/IDN_homograph_attack.
- vog 14y agoUnfortunately, the site is down: Iceweasel can't establish a connection to the server at www.feross.org.
- feross 14y agoSite is still up. Are you, by chance, using HTTPS Everywhere? I think they have an erroneous rule about my site which redirects you to https:// https:// which I no longer provide.
- lucian1900 14y agoHeh, at first I middle-clicked the link as usual and it took me to the real website. I was wondering what it's all about.
- danboarder 14y agoListing the actual URL(s) to be loaded in an "Allow Full Screen?" warning dialogue would go a long way in addressing this issue.
- chinchang 14y agoI really liked the mario sfx on clicking the browser UI :P neaatt!
- drfloob 14y agoThank you, Xmonad, for not supporting chrome fullscreen in your default configuration.
- yen223 14y agoThat...is a feature?
- antsam 14y agoHm. As soon as I clicked it, Firefox (or possibly one of my plugins) gave me a warning that feross.org was trying to enter into full screen mode.
- deleted 14y ago[deleted]
- deleted 14y ago[deleted]
- boop 14y agoI am not sure why this is on Github? Typically, I applaud when anything is shared on Github. But why this? What positive value is it to anyone other then script kiddies? (Certainly, most any adequate web developer with nefarious intensions would be able to reproduce this quite easily. But why make it point-and-click easy for them?)
- EGreg 14y agoI once sent a letter to Steve Jobs saying that the MacOS (and other operating systems) were susceptible to phishing by applications, which would simply present a dialog that looks very much like the System Security dialog, and thereby gain the user's root password. The solution is to have an area where only the operating system can draw (and which cannot be screen-captured, the same way Apple currently does with DRM movies). In this area, the system would present to the user a phrase which the user selected when setting up their account. This would prevent phishing, as users would be trained to look for the phrase (and / or icon ... the reason you can't have an icon alone is because the phisher could get it right 1 out of N times). Now, on the web there is a similar thing you can do! When someone places KEYBOARD FOCUS in your password box, and starts typing the correct password, you display the icon + phrase that you previously selected when setting up your account. If the phrase doesn't pop up or is different, you know you're being phished. THIS is a great way to stop phishing on the web. Anyone impersonating you will not know what phrase to display. Only by starting to type the correct pass phrase will they get this information. On the other hand, they won't be able to place anything fake over the password input box and capture your input, because the phrase only appears when you type IN the password input box, which the attacker can't get to, thanks to the cross-domain security in browsers!
- pbhjpbhj 14y agoYahoo do something like this, they display a per user image on the login, presumably using cookies?
- EGreg 14y agoThe only thing is, if you don't wait until the user starts entering the password, the attacker can theoretically scrape the page with your username and find out the per-user image.
- pbhjpbhj 14y agoYou don't get the image based on the username, the image is stored as a cookie, so it's showing you that the Yahoo you logged in to this time is the one that new your cookie details before. Even if an attack-site can read your cookie they don't know which image to pair it with (though maybe it can be taken from a local cache somehow?). The image is a per-device (or per browser?) security indication. Details - https://protect.login.yahoo.com/login/set_pref?faq=1#faq2 https://protect.login.yahoo.com/login/set_pref?faq=1#faq2, it's called "yahoo sign-in seal".
- jrabone 14y agoFor login screens, this is the problem that the Secure Attention Key (http://en.wikipedia.org/wiki/Secure_attention_key http://en.wikipedia.org/wiki/Secure_attention_key) was intended to solve. IMO this is why the constant pushing of the browser as a platform is more trouble than it's worth. Everything that your OS does now will be re-invented (badly, several times) in one or more of the different web-browsers, lost, found, queried in triplicate, standardised before finally being recycled as firelighter when the next "paradigm shift" takes over.
- chayesfss 14y agoVery cool proof of concept
- taejo 14y ago> It’s important that the fake OS and browser UI match the user’s system. Actually, it isn't, at least for some users. More than one member of my family has fallen for the "your computer has a virus" scams, which use Windows chrome, on Ubuntu machines.
- joekrill 14y agoI really wish people wouldn't play random, unexpected sound effects from their websites. Now my entire office thinks I was playing Super Mario Bros.
- fiatpandas 14y agoHigh DPI users may detect something isn't right, since the technique doesn't take into account DPI setting (the fake firefox bar presented to me was much smaller than what I'm used to)
- bpatrianakos 14y agoIts really annoying and alarming to hear technical people rebut this with "Well I could tell the difference because I noticed my browser changed and my super customized desktop settings weren't reproduced, and plus it says "now in full screen mode", etc.". Its alarming because this type of response just goes to show that the people creating things for the web are so completely out of touch with real users. There's this weird idea among developers that users know how to use technology just like we do when in fact they don't even know which website handles their email half the time, think Google is the internet, use the browser search bar to type full URLs even though the actual address bar is 10 pixels to the left, and will blame you for giving them a virus because you changed their desktop wallpaper and not because of all those shady links to foreign lotteries they were clicking in their email which they were lucky to find in the first place. Yeah, you can tell the difference. I could tell the difference. Yes it was very obvious even though the demo was very accurate in reproducing my browser's chrome. But the rest of the world is nothing like us. Feross says 10% will be tricked. I think that's a very conservative estimate. I wouldn't be surprised is the numbers went above 50%. If this sort of attack becomes common then I bet you anything that the majority of users will be tricked just because full screen is not very common. You'll say full screen is common but again, you're thinking of people just like you who are in the minority. Most people have never seen a website in full screen mode. Even with Facebook's full screen option it doesn't mean your parents are clicking that option or have even noticed it yet. I'm actually building an app currently that greatly benefits from the full screen API and I really hope vendors don't start putting more restrictions on it. Instead I'm hoping there's a way to make full screen more common in legitimate ways, get users used to full screen mode so they are aware of it and know what the little "Now in full screen mode" dialog means. Sure, people will still get tricked but I'd bet it would be in far less numbers and that 10% figure Feross throws out there might become more realistic.
- Eisbar 14y agoUltimately I think this can only be solved with an out of band security state indicator. Otherwise you can never quite believe what you see onscreen. Plenty of smartphones already have LEDs. Most keyboards don't use the scroll-lock led.