March 16, 2016 By Larry Loeb 2 min read

Using Microsoft Word macros as a vector for the propagation of malware has been mined by many cybercriminals in the past. But there has been an effort lately to take this vector to another level, CSO Online reported. What’s new is that the macros allow fileless malware to load onto a machine’s memory.

Phishing Emails, Macros and More

Palo Alto Networks found about 1,500 phishing emails being used in a campaign it called PowerSniff. These emails were crafted with more personally relevant information than is usually seen in such spam attempts.

Phishers usually included information designed to engender a feeling of trust, perhaps by offering something like a fellow worker’s location. The emails were all developed with social engineering techniques that focused on encouraging the recipient to click on the poisoned link.

Once the attachment was opened, the embedded macro would create a hidden instance of powershell.exe that contained special command-line arguments. Since PowerShell has its own scripting language, commands formed in that language will be executed.

Fileless Malware at Work

First, the malware sees if the machine is running a 32- or 64-bit Windows OS version using the result of a check against the size of the IntPtr object type. The malware payload that corresponds to the configuration of the target machine is then downloaded.

Here comes the new part of the technique: The malware powershell.exe goes on to stuff the downloaded PowerShell commands directly into memory rather than create an additional file to be read back at a later step. Loading the malware straight into memory makes it more potent; intermediate steps are reduced or eliminated in its path because of where it is located.

CSO Online noted that the malware that ends up in memory performs many tasks. “First it tries to determine if the environment is a virtual machine or sandbox like those used by malware analysts,” author Lucian Constantin wrote.

“It then scans the network configuration for strings like school, hospital, college, health and nurse. It also scans the network for other machines with names including teacher, student, schoolboard, pediatrics, orthoped, as well as POS, store, shop and sale. Cached URLs are scanned for a number of financial websites and names like Citrix and XenApp.”

If the malware finds its named target, a dynamic link library associated with that target is downloaded from its command-and-control server.

The Technique Has Spread

A similar combination of PowerShell and fileless malware was observed by the SANS Institute’s Internet Storm Center. It’s not just PowerSniff, either; the InfoSec Handlers Diary Blog has specifics about variants of this technique that are now showing up, as well.

It bears repeating: Make sure employees don’t open suspicious attachments on Word documents. This exploit is just one of the many bad things that may happen if effective caution isn’t used.

More from

Hive0137 and AI-supplemented malware distribution

12 min read - IBM X-Force tracks dozens of threat actor groups. One group in particular, tracked by X-Force as Hive0137, has been a highly active malware distributor since at least October 2023. Nominated by X-Force as having the “Most Complex Infection Chain” in a campaign in 2023, Hive0137 campaigns deliver DarkGate, NetSupport, T34-Loader and Pikabot malware payloads, some of which are likely used for initial access in ransomware attacks. The crypters used in the infection chains also suggest a close relationship with former…

Unveiling the latest banking trojan threats in LATAM

9 min read - This post was made possible through the research contributions of Amir Gendler.In our most recent research in the Latin American (LATAM) region, we at IBM Security Lab have observed a surge in campaigns linked with malicious Chrome extensions. These campaigns primarily target Latin America, with a particular emphasis on its financial institutions.In this blog post, we’ll shed light on the group responsible for disseminating this campaign. We’ll delve into the method of web injects and Man in the Browser, and…

Crisis communication: What NOT to do

4 min read - Read the 1st blog in this series, Cybersecurity crisis communication: What to doWhen an organization experiences a cyberattack, tensions are high, customers are concerned and the business is typically not operating at full capacity. Every move you make at this point makes a difference to your company’s future, and even a seemingly small mistake can cause permanent reputational damage.Because of the stress and many moving parts that are involved, businesses often fall short when it comes to communication in a crisis.…

Topic updates

Get email updates and stay ahead of the latest threats to the security landscape, thought leadership and research.
Subscribe today