We’re publishing this as an emergency bulletin for our customers and the larger web community. A few hours ago a zero day vulnerability emerged in the Tor browser bundle and the Firefox web browser. Currently it exploits Windows systems with a high success rate and affects Firefox versions 41 to 50 and the current version of the Tor Browser Bundle which contains Firefox 45 ESR.

If you use Firefox, we recommend you temporarily switch browsers to Chrome, Safari or a non-firefox based browser that is secure until the Firefox dev team can release an update. The vulnerability allows an attacker to execute code on your Windows workstation. The exploit is in the wild, meaning it’s now public and every hacker on the planet has access to it. There is no fix at the time of this writing.

Currently this exploit causes a workstation report back to an IP address based at OVH in France. But this code can likely be repurposed to infect workstations with malware or ransomware. The exploit code is now public knowledge so we expect new variants of this attack to emerge rapidly.

This is a watering hole attack, meaning that a victim has to visit a website that contains this exploit code to be attacked. So our forensic team is keeping an eye on compromised WordPress websites and we expect to see this code show up on a few of them during the next few days. An attackers goal would be to compromise workstations of visitors to WordPress websites that have been hacked.

How this unfolded

Since then researcher Dan Guido posted a series of tweets with some analysis of the exploit itself.

Twitter user @TheWack0lian noticed the shellcode (code that executes on your Windows workstation once exploited) is very similar to shellcode likely used by the FBI back in 2013 to deanonymize visitors to child porn websites hosted by FreedomHosting. The FBI confirmed that they compromised that server and days later it was serving malware that would infect site visitor workstations. The code then reported site visitor real IP addresses, MAC addresses (network card hardware address) and windows computer name to a central server. This code is very similar.

What we found

The shell code in this attack calls back to IP address 5.39.27.226, which was a web server hosted at OVH in France. The site is now down. Our own research shows that if you look up this IP address in Shodan, it had an SSL certificate that is a wildcard for the energycdn.com domain name. That site for energycdn is simplistic and according to archive.org, it has not changed since 2014.

One could speculate that the server at 5.39.27.226 was used by energycdn.com as one of their servers to host pirated content. Perhaps the server was compromised by whoever controls energycdn to host that content and then was reinfected by the perpetrator of this new malware variant. But we’re speculating.

Additional press coverage

Update at 2:03pm PST / 5:03PM EST on Wednesday:

Vice’s Motherboard have provided an update 2 hours ago on this issue from a few sources. Here’s the summary and some context:

Remember, this attack targeted Tor users specifically and the goal of the attack was to reveal the identity of the browser operator. It is also very similar to a 2013 attack that was likely launched on child porn website visitors by the FBI to identify and arrest them. The fact that this exploit simply tries to reveal a user’s identity rather than infect them with malware indicates it is being perpetrated by a law enforcement branch in some country.

Vice is now reporting that their sources are saying this exploit is active on a child porn website called The GiftBox Exchange. There are also warnings on the Dark Web about the presence of this malware. In my opinion this strongly indicates that this exploit is in fact the FBI or another agency targeting visitors of The GiftBox Exchange.

Vice has reached out to FBI and Europol. FBI declined to comment and Europol did not respond.

My guess is that you will hear about this again a few months from now when the indictments start to emerge. If that is the case, and it is confirmed this is an FBI operation, this would make it clear that using 0 day vulnerabilities to actively exploit browsers for surveillance is the new modus operandi of the FBI. This technique was used in 2013 to target visitors of websites on FreedomHosting. It was used again to target and indict visitors of Playpen in 2015. And this technique is being used again today.

I'm told that the exploit is not patched, but also not executable in its current form in FF (ToR uses older Firefox base code), and that it is not currently clear if it could be modified for an attack at this stage. I'd be waiting until it is patched.

These are the other valid domains on the multi-domain certificate for energycdn.com (proxied from CloudFlare). It's not the same certificate as the one from `5.39.27.226`, so I'm not sure how it's relevant or useful.

Maybe you can keep us up-to-date through Twitter? This post isn't mentioned on your twitter, btw.
Thanks for the newsletter update! Thanks to that I know now :)
I've posted it on Twitter and send it to a few people. Hopefully it gets solved soon. Firefox has always been my go to browser.

So, a person has to be using Firefox and Tor, on a workstation, and go to a an infected (watering hole) website before there would be any problem? Further it only affects two out of 50 something versions of Firefox? I'm not exactly experiencing panic.

I think you misunderstood. It affects Firefox versions 41 through 50. It also affects recent versions of the TOR bundle, which apparently uses some code from Firefox 45. So you don't have to be usinfound both TOR and Firefox simultaneously. The "watering holes" may or may not be an issue depending on your browsing habits, but the number of infected sites is probably growing rapidly... and just remember when you visit 1 site you may be pulling content from many others as well :)

I think some people are confused about what the article is saying. Its not only affecting TOR editions of Firefox.

Its affecting all editions of Firefox, regardless if you are running Windows or Linux or anything else and no, Firefox has no sand boxing, that is false, they just recently started to add sand boxing only to a few process (not security sand boxing but for resources) and only 1% of Firefox users are using that version today, if you have plugins, you don't have that enabled in Firefox 50. If the exploit is in the wild it means it can be exploited, regardless if you have or not a sand boxed browser.

If this is repurposed to not just unmask Tor browser users, but to drop malware/ransomware on Firefox workstations, then you will be infected on your local Windows machine. So the best way to know if you've been hit by this or not is to run a Windows anti-virus scan on your local machine and do that regularly. If you don't have one, you can find a sortable list of options here: https://www.av-test.org/en/antivirus/home-windows/

The longer answer is: This is a Firefox exploit. Tor uses Firefox version 45 ESR at it's core. This exploit has been confirmed to work in Tor browsers. Someone, probably a government going after someone trying to stay anonymous, used this particular exploit to drop code on a workstation that sends a ping to an IP address from a Tor browser. That's not super scary for Firefox users, but it is very scary if you're a political dissident trying to stay anonymous from a government who is coming after you.

So again, this is actually exploiting something in Firefox and right now it's being used to unmask Tor users. However, this can probably be repurposed to drop malware on Firefox users. I mention a range of versions that are likely affected in the post above. This story is still unfolding and it literally broke less than 24 hours ago, so more data on which versions are affected will probably emerge.