Modern cyber-attacks against well-defended enterprises are not as simple as you may think. They are comprised of many components in charge of different tasks. For example, if an attacker wishes to execute a destructive attack it will require at least:
- A backdoor for reconnaissance and stealing sensitive information later to be publicly released, enabling the deployment of future modules
- A destructive wiper module for rendering endpoints unusable
- A worm-like component for distributing the malware across the organization
The RAT (Remote Administration Tool or Remote Access Trojan) is a key component in such attacks. Once an initial foothold is established, it enables attackers to collect sensitive data and intelligence from the target and execute secondary payloads like the wiper in our example. It is common to buy an “off-the-shelf” RAT sold at as low a price as 20-30 US dollars or even for free.
Although this type of malware has many families and strains almost any RAT will include:
- A keylogger
- Modules for watching and listening to the webcam and microphone
- Functionality to steal credentials from sensitive software such as browsers, SSH or FTP clients
- Capability to execute secondary payloads on the target machine
The above capabilities combined with the high availability of RATs make it a go-to solution for attackers where an “all-around player” malware is required.
Staying Stealthy by Exhausting Traditional Security Products
“Commodity” RATs are used by individuals but during the past decade we’ve seen it used by cybercrime gangs and state-sponsored threat actors as well.
For petty thieves and state sponsored actors alike, a key factor for successfully infecting the target is staying undetected by ALL security products. It is a challenge to keep your tool undetected, especially when using commodity malware. As anyone may purchase the same RAT – it is effectively shared across an unknown number of other attackers. You can assume that:
- Some may be less skilled in their actions and cause the detection of the tool
- Other “attackers” may be intelligence divisions of security vendors
Both cases will result in malware analysts trying to investigate the malware, challenging them to deploy signatures detecting the new variant as soon as possible. The rapid deployment of such signatures will render the intercepted variant useless against potential victims with updated signatures.
The operators of RATs are aware of this potential threat to their ventures; therefore, they will try to disguise their malware, obfuscating its true nature. While there are many different techniques to obfuscate a malware, any decent implementation will result in a payload which is highly difficult to generically sign and detect, generating different-looking payloads even when created by the same perpetrator. Moreover, during this “packing” process, capabilities to detect security analysis tools and sandboxes are added. It might sound complex, but creating a weaponized, obfuscated and evasive RAT instance is just a click away nowadays.
Java RATs & Adwind
Malware written in Java is a double challenge for security companies – it is obfuscated like similar malicious software, but unlike others it is not compiled into an executable. The delivered payload is written in an “intermediate language”, interpreted to machine code only when it is executed. This structure challenges both traditional and NG vendors, as their techniques are struggling to handle it.
Defenders’ limitations against Java threats made it an increasingly common technology in the RAT world. There are many known “products” in this market, including:
According to Kaspersky’s researchers they all share a similar base, but at the very least they are branded and sold separately.
Although it is based on a different technology behind the scenes, Java-based RATs are distributed just like any other malware.
Recently we witnessed a campaign demonstrating all the above properties, based on the Adwind RAT as the main component of the attack.
It was spread by attaching the Java executable (.jar) to a luring phishing email directly. This specific RAT was a key component in campaigns against banks and one of its variants was linked to the assassination of Alberto Nisman.
Although you may think this type of threat can be easily detected by blocking all .jar attachments – the reality is that attackers abuse the fact that you can enforce limitations on email clients to some extent without harming users’ activity. They use many ways to deliver Adwind, as the evolution of this in-the-wild threat proves. We’ve already witnessed how it is attached as a ZIP and even as an embedded URL.
The Adwind malware functionality from the latest campaign wasn’t different from earlier campaigns, demonstrating the following capabilities:
- Achieving persistence by modifying the registry and replicating itself to the temporary files folder
- Virtual machine detection – commonly used as a sandbox or by security researchers, terminating itself if found
- Gathering information about various products installed on the endpoint using WMI
- Terminating over ~125 applications including popular AVs and popular malware reverse-engineering software like Wireshark
- Stealing credentials from Outlook, common messaging applications and browsers
- Disabling Windows’ User Access Control (UAC) and other security features.
- Generic modules for recording keystrokes, microphone and webcam.
Adwind’s technical properties and a YARA rule to detect it are available in the last section of this post.
Overcoming Obfuscation Simply and Elegantly
We at Minerva understood that malware can be obfuscated in countless ways, but if it wishes to stay under the radar – testing for the presence of dangerous environment greatly reduces that likelihood. Adwind is a good example for this evasive behavior, as it tests if it is executed in either VirtualBox or VMware virtual machine prior to any malicious activity.
Minerva’s Hostile Environment Simulation, part of the Minerva Anti-Evasion Platform excels against threats trying to stay under the radar and Adwind is just another proof for that. The test for these artifacts is well obfuscated and hidden by the inherited properties of Java – yet, it must be performed somehow. Minerva’s endpoint protection solution intercepts the test and makes the malware think its greatest fears are present. This groundbreaking technology prevents the execution of Adwind and other RATs, no matter how it is obfuscated.
author=””Asaf Aprozper, asafa AT minerva-labs.com””
description = “”Adwind RAT””
last modified = “”2017-06-25″”
$a0 = “”META-INF/MANIFEST.MF””
$a1 = /Main(\$)Q[0-9][0-9][0-9][0-9]/
$PK = “”PK””
$PK at 0 and $a0 and $a1
- MyFax message from “<COMPANY NAME>” – 4 page(s), Caller-ID: 1-516-799-6300″
- 转发: TRY5000001054739 wire recall and 转发: Payment
- Re: Documents of shipment(TOP URGENT)