News for hackers. Stuff that matters.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by eridius on Thursday November 30, 2017 @07:46PM (#15821054)
Wouldn't it make more sense just to fix the URL bar to make data URIs look different? You could even go to the extreme of making it just show "data:…" and requiring you to put focus on it to find out the full URI.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by userbinator on Thursday November 30, 2017 @10:06PM (#15821604)
No kidding... this is a problem they created by hiding/obfuscating the URL scheme. If the majority of URLs you visit start with http:// or https://, then data: stands out like the proverbial sore thumb.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by beefhash on Thursday November 30, 2017 @11:51PM (#15822010)
That requires that you know what you're doing, though. Non-technical people are probably more inclined to think along the lines of "huh, odd, but everything looks fine, so it's probably my fault it looks like that"
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by ascorbic on Friday December 01, 2017 @02:03AM (#15822437)
In that case why bother with using a data url at all? They could just use "www.paypal.com.cgi-bin.webscr.xxxxxxxxx.myevilsite.com"
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by beefhash on Friday December 01, 2017 @06:38AM (#15823254)
That way, they don't have to bother with a domain registration, either. A domain registration is neither free of charge nor entirely free of risk.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by code_duck on Sunday December 03, 2017 @02:07PM (#15838930)
They could just create subdomains on a compromised domain they control belonging to someone else.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by jchw on Friday December 01, 2017 @01:33AM (#15822349)
Did they hide it? I see "https://" in my Firefox.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by daveFNbuck on Friday December 01, 2017 @01:37AM (#15822363)
They show https:// but they hide http://
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by jchw on Friday December 01, 2017 @03:27AM (#15822693)
Oh, I honestly would've missed this, because so few sites I browse are in cleartext anymore. They may as well just display a giant "INSECURE" banner, instead of http://, though.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by johnp_ on Friday December 01, 2017 @07:45AM (#15823463)
FWIW, this recently landed in Firefox Nightly:

security.insecure_connection_icon.enabled

security.insecure_connection_icon.pbmode.enabled

Though it's still disabled by default (currently the insecure connection icon is only shown if a password field is present on a http page / the form action url is http).

Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by Vinnl on Friday December 01, 2017 @07:00AM (#15823324)
They will, and they already do if that page includes a password form field :)
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by discreditable on Thursday November 30, 2017 @03:53PM (#15819417)
I'm glad they aren't blocking explicit entries. This morning I discovered I could quickly send snippets of text to my phone by writing it as a data uri and sending the tab via Fx sync.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by Jach on Thursday November 30, 2017 @04:51PM (#15819900)
On linux boxes, for small snippets I use 'qrencode -t ansi "message"' and use a QR scanner app to read the text to my phone...
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by Mayzie on Thursday November 30, 2017 @11:46PM (#15821982)
Alternatively for Android, you could enable KDE Connect[1] and copy the text to the clipboard (which will then be copied to the Android clipboard, and vice-versa). Or easily put it in a file and transfer it over to your device.

[1] - https://community.kde.org/KDEConnect

Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by yoodenvranx on Friday December 01, 2017 @02:27AM (#15822512)
KDE Connect is one of the programs I can't live without anymore!
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by muxator on Thursday November 30, 2017 @05:38PM (#15820288)
I used to do exactly the same, but using a Firefox extension [0]. Since it is not compatible with quantum, I am writing my own, but it's still a prototype for now.

[0] https://addons.mozilla.org/en-US/firefox/addon/offlineqr/

Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by Bromskloss on Thursday November 30, 2017 @10:05PM (#15821592)
That's cool! Do you know where I can find documentation of the "-t" option? The following is all I find, and I'm not sure what all the variants mean:

    -t {PNG,EPS,SVG,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8}
                 specify the type of the generated image. (default=PNG)
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by digi_owl on Thursday November 30, 2017 @10:11PM (#15821621)
The only one i do not recognize in some way is EPS. The rest are either image formats(PNG, SVG), or various character encodings (all the rest).
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by daurnimator on Thursday November 30, 2017 @10:16PM (#15821635)
> The only one i do not recognize in some way is EPS.

https://en.wikipedia.org/wiki/Encapsulated_PostScript

Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by tomrod on Thursday November 30, 2017 @04:00PM (#15819486)
That sounds heavily exploitable, in this age of crypto-currency-mining malware
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by dogma1138 on Thursday November 30, 2017 @04:16PM (#15819613)
It is you can embed any binary in a b64 string in the html page and then download it from within the browser.

Since the download happens locally it also will not be logged in your perimeter monitoring and most security appliances do not inspect inline HTML especially from “trusted” domains due to performance limitation.

I’ve used this trick to bypass DLP, local policies and various content filtering appliances multiple times.

Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by code_duck on Sunday December 03, 2017 @02:09PM (#15838934)
I use messaging apps for that.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by tetromino_ on Thursday November 30, 2017 @05:37PM (#15820280)
Depending on how exactly this block works, it may break an important functionality of our application :/

We generate SVG graphs in the browser, and have a button with a data:image/svg+xml URL to allow users to download these graphs, for example to include in a publication.

Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by dfabulich on Thursday November 30, 2017 @05:40PM (#15820300)
You’re fine.

> Whereas the following cases will be allowed:

> • Downloading a data: URL, e.g. ‘save-link-as’ of “data:…”

Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by jacobn on Thursday November 30, 2017 @06:00PM (#15820443)
That sounds like the user will have to right-click and choose "Save As"?
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by chrismorgan on Thursday November 30, 2017 @06:08PM (#15820501)
I presume the `download` attribute will still work, as it’s not navigation:

  <a href="data:image/svg+xml,…" download="filename.svg">
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by tetromino_ on Thursday November 30, 2017 @06:35PM (#15820659)
And that "I presume" instead of "I am quite certain" is precisely why I said I was worried about exactly how this block works. I will need to try with the beta, I suppose.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by potch on Thursday November 30, 2017 @07:31PM (#15820978)
I can confirm <a download> links with data: URIs will work after this change.

I built a test to demonstrate: https://data-uri-test.glitch.me/

Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by tetromino_ on Friday December 01, 2017 @03:26PM (#15827063)
Thanks for checking and the reassurance!
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by potch on Thursday November 30, 2017 @06:46PM (#15820726)
Hello! I work at Mozilla and am figuring out those exact particulars right now. Will update here when I figure out the final decision re: <a download>
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by daurnimator on Thursday November 30, 2017 @09:21PM (#15821440)
Hrm, I think this will block the only data uri I use: the 'this form' button on http://sprunge.us/
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by rossy on Thursday November 30, 2017 @11:27PM (#15821896)
Yeah, the form on http://sprunge.us/ is blocked for me in Firefox 58.0b7, which is kind of annoying because I used it regularly. If this is a phishing problem, couldn't it be fixed by changing UI rather than breaking functionality?
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by badrabbit on Thursday November 30, 2017 @05:47PM (#15820352)
Thank you so much for this mozilla. It is ridiculously easy to trick even tech savvy users with a data: uri phish.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by theandrewbailey on Thursday November 30, 2017 @04:55PM (#15819929)
Hopefully data:image/ still works for favicons. Embedding a highly compressible ~450 byte string in HTML is faster than issuing a new request, under most instances.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by tinus_hn on Thursday November 30, 2017 @05:26PM (#15820186)
I’m not sure Firefox even uses favicons anymore but that definitely isn’t navigation so it isn’t blocked.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by giancarlostoro on Thursday November 30, 2017 @05:39PM (#15820296)
It does, not sure why you would think it doesn't? I do know chrome gets annoying about them, always requesting a sites favicon even when it doesn't have one listed in the document.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by tinus_hn on Thursday November 30, 2017 @05:58PM (#15820435)
I haven’t seen them in the UI while I remember them being shown quite prominently. I wouldn’t really expect them to be used only for sites added to favorites because that’s a privacy issue.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by giancarlostoro on Thursday November 30, 2017 @10:38PM (#15821717)
Might be a setting in yours, or a plugin of some sort?
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by ErikDub on Friday December 01, 2017 @06:39AM (#15823258)
Your tabs don't show the favicon?
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by arantius on Friday December 01, 2017 @05:46PM (#15828414)
Note that it said "top level" navigation.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by chriswarbo on Thursday November 30, 2017 @07:07PM (#15820840)
Does anyone have a (non-malicious) example of this sort of "attack"? I don't quite get it; some people are mentioning Javascript, but the description sounds more like a phishing, e.g. `data:text/html;base64,MyBank.com/account/xxxxx`

Presumably such leading junk is hidden in the rendered page, making the user think they're on MyBank.com?

Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by tetromino_ on Thursday November 30, 2017 @07:19PM (#15820921)
See https://twitter.com/tomscott/status/812265182646927361

The phishers are using a URL like `data:text/html,https://example.com/account/xxxxx (lots of spaces here) <script>/* phish phish phish */</script>`

You won't see that scary <script> in the URL unless your browser window is super-wide.

Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by gruez on Thursday November 30, 2017 @07:17PM (#15820906)
>Presumably such leading junk is hidden in the rendered page, making the user think they're on MyBank.com?

it's even simpler than that, they add a bunch of spaces after the "fake" url to pad out the actual payload so it doesn't show in the urlbar. any issues with the page content can be fixed with document.write or whatever.

Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by Grollicus on Friday December 01, 2017 @05:37AM (#15823087)
I know of a website that decrypts all its content clientside and uses this (i think) as a mechanism for a user to download his own attachments.

The Idea is that the whole website could be a static file somewhere and the webserver is only a key value store that has no idea what it is saving. Doesn't work that way currently because file:/// doesn't allow ajax calls to somewhere else but that's a solveable problem.

Generally, every download that gets generated clientside by the JS is hit by this

Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by fzzzy on Friday December 01, 2017 @08:30AM (#15823645)
This does not affect downloads of data urls, only navigation to data urls.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by jancsika on Thursday November 30, 2017 @04:44PM (#15819844)
> Opening “data:image/*” in top-level window, unless it’s “data:image/svg+xml”

Just curious-- why the exception for svg?

Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by croddin on Thursday November 30, 2017 @04:52PM (#15819910)
I think they block svg but not other images because svgs can contain javascript and could be used in a phishing attack.

i.e.

  data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'><script>alert('hi')</script></svg>
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by jancsika on Thursday November 30, 2017 @07:59PM (#15821123)
Oh wow, even if you right-click "View Image" the script gets run.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by eximius on Thursday November 30, 2017 @07:57PM (#15821118)
Hm. But will I still be able to open them from the developer console...?
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by ris on Thursday November 30, 2017 @03:46PM (#15819354)
I'm trying to figure out if this will kill Bookmarklets (https://en.wikipedia.org/wiki/Bookmarklet)
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by skykooler on Thursday November 30, 2017 @03:49PM (#15819371)
Bookmarklets use javascript: urls, not data: urls.
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by ris on Thursday November 30, 2017 @04:42PM (#15819818)
So yeah I would have thought so too but am confused over the first few examples of "blocked" he gives...
Re:Blocking Top-Level Navigations to Data URLs for Firefox 58 by DiThi on Thursday November 30, 2017 @06:22PM (#15820583)
Only some bookmarklets that go to a data URL on top level are affected. They should be easy to modify to open them inside an iframe or to replace the existing document instead.