The Lazy Genius

Security News & Brain Dumps from Xavier Ashe, a Bit9 Client Partner

Archive for May, 2013

Cyberespionage Tackle Box: FinFisher Spyware Casts Wide Net

Posted by Xavier Ashe on May 8, 2013

FinFisher’s Global Proliferation: Updated Map

Copyright, The Citizen Lab 2013

EDIT: New information about FinFisher was released by F-Secure on August 30, 2013.

Originally posted on the Bit9 Corporate Blog.

As I reviewed recent headlines, I took note of a company out of the U.K., Gamma International, that makes purpose-built spying tools. Their software offering is called FinFisher (aka FinSpy). The buzz phrase they use is “lawful intercept,” which means that its use should be bound by laws that allow spying in certain circumstances. Personally, I file it under “greyware,” considering it could be used legally or illegally to remotely control or embed cyberespionage tools within benign looking software. So how do organizations secure themselves against these kinds of tools?

Last year Morgan Marquis-Boire, a security researcher at the Citizen Lab at the University of Toronto’s Munk School of Global Affairs, and Bill Marczak, a computer science doctoral student at the University of California, Berkeley, found emails containing surveillance tools traced back to Gamma International. More recently, those researchers found the command-and-control server for FinFisher running in 36 countries. According to Mikko Hypponen of F-Secure, Gamma International even tried to sell FinFisher to the Egyptian Government under former President Mubarak.

As the New York Times reported in March:

Martin J. Muench, a Gamma Group managing director, has said his company does not disclose its customers but that Gamma Group sold its technology to governments only to monitor criminals. He said that it was most frequently used “against pedophiles, terrorists, organized crime, kidnapping and human trafficking.”

But evidence suggests the software is being sold to governments where the potential for abuse is high. “If you look at the list of countries that Gamma is selling to, many do not have a robust rule of law,” Mr. Marquis-Boire said. “Rather than catching kidnappers and drug dealers, it looks more likely that it is being used for politically motivated surveillance.”

FinSpy vs. Mozilla Firefox.

The Citizen Lab released research on the topic a few days ago titled “For Their Eyes Only: The Commercialization of Digital Spying.” The data in this report is shocking in many ways, including a mobile version of FinSpy that follows the same path as its desktop equivalent.

They also have a sample package that realistically masquerades as Mozilla’s Firefox. They copied so many details that Mozilla sent Gamma International a cease-and-desist letter, according to Wired. As you see in the screenshot below, the properties of the executable are identical. How would one ever know the difference? You could rely on virus scanners, but without a sample of the malicious code they won’t be able to detect or stop it.

The tried-and-true security tools that most of us depend on are reactive. You have to wait on security researchers to tear apart samples that they find in the wild to give you reactive protection. It’s the same old cat-and-mouse game that leaves you open to attack.

Fortunately, there is a way to end the game. The Bit9 Trust-based Security Platform takes a different approach by blocking the execution of untrusted files across endpoints and servers. Let’s look through the Citizen Lab’s research paper and see how Bit9 would stop these threats.

  • In the messages sent to Bahrain dissidents, used the “right-to-left override” attack. From the research paper: “The RLO character (U+202e in unicode) controls the positioning of characters in text containing characters flowing from right to left, such as Arabic or Hebrew. The malware appears on a victim’s desktop as ‘exe.Rajab1.jpg’ (for example), along with the default Windows icon for a picture file without thumbnail. But, when the UTF-8 based filename is displayed in ANSI, the name is displayed as ‘gpj.1bajaR.exe.’ Believing that they are opening a harmless ‘.jpg,’ victims are instead tricked into running an executable ‘.exe’ file.”
    • If Bit9 were installed and running in high-enforcement mode, the unknown or untrusted executable would not have executed. Even if you were running Bit9 in block-and-ask mode, the user would be alerted that a program was trying to run something other than a .jpg.
  • In emails sent to the Moroccan citizen media and journalism project Mamfakinch, the payload was in a malicious java file, “adobe.jar.” This file then facilitated the installation of a multi-platform (OSX and Windows) backdoor. On Windows, it writes a number of files, including ZsROY7X.-MP. This file appears to provide the main backdoor functionality. It adds a registry key to ensure the Trojan stays persistent and runs via rundll32.
    • Bit9 has the ability to track and block Java files as it does other executables, but it isn’t turned on by default. So if you had that Java option enabled, Bit9 would keep “adobe.jar” from ever executing. Let’s say you don’t have Java tracking enabled. In that case, “adobe.jar” would execute, writing out the files to the endpoint. Bit9 examines each file for its contents, finding the file “ZsROY7X.-MP” to be executable as DLL. When rundll32.exe is called to load it that execution will be blocked. The Trojan will never be able to execute with Bit9 installed.
  • In an email sent to Ahmed Mansoor, a prominent UAE blogger who was imprisoned, the payload is a malicious document that looks like a Microsoft Word file, but is an RTF file that exploits a stack-based buffer overflow in the RTF format and downloads additional payloads. Using a Windows API, it downloads a second file, which is also a downloader. Then the third stage is where the backdoor is downloaded, “verimportant.doc3.” The file then writes out several files, including “V46lMhsH.shv,” which is run via “rundll32.exe.”
    • This use case has a different point of injection, but the same outcome. In this case, either the second downloader or the backdoor itself would be blocked by Bit9. Since the backdoor wouldn’t execute, cleanup would be relatively easy since it wasn’t able to inject itself into other software.
  • In the use case of the modified version of Firefox, the user would be tricked into installing the wrong version by DNS poisoning, link-jacking, cross-site scripting, clever emails, or other means. The user would then install what looks to be a normally functioning version of Firefox. Infecting an endpoint in this manner tricks the users into accepting changes to his or her system. They know they are installing software, so they are more likely to click “yes” to any security warnings.
    • Companies using Bit9 build a trust-based security approach that ensures any software delivered and executed on an endpoint has been approved in some trusted fashion. Whatever model is deployed, it can prevent “trick the end user” attacks because the malicious version of Firefox is not signed by Mozilla. It would not be able to pass the rigors of a trust-based approach and would not be allowed to execute on the endpoint.

Malware comes in various shapes and sizes, with some written by criminals and others written by private companies. Keeping up with these advanced threats requires a new approach to security. Bit9 ensures that only trusted software can run, as opposed to relying on deep analysis of already-known threats that can take time and money to defend against while still leaving you unsecure. A trust-based approach is the most secure method to ensure your endpoints and servers are not being spied on by foreign governments using products such as FinFisher and FinSpy.

Posted in Bit9, Security | Leave a Comment »

%d bloggers like this: