If you downloaded HandBrake for Mac, you could be infected with Proton RAT

A mirror download server of HandBrake, a popular open source video conversion app for Mac, has been compromised, and the legitimate app .dmg file switched with a Trojanized version containing the Proton RAT.

HandBrake infected

Who got infected?

“Anyone who has downloaded HandBrake on Mac between [02/May/2017 14:30 UTC] and [06/May/2017 11:00 UTC] needs to verify the SHA1 / 256 sum of the file before running it,” the developers warned on Saturday, and prominently displayed a link to the alert on the project’s main page.

Only users who have downloaded the HandBrake-1.0.7.dmg file from the download mirror at download.handbrake.fr are in danger. The primary download mirror and website have not been compromised.

“If you see a process called ‘Activity_agent’ in the OSX Activity Monitor application, you are infected,” the developers noted. (You can find the Activity Monitor in /Applications/Utilities).

What’s the danger?

Proton is a Remote Access Trojan (RAT) for macOS, and was spotted being sold on underground Russian cybercrime forums earlier this year.

For 40 Bitcoins, the buyers would get unlimited installations, and the malware was signed with a legitimate Apple developer signature, so it doesn’t get blocked by Apple’s Gatekeeper technology.

The Proton RAT allows the attacker to connect remotely to the infected machine. It is also capable of monitoring keystrokes, uploading files to and downloading files from a remote machine, webcam surveillance, and more.

According to the ad, it can also present a custom native window requesting users to enter information such as a credit card number, and can access the victim’s iCloud account – even if it’s protected with 2-factor authentication.

What to do if you’ve been infected?

HandBrake developers advised infected users to change all the passwords in their macOS Keychain and any of the passwords they saved in their browsers.

But before doing that, they should make sure they have booted Proton and other malware it may have installed from their machine.

For removing Proton, the developers advise opening up Terminal.app and running the following commands:

  • launchctl unload ~/Library/LaunchAgents/fr.handbrake.activity_agent.plist
  • rm -rf ~/Library/RenderFiles/activity_agent.app

“If ~/Library/VideoFrameworks/ contains proton.zip, remove the folder, then remove any ‘HandBrake.app’ installs you may have,” they added.

For finding and removing other malware, users are advised to use a reputable AV solution for Mac to scan their system.

What is Apple doing about this?

Apple has added a signature for the initial version of Proton to XProtect, the built-in macOS anti-malware scanner. And, by now, it has added the signature for this particular Proton variant (OSX.Proton.B).

But, according to Patrick Wardle, security researcher and developer of Mac security tools, that protection can be easily thwarted.

The signature is just a SHA-1 hash that matches only that specific Trojanized Handbrake binary, he noted. “This means if the malware authors used any other infection vector, or even just recompiled the [Trojanized] binary, this signature would no longer flag the malware.”

He demonstrated this by changing the final byte of the binary – a move that changed it SHA-1 hash – and downloading it and installing it without any problem on a clean Mac.

“The reason why Apple chose such a specific signature is that they figured any new attack would use a new distribution vector (thus would be totally different) – so they figured they just use a specific signature for this attack/attack vector. However, since XProtect now supports YARA (which allows for more complex/reg-ex based signatures), I think it would have been wise to create a more generic signature – that would have at least thwarted variants of this same attack vector (i.e. an infected handbrake app),” he told Help Net Security.

“At the end of the day though, no signature based approach would stop the attackers. So even if Apple had created a more robust signature, if the attackers were any good and wanted to continue to distribute the malware via this or a similar attack vector, they would be trivially able to bypass any signature.”

This particular malware delivery tactic is not new

The official website of the Transmission Project, which offers for download the Transmission BitTorrent client for Macs, has been compromised two times in the last year or so, and the software’s legitimate binary switched with malware: once with the KeRanger ransomware and the second time with the Keydnap credential stealer.

It’s interesting to note that the original developer of Transmission and Handbrake is the same person. But, the HandBrake Team made sure to note that he is not part of the current HandBrake team of developers, and that they do not share their virtual machines with the Transmission Project.

Updated to add Wardle’s opinion on what Apple could have done better.

Don't miss