Slashdot Mirror


Firefox, Opera Allow Phishing By Data URI Claims New Paper

hypnosec writes "A student at the University of Oslo, Norway has claimed that Phishing attacks can be carried out through the use of URI and users of Firefox and Opera are vulnerable to such attacks. Malicious web pages can be stored into data URIs (Uniform Resource Identifiers) whereby an entire webpage's code can be stuffed into a string, which if clicked on will instruct the browser to unpack the payload and present it to the user in form of a page. This is where the whole thing gets a bit dangerous. In his paper, Phishing by data URI [PDF], Henning Klevjer has claimed that through his method he was able to successfully load the pages on Firefox and Opera. The method however failed on Google Chrome and Internet Explorer."

43 of 151 comments (clear)

  1. Re:Chrome and IE by macraig · · Score: 4, Interesting

    What are some benevolent use cases of these data URIs that justify supporting them? I'm not baiting you, just ignorant and curious.

  2. Re:Chrome and IE by Anonymous Coward · · Score: 3, Informative

    small inline images on a webpage, it saves a separate retrieval of the image. Of course the download is a bit larger since the image is first base64 encoded.

  3. Re:Chrome and IE by bersl2 · · Score: 5, Informative

    it's more about how IE and Chrome don't support DATA uri's

    I'm not actually sure that this is the case. (Change the Wikipedia entry if it's wrong, then.)

  4. Re:Chrome and IE by Anonymous Coward · · Score: 3, Informative

    it's more about how IE and Chrome don't support DATA uri's. the article is stupid. that's what the article really is about, if it supports data uri's or not.

    Chrome and IE both support data URIs. Chrome doesn't allow redirecting to a data URI for this reason

  5. Re:Chrome and IE by macraig · · Score: 4, Insightful

    I've been reading the Wikipedia entry, and if I grasp it correctly there's a distinct negative repercussion to use of them: they could apparently be used to stuff HTML elements into one "get" and possibly defeat all sorts of HTTP proxy filters, ad blockers, and other sundry Web-page tweakers in the process. If that's true, I would not be in favor of their use or support at all. I use all sorts of tools and extensions to "take back the Web"; I don't want to lose the abilities those tools enable.

  6. Wonder if this works on /. by Sqr(twg) · · Score: 3, Funny

    Testing if I can embed

    1. Re:Wonder if this works on /. by Sqr(twg) · · Score: 2

      Nothing seems to happen if I click on the link with firefox. However, I do get to the spoof page if I manually copy the link location and paste it in the address bar.

    2. Re:Wonder if this works on /. by game+kid · · Score: 4, Interesting

      A view-source shows Slashdot transmits the link as data:texthtmlbase64[rest of data], instead of, say, data:text/html;base64;[rest of data], and that change probably breaks the link if the browser didn't already. I'm quite disturbed that /. allowed the [rest of data] anyway (and gave you the legendary Long Comment Modifier for it!), though.

      Indeed, nothing (visible) happens on link click here (probably due to that change) in the latest Nightly or IE9, but make sure your blogs disallow data URIs (or gives them a mighty security check) in public comment sections and such.

      --
      You can hold down the "B" button for continuous firing.
    3. Re:Wonder if this works on /. by Sqr(twg) · · Score: 2

      Nope. Apparently "copy location" doesn't work either. Firefox silently left the clipboard unchanged. (I just happened to already have the URI there from copying it into my previous post.)

      Slasdot does include the data URI in the HTML, but firefox seems to be immune to it.

      (Why doesn't slashdot allow editing of posts?)

    4. Re:Wonder if this works on /. by Vintermann · · Score: 2

      Why doesn't slashdot allow editing of posts?)

      Same reason slashdot doesn't allow unicode: it's based on really old software.

      --
      xkcd is not in the sudoers file. This incident will be reported.
    5. Re:Wonder if this works on /. by mcgrew · · Score: 2

      (Why doesn't slashdot allow editing of posts?)

      Because then you could post an insightful comment, get a +5, and edit it to be Goatse and GNAA. Or you could say something REALLY stupid, and when corrected, edit it to make whoever corrected your stupidity look stupid himself.

      Your editing options are the "preview" button.

  7. Can anyone explain to me why this is worse than by Chrisq · · Score: 2

    Can anyone explain to me why this is worse than serving up the same "malware" on a web page instead of a data URL? The screenshot in the paper clearly shows the url starting "data:text/hml;" instead of http://en.wikipedia.org/ so surely it is just doing the same thing as if I hosted a mock wikipedia login on "mysite.com" - and is a lot less likely to fool people than if I used a domain like wikipediaLogin.com

    1. Re:Can anyone explain to me why this is worse than by Sqr(twg) · · Score: 3, Interesting

      It is worse because you can embed the entire spoof in link-spam, and thus have no need for a domain that could be blacklisted, shut down by authorities, or traced back to you.

    2. Re:Can anyone explain to me why this is worse than by squiggleslash · · Score: 2

      OK, let's go through the options:

      1. Email. You receive email. You click on data: link. Where does phishing form send your crap to?

      2. Forum. You see a message on a forum requesting you log in to Amazon and re-enter your credit card. Wait. What? Anyway, this then takes advantage of the fact it's on a forum, a forum that doesn't have any CAPTCHA type stuff to prevent posting a new message, and nobody notices (a) the original post and (b) the information being posted back to the forum.

      3. One of the other sites on the Int...

      Look, either way, it's sending data that can be blocked. There's little or no difference between this and just getting a throwaway domain and sending people to that.

      I'm trying desperately to find an advantage. One where someone can use this to circumvent the need to have a server that can be shut down. All the ways in which data is passed back require a server that can be shut down. It might not belong to the phisher (but they're already running botnets and stuff, right?) but it needs to exist.

      --
      You are not alone. This is not normal. None of this is normal.
  8. Re:Underlying Operating System ... by Tom · · Score: 5, Informative

    They don't. It's a phishing attack, its intent is to get you to enter your password to some interesting site on a fake of that site. Afterwards, they'd redirect you to the real one or show a bogus error message, and then loot your account there.

    One attack vector against phishing attacks has been to take the site down where the fake is hosted. If the bad guys don't have to host the fake anymore because it is entirely self-contained in the phishing mail you send out through their botnet, then there is one less thing we can do against phishing.

    --
    Assorted stuff I do sometimes: Lemuria.org
  9. Re:Chrome and IE by Tom · · Score: 2, Insightful

    Whatever may or may not be true in regards to IE security, this particular vulnerability does not work on IE because it has a length limit on data URIs, not because anyone thought of it and secured it against it. It's accidental. Chrome is the browser that has an actual security feature preventing this attack.

    --
    Assorted stuff I do sometimes: Lemuria.org
  10. Re:Chrome and IE by Tom · · Score: 4, Informative

    They were originally implemented to contain data inside documents where you need everything to be contained in one file - such as early e-mail systems.

    --
    Assorted stuff I do sometimes: Lemuria.org
  11. Re:Chrome and IE by nomaddamon · · Score: 5, Informative

    Take a website with 100 small images, with average image size 10kb, latency (3-way handshake+data) = 25ms, and your bandwidth = 10Mbit/s

    Using 5 paralel connections (max allowed by http) the site will download in 10/1280*100 + 0,025*20 = 1,28 seconds

    Embeding all images in original document using data URI's (~1.37x overhead to data size but no latency impact), the site will download in 10*100*1,37/1280 = 1,07 seconds

    HTTP2.0 / SPDY will solve this, but it will take many years till they are widely adopted.

  12. Re:In other words... by bloodhawk · · Score: 4, Informative

    nope, it appears to be that both Chrome and IE have other protections around Data URI's, they both implement them. Chrome does it by preventing redirections.

  13. Re:In other words... by furbearntrout · · Score: 3, Interesting

    In other words, IE and Chrome do not implement the data URI to the specification. Lucky them, they can pose now as "more secure".

    I actually read TFS(TFRFC?). IIRC, the standard doesn't specify that an application honor redirects. It would depend on your interpretation of

    "the same security considerations as any implementation of the given media type."

    The passage seems to imply a "default deny" approach.

    --
    Crap. What did the new CSS do with the "Post anonymously" option??
  14. Re:Chrome and IE by macraig · · Score: 3, Interesting

    My worry, if I understand this correctly, is that this could be used as a means to thwart every ad-blocker and page tweaker and HTTP proxy filter in existence. That would not be a good thing at all....

  15. Re:In other words... by micheas · · Score: 2

    If I understand the situation correctly, the situation is that tiny url returns a redirect to a data URI.

    IE and Chrome do not forward from an external URI to a data URI, which considering that the point of data URI's is to reduce http requests, this seems somewhat reasonable.

    It seems to me that the core problem is cross domain 30x redirects being transparent in browsers.

  16. Re:And then what? by bloodhawk · · Score: 2

    It doesn't compromise your browser, it simply allows unsuspecting users to be tricked. hence why it is a phishing vulnerability e.g. a link supposedly to your bank login page, the page looks identical to your bank login page but sends the details to the link authors server where they can harvest your credentials to later empty your bank account while all the time appearing that you clicked on a valid link if you were not paying attention.

  17. Re:Underlying Operating System ... by Tom · · Score: 2

    So, the first thing we did against phishing is still working...

    No, it isn't. For a lot of people it doesn't. It may work for you and me because we understand the technology, but it doesn't for millions of users who don't.

    The issues in phishing are multiple - I've given speeches about some of them - and "don't click those links" as a "solution" is about as good as telling smokers to "just quit already" - there is a small fraction on which that actually works, but for most people it doesn't.

    --
    Assorted stuff I do sometimes: Lemuria.org
  18. Re:Chrome and IE by TheRaven64 · · Score: 3, Interesting

    HTTP2.0 / SPDY will solve this, but it will take many years till they are widely adopted.

    Not entirely. You still need to completely fetch and parse the main web page before you start fetching the images from it. If you use data URLs, then you implicitly fetch them before you even know that you need them. This is one advantage that Flash and Java applets have over JavaScript + HTML + image + sound files. There was some plan for allowing browsers to grab a page plus all of its resources in some kind of container file, but I don't recall it going anywhere.

    --
    I am TheRaven on Soylent News
  19. Re:Chrome and IE by cpicon92 · · Score: 5, Informative

    I'm sorry, but that's downright untrue. See for yourself: https://en.wikipedia.org/wiki/Data_Uri#Web_browser_support

    Microsoft has limited its support to certain "non-navigable" content for security reasons, including concerns that JavaScript embedded in a data URI may not be interpretable by script filters such as those used by web-based email clients. Data URIs must be smaller than 32 KiB in Version 8.

    Version 9 does not have the 32 KiB limit.

  20. Re:Chrome and IE by hairyfeet · · Score: 2

    Oh Lord its Twitter! Long time man, WTF you been up to? I can't believe you made a knockoff of my user ID, hell you made knock offs of Macthorpe and all the other old timers so I was starting to feel left out there, nice to see I'm well regarded enough to rip off, thanks.

    As for TFA that's why i give my customers Comodo Dragon, based on Chromium but without all the Google phone home bits. the new IE may be secure but frankly who gives a rat's ass, when the refused to backport it to their STILL UNDER SUPPORT operating systems like XP (and isn't the next version only gonna work on 7 & 8?) it became completely useless as far as I'm concerned.

    With Dragon you can run any Windows from XP-8 and have the same browser synced so it all "just works" which is nice and as a bonus you have any problems their devs are constantly on their forums and are quick to get back to you with help.

    --
    ACs don't waste your time replying, your posts are never seen by me.
  21. Re:Chrome and IE by psmears · · Score: 4, Informative

    and a guy is likely to link the link rather than be redirected to one in the first place, no?

    No - that was one of the points of the article.

    Increasingly the source of phishing URLs is social media rather than email. In tweets (and to a lesser extent on other social media) it's common to send a shortened URL (tinyurl, bit.ly, goo.gl etc) that redirects to the actual URL, and consequently users won't be surprised to receive such a short URL, and will probably click on it - whereas if they received a massively long "data:" URL with lots of base64 data after it, their suspicions would be more likely to be raised...

  22. Re:Chrome and IE by slacka · · Score: 3, Informative

    it's more about how IE and Chrome don't support DATA uri's. the article is stupid. that's what the article really is about, if it supports data uri's or not.

    WRONG! From the PDF:
    "In Google Chrome in particular, a control for unsafe redirection is im-
    plemented, disabling the user direct access to a data URI if that URI is
    the target of a redirection, such as from a URL shortening service."
      "Internet Explorer has a limit to data URIs,"
    Google Chrome and IE have implemented security features to prevent this form of attack.

  23. Re:Chrome and IE by Anonymous Coward · · Score: 2, Informative

    One use case is the local generation of downloadable content. For example, if you generate a sound file with Javascript, you can present the file as a clickable link that will allow the user to save the file, without first sending all the data to the server and then downloading it from there. A DTMF sequence generator could be written as a 100% client side script. An image processing script could likewise allow the user to save the edited image locally. There exist Javascript libraries for that purpose which convert HTML5 canvases into data URIs.

    Generally data URIs come in handy when a roundtrip to the server is undesirable. Many use cases have different solutions now ("sprite collections" instead of many small files in web design, MIME embedded images in email.) Unfortunately, the potential for mischief has been quite obvious for a long time, because data URIs avoid many detection schemes by avoiding the server roundtrip, and consequently they have fallen from grace somewhat and saw no further improvement. You can't even suggest a filename if you use data URIs as a downloadable link.

  24. Re:Chrome and IE by higuita · · Score: 4, Insightful

    sandboxing is just another layer of security, it isnt a silver bullet solution... in fact many times (like in chrome) is used as a excuse to not proper check things and do a more careless development (from the security point of view). all is well until someone finds a way to break out the sandbox (just look at the recent java security problems) and then you can use one of the many holes to hop jump the sandbox and reach the OS.
    Firefox mostly dont have sandbox, but have many other proper security checks that other lack, and its secure because of then. Of course sandbox is yet another layer that should exist and they are slowly sandboxing key areas. Its harder because they want to support various OS at the same level where chrome have a full sandbox in windows but a lot weaker one in linux (see https://code.google.com/p/chromium/wiki/LinuxSandboxing and https://code.google.com/p/chromium/wiki/LinuxSUIDSandbox... things might be better when seccomp is enabled by default in chrome)

    So yes, sandbox is good, but should not be trusted as the main security barrier in one application, other checks are always needed.

    --
    Higuita
  25. Re:Chrome and IE by Lazy+Jones · · Score: 2

    OTOH if those small images can be cached, the advantage of using data-URIs disappears (is negated) on the 2nd time someone visits the page. So I don't think it's a very good idea to do it in this case.

    --
    "I love my job, but I hate talking to people like you" (Freddie Mercury)
  26. Re:Underlying Operating System ... by Robert+Zenz · · Score: 2

    No, it isn't. For a lot of people it doesn't. It may work for you and me because we understand the technology, but it doesn't for millions of users who don't.

    People who are falling for E-Mail scam would also fall for it they'd receive it via mail, or get a phone call...or if you suddenly stand at their doorstep. Heck, some of them even would fall for it if you talk to them in a public park.

  27. Re:Chrome and IE by nomaddamon · · Score: 3, Informative

    In some cases, data-URI might be still faster (though less bw-effective), i.e if you take the original example and account for 54ms latency (3way handshake+initial response packet) then reloading the page (with all images cached) would take 0,054*20=1,08s since a query to the server for each image is still required

    When using high-latency - high-throughput connection (i.e. mobile, satellite) then data-URI will be a lot faster than caching.

  28. Re:Chrome and IE by e70838 · · Score: 2

    I never click on a shortened URL. Maybe I am too old :-(

  29. Re:Underlying Operating System ... by Tom · · Score: 3, Insightful

    If it would work, we would see a considerable decline in phishing activities and success, because we (i.e. the IT security industry) have been telling that line to users for about a decade now.

    All the statistics I have available show no such decline. The Verizon data breach report is publicly available and has been saying on and off for many years that phishing is still an issue, is getting bigger, is not decreasing as much as everyone had hoped, etc. etc.

    Fact: Phishing still works enough to be a big industry.
    Fact: We've been saying "don't click on e-mail links" to users for 10+ years.
    Fact: The IQ 100 median norm has slightly increased during that time.

    Conclusion: People are dumb is not a sufficient answer.

    Addendum: Humanity has used lots and lots and lots of stuff in its history that didn't work. Raindances, homeopathy, coins for the ferryman, need I go on?

    --
    Assorted stuff I do sometimes: Lemuria.org
  30. Re:Chrome and IE by someones · · Score: 2

    Your argument is invalid.
    Most of us are using http1.1 which has connection keep alive.
    That would make your example 0.80625 seconds where uris would still need 1,07 seconds.
    Also if you live somewhere where you need 25ms for a tcp handshake to complete, consider changing your ISP.

  31. Re:Chrome and IE by Ambassador+Kosh · · Score: 5, Informative

    The best use case I know of is to inline all your small images you use for styling the site in the master stylesheet for the website. This way you only have one request instead of the hundred plus that many sites have.

    Based on some tests I have done on many sites the vast majority of the time is spent on just getting 304s back on all the resources that have not changed. Inlining those small images can save 90% or more of the page load time.

    --
    Computer modeling for biotech drug manufacturing is HARD! :)
  32. Re:Chrome and IE by RobbieThe1st · · Score: 3, Informative

    It would block proxy filters and adblockers, /if/ the ads were kept onsite(which is one of the main problems with most ads today - loading them from offsite takes ages). Otherwise, any browser-based tools will simply treat it like a image/object from the page which can then be blocked accordingly. It will be loaded, but the extra KB or so in the single main page request won't really affect load time on anything but dialup, and the time will be far less than if the image was seperate.

  33. Re:Chrome and IE by The+MAZZTer · · Score: 2

    If your webserver supports GZIP compression in HTTP responses the difference might not be too bad.

  34. Re:Chrome and IE by sootman · · Score: 2

    And they're AWESOME for packing a few small images into a CSS file to save round-trips to the server and make life MUCH better on mobile devices with high latency.

    --
    Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
  35. To clarify by hennikl · · Score: 4, Interesting

    As the author of the cited paper, I feel that I have to clarify a few issues here: As well as Opera and Firefox, GOOGLE CHROME ALSO "suffers" from the ability to host data URIs. It just distrusts being redirected to one. IE (it is said) has a size limit to data URIs of 32 KB. However, in my tests, a ~26 KB URI was tried, unsuccessfully. The data URI phishing pages can be made in many ways, differing in how they use other data. One can make a true offline (or local) version of a web page if all linked content on the page is contained in the "root page" through yet another data URI. If the data URI web pages are presented on a computer running a related trojan program, this program may handle the communication of the "secret information" (credit card #, passwords, etc.). This can be done P2P (as in botnets) thus no need for server infrastructure. Another issue I'm discussing in my paper (http://klevjers.com/papers/phishing.pdf) is that of ownership to the data URI contents. I feel TinyURL unwittingly takes ownership of whatever content that is hosted there, as they store the entire (phishing) web page on their servers.

  36. Re:Chrome and IE by courtarro · · Score: 2

    To solve this latency problem, most well-designed websites use a single large GIF or PNG for all their tiny CSS images, then slice the image to indicate each independent icon, border, etc. This not only reduces the total image overhead but also greatly reduces the total number of 304s to receive.

    Example: one of Facebook's icon resource files