More than a year has passed since the release of our last article on HackingTeam, the Italian company that develops a “legal” spyware tool known as Remote Control System, or short, RCS. In the meantime a lot has been happened, so it’s time for an update on all our current research findings on the RCS malware.
Locating the command servers
One of the most important things we’ve uncovered during our long and extensive research is a specific feature than can be used to fingerprint the RCS command servers (C2s). We presented details of this method at the Virus Bulletin 2013 conference.
To summarize, when a special request is sent to a “harmless” HackingTeam RCS C&C server, the RCS C&C responds with the following error message:
Slide from our VB presentation with HackingTeam’s C2 fingerprint
First of all, the codename ‘RCS’ is there, all right. What we weren’t sure about was the ‘Collector’ referred to in the response. This probably refers to the fact that the server “collects” information from the victims. We used this particular fingerprinting method to scan the entire IPv4 space, which allowed us to find all the IP addresses of the RCS C2s around the world and plot them nicely to a map showing their locations. šWe pinpointed a grand total of 326 C2s.
|Count of C2s||Country name|
Map showing the countries of the current HackingTeam servers’ locations
The largest amount of identified servers was in the US, Kazakhstan and Ecuador. Unfortunately, we can’t be sure that the servers in a certain country are used by that specific country’s LEAs; however, it would make sense for LEAs to put their C&Cs in their own countries in order to avoid cross-border legal problems and the seizure of servers. Nevertheless, several IPs were identified as “government” related based on their WHOIS information and they provide a good indication of who owns them.
It was a well-known fact for quite some time that HackingTeam products included malware for mobile phones. However, these were rarely seen. In particular, the Android and iOS Trojans have never been identified before and represented one of the remaining blank spots in the story. Earlier this year, we discovered a number of mobile malware modules coming from HackingTeam for the following platforms:
- Windows Mobile
All these modules are controlled by the same configuration type, which is a good indication that they are related and belong to the same product family.
Configuration file from the RCS mobile modules
Certainly, our main interest during the analysis of the mobile modules was in iOS and Android, due to their popularity. The iOS module works only on jailbroken devices. Here is a description of the main functionality of the iOS module:
- Control of Wi-Fi, GPS, GPRS
- Recording voice
- E-mail, SMS, MMS
- Listing files
- Visited URLs
- Cached web pages
- Address book
- Call history
- List of apps
- SIM change
- Live microphone
- Camera shots
- Support chats, WhatsApp, Skype, Viber
- Log keystrokes from all apps and screens via libinjection
Disassembled code of the iOS module
The Android module is protected by the DexGuard optimizer/obfuscator and is therefore extremely difficult to analyze. However, we discovered (see the trace below) that the sample has all the functionality of the iOS module listed above – plus support for hijacking information from the following applications:
Trace of an RCS Android sample
Another aspect of particular interest to us was the way the malware samples are installed on mobile devices. We discovered several modules that infect mobile devices connected to infected Windows or Mac OS X computers.
As already mentioned, the iOS module can only be used on jailbroken devices. That is why the iOS infector uses the AFP2 protocol to transfer. The “infector” has a nice GUI that enables installation if there is physical access to the victim’s device or remote admin access to an infected computer.
Main window of the iOS infector
|iPhone 3G||iPhone 3GS||iPhone 4|
|iPhone 4||iPhone 4 (cdma)||iPhone 4s|
|iPhone 5 (gsm)||iPhone 5||iPad|
|iPad2 (Wi-Fi)||iPad2 (gsm)||iPad2 (cdma)|
|iPad2 (Wi-Fi)||iPad3 (Wi-Fi)||iPad3 (gsm)|
|iPad3||iPad4 (Wi-Fi)||iPad4 (gsm)|
List of Apple devices supported by the iOS infector
After successfully connecting, the iOS infector copies several files to iOS and runs an install.sh file:
Part of the install.sh file that is run on an infected iOS device
As mentioned above, remote admin access to an infected computer is one of the possible ways for the malware to be installed on a connected mobile device. The fact that only jailbroken iOS devices are supported can be a limiting factor. However, this is not a huge problem since an attacker can also run a jailbreaking tool such as Evasi0n via the same infected computer. In this case the only thing that can protect a user from a remote jailbreak and infection is the mobile device’s passcode. However, if the device is unlocked while connected to the infected computer, it can be infected by the attacker.
Another interesting mobile infector is the one for BlackBerry devices, which uses the JavaLoader application to load malware samples on BB 4.5 and 5.0. In its disassembled code, we found a path to the PDB debug file, which appears to have been mistakenly forgotten by the authors. The original project was located in the ‘C:\HT\RCSBlackBerry\Workspace\RCS_BB_Infection_Agent\’ when this malware was created.
Part of the code of a Blackberry infector with a path to the PDB file
In this latest installment of our ongoing research, we uncovered a huge infrastructure that is used to control the RCS malware implants. Our latest research has indentified mobile modules that work on all well-known mobile platforms, including as Android and iOS. These modules are installed using infectors – special executables for either Windows or Macs that run on already infected computers. They translate into complete control over the environment in and near a victim’s computer. Secretly activating the microphone and taking regular camera shots provides constant surveillance of the target – which is much more powerful than traditional cloak and dagger operations.
The new data we are publishing on HackingTeam’s RCS is extremely important because it shows the level of sophistication and scale of these surveillance tools. We like to think that if we’re able to protect our customers from such advanced threats, then we’ll sure have no trouble with lesser, more common threats like those posed by cybercriminals.
MD5s of mobile infectors:
- 14b03ada92dd81d6ce57f43889810087 – BlackBerry infector
- 35c4f9f242aae60edbd1fe150bc952d5 – iOS infector
MD5s of Android samples:
MD5s of Windows samples:
List of active C2s on 19.06.2014:
RCS modules (using Kaspersky Lab’s classification names):
HackingTeam 2.0: The Story Goes Mobile
I do government reverse engineering. I am interested in getting blackberry samples. Please contact me