314 points · by secfirstmd · 10y ago · 132 comments
This is neither the first nor is the last 0day in Firefox that will affect TBB.
IMO the best practical mitigation against these attacks is sandboxing with an amnesic system like Tails, as even as a VM it will leak a lot less information about the machine it is running on and requires burning both a Firefox 0day and a VM escape to get any real information outside of the real IP address of the user and some basic things out of /proc (although Tails may protect against the latter now). Also, as the whole VM goes away when it's closed, you're not getting persistence on that machine if you just pop the browser.
A 30 second glance at the source code makes it looks like this exploit pivots to attacker-controlled memory on the heap, and spawns a thread using kernel32.dll. As EMET has hardening against attacks like this, I am curious if this exploit works at all on EMET-enabled Windows systems.
PS, if you're ever on the US West Coast or in Singapore, drop me a DM. I'll buy you a drink someplace.
-It's tricky for a non-technical user to setup
-It disrupts their regular workflow
-People get frustrated with speeds of Tor etc
-People get frustrated with Captcha (Dam Cloudflare!) and other things caused by using Tor in a safe manner.
-People get annoyed as it doesn't solve their problems and exposure on mobile
-You have to restart to run it
-They can't run their regular programs on it - MS Office, Outlook, Adobe, etc.
-It's Linux based, so a big mental jump for most people coming from Windows (or most people not at the command line on OS X)
-It's hard to access files on other drives
-Documentation and TAILS is only available in certain languages
-It often has driver problems - e.g Macbook Pro 2015 WIFI issues
-In developing states, computer literacy is low, so anything other than the norm (Windows) is confusing
-In developing states, hardware tends to be slow (often counterfeit) so running TAILS in RAM is slow
-People lose the USB sticks they put TAILS on (also many counterfeits, so they often fail or have a false size)
-TAILS often requires training, which not everyone has access to
-Skills fade for digital security training with journalists/activists is often quite high, especially if they don't need it that often.
-the list goes on............
Don't get me wrong, I think it's great (as is Qubes, Subgraph etc) but we need to be realistic about it's limitations for the majority of people. Especially if we want to be sensible and try to tailor advice, training and tools to their realistic threat models.
P.S Definitely, I'm on the West Coast probably once a year. Ditto you if your ever in Dublin (Ireland, not that fake one in California :) or London!
EMET can be bypassed so it's no guarantee that it would stop the exploit (but it would probably stop THIS exploit). I don't know if some modification would be able to bypass EMET or other mitigations.
A better solution would be to run javascript in a sandbox (as is done in Chrome/Chromium based browser) which has a much higher barrier to exit.
Sure, but we can't get TBB rewritten overnight to work instantly with Chromium, and I'm sure there'd be a lot of push back on that.
If you give that up, then what's even the point? The state can simply drive a black van to your house and get the rest of your information at their leisure.
Or if you're in a country oppressive enough that they'll raid your house for using Tor, but free enough that they'll let you off if they don't find evidence you were doing something illegal over Tor, and they didn't compromise the site you were visiting just asked your ISP to look for Tor users.
The Tor project itself seems to promote Tails much more than Whonix, which seems very odd to me.
You can take a look at the sandbox implementation of Firefox (shared with Chrome) to see. TBB uses ESR which predates all that, though.
There are Windows "sandboxes" like Bromium, and as stated, IIRC EMET will stop the stack pivot here.
1: https://blog.torproject.org/blog/q-and-yawning-angel 2: https://github.com/subgraph/oz 3: https://github.com/netblue30/firejail
My guess? Some darknet market.
* Sure, this could be some type of awkward false flag, but it seems unlikely to my gut.
+1 to FBI on this being pretty well targeted; you had to have had a successful login for them to be attempting this in the first place. It's about as precise as they can get; you're only going after users that are active members of the service. They are at least being reasonable in who they are targeting. I can't really think of how they can be more targeted in attempting to deanonymize people in the network.
I don't like this whole NIT garbage because I'm afraid this will lead to fishing expeditions, where you just root everyone on an .onion that happens to visit it, and then clean up with a multitude of search warrants later and hope you get something. I also don't believe it's the FBI's (or America's) job to play world police.
-1 to the FBI, at least: they were (once again) actively serving CP on a compromised server again, which seems like something you shouldn't be doing as an LEA fighting the distribution of the content. Illegal actions shouldn't be taken to fight crime. Distributing the thing you are fighting is the definition of the abyss having gazed into you.
(Maybe the EFF wants to do this)
I think Hyper-V can do graphics as well and it looks like bhyve added some sort of graphics support earlier this year, but xhyve has none. Not sure if there are any other lightweight hypervisors that support graphics (or maybe just use a protocol like X11 or VNC?).
Docker for Mac and Docker for Windows have done a great job of hiding the fact that it's using virtualization from users (but doesn't need graphics, of course)
Tor recommends not going full-screen, since window size can be used as one of several identifiers.
so like... maximized?
I would expect a generic resolution like 1920x1080 to convey much less identifiable information that some random 1583x1176 that the user might resize tor browser window to.
It is a type 1 hypervisor and DX is supported since a few versions.
Also the foundation of Windows 10 containers and secure kernel.
It lacks even basic exploit mitigations that other browser have had for years now (most importantly a feature-complete sandbox).
Right now, Firefox is just a single process with zero separation of privileges. Any bug in the rendering code is a potential RCE. Writing exploits for Firefox vulnerabilities is well within a strong amateur's reach and this headline does not surprise me at all.
This is a (probably incomplete) list of all public exploits in the past three years:
- 2013/08: XPCOM RCE (https://github.com/rapid7/metasploit-framework/blob/master/m...)
- 2013/08: __exposedProps__ (https://github.com/rapid7/metasploit-framework/blob/master/m...)
- 2014/03: WebIDL RCE (https://github.com/rapid7/metasploit-framework/blob/master/m...)
- 2015/03: PDF.js RCE (https://github.com/rapid7/metasploit-framework/blob/master/m...)
- 2015/08: The file stealing exploit: https://blog.mozilla.org/security/2015/08/06/firefox-exploit...
- [The FBI exploit (2016-ish)]
- This one.
Publicly known as in, with a fully functional Metasploit exploit, and most of them through JavaScript, so 100% reliable. ASLR isn't going to help with interpreter bugs. This is 90s level bad!
And those are just the publicly known ones. With a code base as large as Firefox, it'd be foolish to assume to assume that there aren't any private 0days. Just take a look at this list:
https://www.cvedetails.com/vulnerability-list/vendor_id-452/...
Even Microsoft Edge is better at this.
Project Electrolysis is a step in the right direction, but it will take a LONG time to mature. Last time I checked, it was just for process separation and did not provide any security guarantees. Chromium had a fair bit of sandbox escapes during the first years, and there's no reason to believe this is going to be different with Firefox. If have high hopes for their Rust re-implementation, but that's not going to be usable any sooner.
In the meantime, there's nothing like Chrome/Chromium security-wise. Not even close.
When was the last time there was a reliable, public Chrome exploit with a sandbox escape? The only one I can think of was the Hacking Team exploit, which used a Windows kernel 0day to escape the sandbox.
Chrome's security team is probably the strongest in the industry and they poured an absurd amount of effort into Chrome's security. And it being open source means that I can use without worrying about backdoors or data leakage.
If you check https://zerodium.com/program.html you can see that the current market prize for a Chrome exploit with sandbox escape is about 80k USD. Firefox is cheaper (30k USD), but only by a bit more than factor 2.
(I've been working on security vulnerabilities pretty continuously since 1998, so I somewhat know what I am talking about)
In general, for any major browser: Given the size, complexity, and code churn, an attacker just needs enough motivation / time.
Did not know those prices were public, really interesting.
Don't forget that it's not just the sandboxing and Chrome/Chromium based browsers can mitigate entire classes of bugs thanks to win32k lockdown. A recent example was a Flash bug which required access to some of the blacklisted system calls (GDI I think).
It's a separate project from e10s (though it depends on it): https://wiki.mozilla.org/Security/Sandbox
Chromium had a fair bit of sandbox escapes during the first years, and there's no reason to believe this is going to be different with Firefox.
I agree. Note that people still find sandbox escapes against Chrome anyway. Yes, sometimes they use the OS, but due to how the sandboxing works that's to be expected.
Even Microsoft Edge is better at this.
CVE counting, especially the ones published by the developers themselves, aren't a very good measure of security.
Google developed special architecture to make browser safer. Other vendors did nothing, they just wait until exploit becomes public and patch the code (and yet they call their product "secure"). Google also motivated Microsoft to allow disabling potentially vulnerable kernel library. Google since long ago has their own PDF viewer (so people don't have to use Adobe viewer) and their own Flash plugin. As a result on contests like pwn2own exploits for Chrome are the most expensive.
Regarding Tor I am not sure if JS is really necessary for a secure network. You don't need it to read sites like wikileaks bit it provides a large attack surface and it might be better to have it disabled by default.
See my reply below. Counting exploits, not CVEs. By CVE count, Chrome would be the worst.
This realization may be enough for me to finally switch, if so.
None of this would have helped Tor/TBB, because it's based on an older Firefox branch, with no sandbox at all. This means most vulnerabilities are exploitable and lead to a total compromise. There's relatively few of those and they get fixed very quickly, but if you use Tor you are likely specifically targeted so any hole is very serious.
Parent sounds so bad because he seems to grade security by seeing how many CVE's the developer publishes, ignores the fact that browser exploits are often done by exploiting attack surface outside the browser (because all browsers are - relatively speaking to other software - secure), and conflating Chrome vs Chromium.
This particular bug is bad (it's a 0day - a security exploit found by bad guys before Mozilla or security researchers found it) but a lot of the buzz here is because such problems are rather rare these days, and because it's targeting Tor.
By counting CVEs alone, Chrome would be the least secure since it has more CVEs than any other browser thanks to Google's bug bounty and fuzzing, most of them harmless.
What I counted were real-world browser exploits which is an excellent measure of security.
> such problems are rather rare these days
In Chrome, yes. They happen rather often with Firefox.
> conflating Chrome vs Chromium
Their security features are identical. It's the same code.
Could you elaborate? I'm curious what they do for security.
But the exploit here with the ROP chain, calling Windows APIs, etc., is apparently Win32-specific and doesn't have binary code that could run successfully on other platforms.
The setup for the exploit is apparently primarily in the Javascript function craftDOM() which makes some SVG objects and modifies some of their properties, presumably in a way that triggers an underlying bug in Firefox's SVG support. There is also a Win32 object code payload in the string object thecode, which would not be able to run unmodified on another platform. Also, the ROP chain code is likely to be Windows-specific in several respects. Indeed, the statement
throw"Bad NT Signature";
seems to be actively giving up the attack if it detects a non-Win32 environment.I don't see why the two objectives of having a secure browser and the privacy/anonymity provided by Tor have to be diametrically opposed. You can have both.
> DISCLAIMER: Although it is the top priority to eliminate bugs and privacy-invading code, there will be those that slip by due to the fast-paced growth and evolution of the Chromium project.
Seems that using regular internet is actually safer now.
In China the "regular internet" intercepts http and inserts javascript malware to create a DDOS botnet.
I'm talking about going anywhere on Tor can infect you.
Regular internet has a few protections:
1. Google safe browsing
2. AdBlocking
3. Websites try to keep their reputation.
Tor exit nodes, on the other hand, have no reputation (and if one gets sullied, spin up another) and costs money.
Does something prevents us from rating tor exit nodes according to their "transparency" and add this rating in the consensus file?
Does anybody already worked on that? I cannot find anything on the internet…
Oh is it? The exploit for upstream Firefox on Windows is now completely public, free of charge. How is that worse on Tor, where most people using it have idea that JS and 3rd party connections should be blocked?
(Using Tor does change who can attempt to attack you with such bugs -- and maybe who is motivated to.)