415 points · by _jomo · 11y ago · 265 comments
A quick Google search found only four:
https://www.mozilla.org/en-US/security/advisories/mfsa2013-9... (another local file disclosure)
https://www.mozilla.org/en-US/security/advisories/mfsa2015-3... (needs to be "combined with a separate vulnerability" to be exploitable)
https://www.mozilla.org/en-US/security/advisories/mfsa2015-6... (needs to be "combined with a separate vulnerability" to be exploitable)
https://www.mozilla.org/en-US/security/advisories/mfsa2015-7... (this one)
It still is looking better than the plugin it replaced.
Exploiting a bug in a memory unsafe language is much harder than writing some JavaScript. It is also much less reliable and platform specific.
The real question is why the hell is Firefox not sandboxed?
Not for long if this keeps up…
Can you clarify what you mean by this?
http://www.sumatrapdfreader.org/free-pdf-reader.html
Not perfect but definitely not adobe or foxit and way safer than viewing in any browser.
Browsers are at least sandboxed and have heavily scrutinised codebases.
All these extra bells and whistles added to browsers to allow websites to pretend they're 'native apps' should require a very large switch to be thrown from 'safe' to 'unsafe' whenever an application requests such a thing. And what a pdf reader has to do with javascript is a mystery as well. Systems that are too complex are almost by definition insecure.
The whole reader is written in Javascript: https://mozilla.github.io/pdf.js/
If you don't want a browser that has some notion of "local file context" you should just sell your laptop and go live in a cave. FWIW the entire Firefox UI and every plugin for it is _written_ in Javascript served from local disk. Chrome, Safari and IE aren't far behind
On a more serious note, I guess this is the toll we have to pay for innovation pushing. I can understand the reasoning behind writing everything in JS: it allows you to consolidate a lot of mechanisms in a single platform. Once you have that platform secure, any application you will write will (should?) be secure too.
Too bad that theory and practice are usually not the same, in practice..
Do you mean the browser, or just this particular feature?
Recommended reading: http://lcamtuf.coredump.cx/postxss/ and http://lcamtuf.coredump.cx/tangled/.
If you do choose to read them, I recommend doing it earlier in the day--fitful sleep has been observed after evening reading of the above.
> And what a pdf reader has to do with javascript is a mystery as well.
It's a pdf reader written in JavaScript, just as there are other pdf readers written in other programming languages.
Maybe it would be better if browsers didn't have a pdf viewer, though. Then I'd have to manually download it and open it in a viewer to get owned, which is not going to happen with an ad network.
The fact that every major pdf viewer app tries to install a browser plugin doesn't help.
Safari uses the same library as Apple's Reader. So it's a proprietary native blob.
Edit: While Chrome uses a native blob, I believe it's not proprietary. I think they use pdfium (https://pdfium.googlesource.com/pdfium/)
I think the main reason Chrome bothered making one was because Adobe's reader kept having security vulnerabilities. I trust Chrome's one more than Adobe's. (I just looked up cvedetails.com for Adobe » Acrobat Reader. Security Vulnerabilities Total number of vulnerabilities : 434)
https://support.mozilla.org/en-US/kb/disable-built-pdf-viewe...
and for those who think lynx is a more secure alternative, read this thread: http://marc.info/?l=openbsd-tech&m=140516601718662&w=2
- creates an empty directory,
- fork the mount table for the new bash process and its children (requires privileges),
- unshare /home (required if / is mounted in shared mode [1]),
- hide /home by mount-binding the empty directory,
- start firefox in unprivilegied mode, without being able to access to user's files.
[1] https://www.kernel.org/doc/Documentation/filesystems/shareds...
Or just give up and go QuubeOS ;)
Obviously docker, as opposed to Qubes, won't stop more complex malware that exploits the kernel.
[1] http://danwalsh.livejournal.com/31146.html
[2] http://www.bress.net/blog/archives/195-Firefox-in-a-sandbox-...
$ firefox
you start $ docker run mozilla/firefox
and get instant process isolation and protection from these kinds of exploits.Heck, mozilla could use the same underlying mechanisms internally (cgroups, namespaces) that docker already uses without introducing the dependency on docker (if that's whats bothering you). So while the implementation may not be ideal (installing docker is an overhead, I acknowledge that), what it does technology-wise is an improvement for security.
Sandboxie has gotten very good over the years. You can sandbox programs that even run with admin privileges.
edit: Don't think sandboxie can load drivers.
https://zeltser.com/security-risks-and-benefits-of-docker-ap...
The isolation provided by Docker is not as robust as the segregation established by hypervisors for virtual machines.
As seen with CVE-2015-3629[0] for instance.
The other points: patch level and docker management isn't understood, seem to be people problems which can easily be corrected.
[0]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-3629
Would like to know if an installation is vulnerable if:
1) If Applications, PDF is set to "Always ask"
2) Ublock and/or privoxy are used
3) Javascript is disabled
4) pdfjs.previousHandler.alwaysAskBeforeHandling == false
5) pdfjs.disabled == true
Also which advertising network and which Russian site would be helpful for blocklists.I reported this 0-day. It used a PDF.JS same origin policy violation to access local files. You should be safe because you have javascript disabled and pdfjs.disabled set to true. There's no way for the script to run. It was on a international news website operating from Russia. The exploit was not on an ad network. The exploit was simply injected on every news article page through an iframe. Therefore I assume the news site was compromised. It could have been deliberately injected by the website operators, but I highly doubt it. The exploit targeted developers or tech-savvy people. On Linux, it targeted the contents of the ~/.ssh directory and some other sensitive files. I should say that I am not a security expert and I came across this 0-day by accident.
Was the "src" of the iframe 3rd-party to the web site? I want to know whether merely blocking 3rd-party iframes would also have prevented the exploit from working even if javascript is not blocked.
Inquiring minds would like to know.
cf https://twitter.com/swiftonsecurity/status/62840155490772582...
An adblocker doesn't impact usability (in most cases, it improves it significantly, through lower page load times and less space occupied by non-content), but prevents the vast majority of malvertising. Blocking all Javascript blocks all of them, but makes the modern web nearly unusable.
I'd love to know more about this person and their skill set. How was the exploit detected and isolated? How did this issue get reported and resolved in s day?
Assuming the Mozilla way, I wonder what the bugzilla report will read when it comes out of embargo.
Wow, lucky that it triggered a prompt. Thanks for the response!
Why do advertising networks allow advertisers to exectue Javascript? What need is there for it?
Every time one of these exploits that use advertising networks is found, it just increases the value of blockers such as uBlock. Whether you accept adverts or not, you shouldn't have to accept javascript being executed on your machine that isn't from the site you visited.
Personally I think all ads should be served up in a totally passive visual format (png, jpeg, gif) and have no other attributes than a non-javascript link target. That would take care of almost all drive-by injection. But adnetworks serve up what their customers want and their customers want interactive ads because the click-through rates are higher and because otherwise the competition would be doing it and they go out of business.
Ad networks that do serve up javascript should at a minimum pull the script to their own server and audit the code of the script. Good luck with that though.
Fortunately it's easy enough to install an ad blocker and get rid of that part of the problem entirely but it would be nice if users without an ad blocker wouldn't have to worry about this.
The person who found and reported the exploit said this particular exploit did not originate from an ad server[1].
Without disabling javascript, I have always argued that merely disabling 3rd-party iframe tags is a good first move[2]: significantly less breakage than disabling javascript, yet this will effectively step up security/privacy protection.
In the current case, the person who found it confirmed that just blocking 3rd-party frame tags would have foiled the exploit.[3]
[1] https://news.ycombinator.com/item?id=10021894
[2] https://github.com/gorhill/uBlock/wiki/Dynamic-filtering:-Be...
The way an ad network fills capacity is by allowing other ad networks to be their advertisers. Those ad networks buy the crappy traffic and fill it with junk ads.
It's those crappy ads that look bad and may have scams attached to them - they get passed around so much that they can get lost in the system.
That said, premium campaigns can also have bad ads. Like advertisers pretending to be premium clients but under the right conditions (like geolocation, date, time, viewing host) the ads will turn bad. It's a game of cat and mouse, and those ad networks are more geared for sales.
Because there is an empty place in their wallet that they require to be filled.
Note: If you use your Linux distribution's packaged version of Firefox, you will need to wait for an updated package to be released to its package repository
It would be particularly scandalous if they knew that disabling pdfjs would suffice yet refused to mention it because they couldn't bear to see their precious CPU/memory-hogging scribd knockoff no one asked for being disabled by their users, in effect putting their grandiose vision of the browser-as-OS ahead of their users' security.
1. If PDF files aren't set to open using Firefox's built-in PDF viewer, was the relevant system still vulnerable? (That is, if under Options->Applications, PDFs were set to something other than "Preview in Firefox", would this attack still work?)
2. Which were the 8 popular FTP clients potentially affected?
3. Was this specific case all that could be done or was it an example of a wider class of potential exploits? (That is, can we actually trust any sensitive credentials in any applications on any system that has been running Firefox before today? And could we have disclosed other sensitive information that was held in well known local files?)
I do deal with sensitive details, and have access to lots of external systems run by various clients. If there is a real danger here then I need to act. If there isn't, then I would prefer not to spend the next 1-2 days of my time updating everything that could have been silently compromised instead of doing revenue-generating work, and worse, contacting every client I work with to notify them that their security may have been compromised and it's my responsibility.
The last thing I need is to have to contact a customer to tell them their data might have escaped my desktop computer because I took my browser to some unsafe site.
Also: start your browser in a VM.
What I don't know right now is whether any of that actually helps me in this case.
Some combination of script and adblocker would probably be a good idea though.
If there is something else going on then I'd really like to know about it!
Their sources are open and you can inspect them to make sure they don't do anything nefarious so that would have to be quite an elaborate play on their part with the downloads being different than the published source in critical parts.
5. Can we get a full list of all the "usual global configuration files" to aid in looking for a pattern in atimes?
Answered elsewhere in the thread (SmartFTP, Notepad++ NppFTP, FileZilla, FTP Explorer, FTPGetter, FTP Now, FTPInfo, Total Commander, Ipswitch WS_FTP, and VanDyke)
https://grepular.com/Protecting_a_Laptop_from_Simple_and_Sop...
Specifically, the "Securing the Web browser" section.
[edit] Also worth mentioning is the stuff about smartcards on that blog post. You can steal my ~/.ssh/ and my ~/.gnupg/, but because I'm using a smartcard, it wont do you any good.
First, X itself is very insecure, so by allowing your web browser to share the same X server as the rest of your apps, you are making the rest of your apps more vulnerable.
Second, the so-called "Trusted" Platform Module you're using for extra entropy may itself not be very trustable, despite the name. So you may want to rethink that.
Finally, according to the vendor of the GPG smartcard you're using, "the software on this card is not available as free software due to NDAs required for certain parts."
That there are NDAs on parts of the card or the software (it's not clear which) makes the card suspect, and I don't see where I can get the source of the code (free or not) that's running on the card. An ideal smart card would, like gpg itself, have completely open and transparent hardware and software. I'm not sure if any of those kinds of cards exist, however.
That said, I'm sure all the security measures you're taking in sum make you far better off than the typical computer user, but there's room for improvement.
Re the TPM, even in the worse case scenario where the TPM is totally evil, it can't reduce the randomness on my system. It will either keep it the same or improve it. At least on Linux, where it is just one extra source of entropy on top of the other existing ones.
Re the smart card, that may be the case, but it's probably the safest one out there, recommended and pushed by the guy who wrote GnuPG.
It's worth noting that the blog post is 4 years old now.
Or even more general approaches like subuser[2] or QubeOs[3].
Personally I use FF 28.x + Noscript + Adblock plus + Firejail 0.9.28-1 and I feel quite confident I won't get hacked by random attacks.
[0] https://l3net.wordpress.com/2014/09/19/firejail-a-security-s...
[1] https://igurublog.wordpress.com/downloads/script-sandfox/
Linux: /etc/passwd, /etc/hosts, /etc/hostname, /etc/issue, .bash_history, .mysql_history, .pgsql_history, .ssh/known_hosts, .ssh/authorized_keys, .ssh/id_sa, .remmina/.remmina, .remmina/.pref, .config/filezilla/.xml, .filezilla/.xml, pass.txt, access.txt, .sh, .config/psi+/profiles/default/accounts.xml
Windows (in the User directories AppData/Roaming and Application Data): Subversion: config, servers, auth/svn.simple/* , auth/svn.simple/* .* SmartFTP: Client 2.0/Favorites/Quick Connect/* .xml Psi+: profiles/default/accounts.xml Notepad++: plugins/config/NppFTP/NppFTP.xml .purple: accounts.xml s3browser: * .xml, * .settings FileZilla: filezilla.xml, sitemanager.xml, recentservers.xml FTP Explorer: profiles.xml FTPRush: RushSite.xml FTPGetter: servers.xml FTP Now: sites.xml FTPInfo: ServerList.cfg, ServerList.xml GHISLER: wcx_ftp.ini Ipswitch: WS_FTP/Sites/ws_ftp.ini VanDyke: Config/Sessions/* .ini
With that, I can search the history of what we've been sent to get a list of all webpages that this exploit has been seen on.
Email is scriptobservatory -at- gmail -dot- com or you can input it in the "Do you have a list of websites you want to be scanned regularly?" text box.
But sending hashes of your downloads to Google [1][2] is a feature, right?
1. https://support.mozilla.org/en-US/kb/how-does-phishing-and-m... 2. https://bugzilla.mozilla.org/show_bug.cgi?id=1138721
"When you download an application file, Firefox will verify the signature. If it is signed, Firefox then compares the signature with a list of known safe publishers. For files that are not identified by the lists as “safe” (allowed) or as “malware” (blocked), Firefox asks Google’s Safe Browsing service if the software is safe by sending it some of the download’s metadata."
https://dxr.mozilla.org/mozilla-central/source/toolkit/compo...
Just executables, identified by file extension and if you are on Windows, .zip files as well.
I've not seen any discussion about how this exploit is targeting dev keys. I find that as a data point that we've turned the corner: The coder in this case decided to grab auth keys/passwords (with a presumably low rate of success).
As logical as it may be (without RCE, not much more they could have done with a higher rate of success), I don't think it'd have been done ten years ago.
Fascinating.
even though I don't use pdf.js, have ublock and a strong key password, I'm not risking it.
I have access to so many servers, I'd rather spend 30 mins changing keys than take the chance
previous discussion: https://news.ycombinator.com/item?id=10020361
Which russian website, excuse me? Why not share the name?
I know it's an unpopular opinion, but I actually miss the days where webpages were static and did not need JS to load basic functionality.
With the rise of the IoT, security is only going to be more and more difficult (e.g., all the automanufacturers' issues as of late); here's hoping we can figure out a way to make security mainstream…
Try telling that to people who want them to do more. No one wants to download and install your desktop app - it's too much work and people are too concerned about security. Mobile app stores are much better at minimizing that friction which is why native applications are so popular on that platform... but there's still friction.
The web is awesome because it's so easily accessible. And people want to do sophisticated things easily - they don't want to mess with downloading and installing stuff.
The fact that the web started off a certain way and browsers are called "browsers" has literally zero impact on what people demand from their technology. What they want now is for their browsers to solve problems. So that's what people make.
To me browsing would include all the JS stuff we have now plus all kinds of things we haven't dreamed up yet. Call me old fashioned but I'm all for continuing to move the web forward.
There will be vulnerabilities in native apps, there will be vulnerabilities in web apps or, put more simply, there will be vulnerabilities.
Patch 'em up and charge ahead.
I'm all for less bloat, and I can't figure why would a browser double as a PDF reader, for instance, when a native app is invariably faster, more feature-rich, more customisable and more secure. However, it's difficult to draw a concrete line between plain browsing and web apps.
A native app is less secure. They're all written in memory-unsafe languages, are not guaranteed to be up-to-date, and do not run sandboxed. Integrating a JS PDF viewer into the browser hurts performance, but it's more convenient (no separate app to open, can start reading before it finishes downloading), and much less likely to be a security risk.
So how can we even trust the browser if native apps are always less secure according to you?
The exploit ran despite the sandbox if I understood it right.
Mobile is a different story of course, but also not portable.
In short I'm not sure what you're suggesting.
Edit: NVD does list a bunch of vulnerabilities with "PDFium" in them [1], and I guess there are a few more from when it wasn't called PDFium yet, but I'm curious as to how an expert would interpret these numbers.
[1] https://web.nvd.nist.gov/view/vuln/search-results?query=pdfi...
Sandboxie looks like a paid closed source solution, I'm not sure they give me a compelling value proposition over something like a light linux distro under VirtualBox.
It was initially for minimising the risk of false positives while testing remote access from the network I was on at the time.
Probably not enough to be hacking NSA, but it quickly added layer of protection from leaking stuff.
If you need it too, here's the list
My page just said 'Firefox 39 available' and 'restart to upgrade'. But the exploit page notes that you need version 39.0.3 in order to be protected. So it's unclear if the upgrade would fix things or not.
I was never comfortable with pdf.js and changed the setting to use the default pdf viewer in all my machines.
[1] http://telemetry.mozilla.org/dist.html#!cumulative=0&end_date=2015-06-05&max_channel_version=beta%252F38&measure=PDF_VIEWER_USED&min_channel_version=nightly%252F38&product=Firefox&sanitize=1&start_date=2015-03-04&trim=1&use_submission_date=0Most of the times, I have multiple pdf files open side by side. So I had a pdf viewer in the machine.
You can rest assured that 99% of Firefox users won't do that.
Even lynx is not immune:
http://www.cvedetails.com/vulnerability-list/vendor_id-5836/...
https://www.google.com/webhp?q=%22chrome+is+the+new+IE%22
Safari and Firefox is typically called the new IE because they are lagging behind the times.
Which is why I said "IE6" in my original comment. The later versions of IE were very decent. They certainly didn't seem like the frozen accident of history - an issue Firefox continues to grapple with.
That's a reasonable criticism of Safari, which is updated infrequently and is lagging on all sorts of web standards, but not for Firefox.
That really is nonsense. Firefox is standards-compliant; it's multi-platform; and it works.
I have major issues with its direction (the gelding of its sync service was particularly galling), but it's still the best browser out there.
All the same, as of 2015, it is a poor implementation of a browser from the technical point of view. Not because it was designed badly, but because it has simply not kept up.
How has it not kept up?