Macro-Based Multi-Stage Attack Delivers Password Stealer
A malicious attack uses a multi-stage infection to deploy malware that is capable of stealing passwords from various applications on a victim's computer, Trustwave reports.
The attack starts with spam emails distributed from the Necurs botnet to deliver macro-enabled documents, such as Word docs, Excel spreadsheets, or PowerPoint presentations, to the targets.
As part of this infection campaign, DOCX attachments containing an embedded OLE object that has external references was used. Thus, external access is provided to remote OLE objects to be referenced in the document.xml.rels, Trustwave explains.
As soon as the user opens the file, a remote document is accessed from the URL hxxp://gamestoredownload[.]download/WS-word2017pa[.]doc. Although it has a .doc extension, the file is actually a RTF document.
Once executed on the victim's system, the file attempts to exploit the CVE-2017-11882 vulnerability that Microsoft patched last November in the Office's Equation Editor tool, and which has been already abused in a wide range of attacks.
The RTF file executes an MSHTA command line to download and execute a remote HTA file.
In turn, the HTA file contains VBScript with obfuscated code which decodes to a PowerShell Script designed to fetch and run a remote binary file.
This binary is the final payload that turns out to be a password stealer malware family capable of gathering credentials from email, FTP, and browsers installed on the victim's machine. For that, it concatenates available strings in the memory and uses the RegOpenKeyExW and PathFileExistsW APIs to check if registry or paths of various programs exist.
The malware was observed sending the harvested data to its command and control (C&C) server via a HTTP POST request.
The most interesting aspect of this attack is the use of multiple stages to deliver the final payload, an approach that Trustwave calls unusual. The security researchers also point out that this long infection chain is more likely to fail compared to other, more straightforward attacks.
"Indeed, this approach can be very risky for the malware author.
If any one stage fails, it will have a domino effect on the whole process.
Another noticeable point is that the attack uses file types (DOCX, RTF and HTA), that are not often blocked by email or network gateways unlike the more obvious scripting languages like VBS, JScript or WSF," Trustwave concludes.