Mac's Malware: Flashback – how to get rid of it

By April 5, 2012Apple

Apple’s Mac platform has long been promoted as safer than the competition, but as Mac sales and market share grow, it’s become a bigger target.

Nowhere is that clearer than with the Flashback Trojan, a gnarly piece of malware designed to steal personal information by masquerading as very mainstream browser plug-ins. Yesterday Russian antivirus company Dr. Web said that an estimated 600,000 Macs are now infected as a result of users unknowingly installing the software.

So here’s a quick FAQ on the Flashback Trojan, including information on what it is, how to tell if you have it, and steps you can take to get rid of it.

What exactly is Flashback?
Flashback is a form of malware designed to grab passwords and other information from users through their Web browser and other applications such as Skype. A user typically mistakes it for a legitimate browser plug-in while visiting a malicious Web site. At that point, the software installs code designed to gather personal information and send it back to remote servers. In its most recent incarnations, the software can install itself without user interaction.

An earlier version of the Flashback Trojan's installer. An earlier version of the Flashback Trojan’s installer.

(Credit: Intego)

When did it first appear?
Flashback as we know it now appeared near the end of September last year, pretending to be an installer for Adobe’s Flash, a widely used plug-in for streaming video and interactive applications that Apple no longer ships on its computers. The malware evolved to target the Java runtime on OS X, where users visiting malicious sites would then be prompted to install it on their machine in order to view Web content. More advanced versions would install quietly in the background with no password needed.

How did it infect so many computers?
The simple answer is that the software was designed to do exactly that. In its initial incarnation, the malware looked very similar to Adobe’s Flash installer. It didn’t help that Apple hasn’t shipped Flash on its computers for well over a year, arguably creating a pool of users more likely to run the installer in order to view popular Web sites that run on Flash. In its newer Java-related variants, the software could install itself without the user having to click on anything or provide it with a password.

What also didn’t help is the way that Apple deals with Java. Instead of simply using Java’s current public release, the company creates and maintains its own versions. As it turns out, the malware writers exploited one particular vulnerability that Oracle patched in February. Apple didn’t get around to fixing its own Java version until last week.

What has Apple done about it?
Apple has its own malware scanner built into OS X called XProtect. Since Flashback’s launch, the security tool has been updated to identify, and protect against a handful of its variants. A more recent version got around this by executing its files through Java. Apple closed off the malware’s main entry point as part of an update to Java earlier this week.

How do I tell if I have it?
Right now the easiest way to tell if your computer has been infected is to run some commands in Terminal, a piece of software you’ll find in the Utilities folder in your Mac’s Applications folder. If you want to find it without digging, just do a Spotlight search for “Terminal”

Once there, copy and paste each one of the code strings below into the terminal window. The command will run automatically:

defaults read ~/.MacOSX/environment DYLD_INSERT_LIBRARIES
defaults read /Applications/Safari.app/Contents/Info DYLD_INSERT_LIBRARIES
defaults read /Applications/Firefox.app/Contents/Info DYLD_INSERT_LIBRARIES

If your system is clean, the commands will tell you that those domain/default pairs “does not exist.” If you’re infected, it will spit up the patch for where that malware has installed itself on your system.

Uh oh, I have it. How do I remove it?
Security firm F-Secure has posted a step-by-step walkthrough on its site. It too requires hopping into Terminal and running those commands, then tracking down where the infected files are stored, then manually deleting them. There are also likely be removal tools built into Mac antivirus/malware programs in the near future.

So now that fixes are here am I safe?
The very nature of malware is that its authors make changes to the software to get around increased security fixes. That’s already happened with this particular piece of software initially targeting users by pretending to be Adobe Flash before evolving.

CNET’s advice on this malware, and with any software is to download it from trusted sources. That includes the direct sites of software makers, as well as CNET’s Download.com. This results in software that’s secure and up to date.