Deep Diving into the Anomalous Behavior of a New Multi-Stage Malware Campaign

Sarah Chen — Malware Reverse Engineer

Key Takeaways

  • This campaign utilizes a unique combination of Microsoft Office macros and PowerShell scripts to facilitate initial access.
  • Persistence mechanisms involve the use of scheduled tasks and registry modifications to maintain a foothold.
  • Command-and-control communication leverages cloud services to exfiltrate data stealthily.

Executive Summary

Our investigation into a recent multi-stage malware campaign revealed a sophisticated approach to initial access and persistent presence within compromised networks. The actor employed a variety of techniques including social engineering to deliver malicious payloads disguised as legitimate documents. The malware, which we identified as a variant of Emotet, showcased refined evasion tactics and utilized PowerShell extensively for execution. This report details the attack chain, focusing on the methods used for initial access, execution, persistence, and lateral movement observed during the investigation.

Initial Access

During our analysis, we observed that the initial access vector was primarily through phishing emails. These emails contained malicious attachments, typically Word documents with embedded macros. Specifically, the documents prompted users to enable macros to view content, which then executed a PowerShell command that downloaded additional payloads from a remote server. The actors skillfully crafted the emails to bypass automated filtering mechanisms, employing social engineering tactics that made them seem credible and relevant to the target audience.

Execution & Persistence

Once the initial payload was executed, our research indicated that the malware leveraged a combination of T1059.001 – PowerShell to execute commands and download additional components. The payload included a second-stage dropper that was responsible for pulling down more complex variants of malware, including information stealers and ransomware. In terms of persistence, the actor created scheduled tasks under the names such as TaskSchedulerName, which executed a PowerShell script on system startup. Furthermore, registry keys were modified to ensure that the malware would run post-reboot, specifically under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run.

Command and Control

The command-and-control infrastructure utilized in this campaign was particularly noteworthy. Our investigation revealed that the malware communicated with a cloud-based server that used dynamic DNS to obscure its IP address. The C2 traffic employed HTTPS for communication, providing an extra layer of stealth against traditional detection mechanisms. We captured several beaconing intervals that exhibited patterns consistent with periodic data exfiltration attempts every 30 minutes, leveraging T1071.001 – Application Layer Protocol: Web Protocols to command systems within the target network.

Lateral Movement & Discovery

As the malware spread within the network, it exploited T1021.002 – Remote Services: SMB/Windows Admin Shares for lateral movement. The actor utilized stolen credentials, acquired from credential dumping techniques, to access additional systems on the network. We documented instances where the malware executed commands to enumerate user accounts and groups, retrieving lists from C:\Windows\System32\config\SAM to facilitate further unauthorized access. This allowed the intruders to navigate the network stealthily and expand their foothold.

Impact & Objectives

The ultimate goal of this campaign became apparent as we uncovered evidence of data exfiltration and potential ransomware deployment. The information gathered through the malware targeting sensitive business documents hinted at a financial motivation behind the attack. Our analysis found that the actor staged several large quantities of data for exfiltration through cloud services, which further emphasized the approach of blending malicious activity with routine organizational operations. The potential impact on the victim organizations is severe, leading to financial losses, reputational damage, and operational downtime.

MITRE ATT&CK Mapping

  • T1566 – Phishing: Phishing emails were used to deliver initial malicious payloads.
  • T1203 – Exploitation for Client Execution: Exploitation of Microsoft Office vulnerabilities through enabled macros.
  • T1071.001 – Application Layer Protocol: Web Protocols: Command and control traffic conducted over HTTPS to a dynamic DNS cloud server.
  • T1021.002 – Remote Services: SMB/Windows Admin Shares: Utilized for lateral movement within the network.

Detection Opportunities

  • Monitor email logs for suspicious attachments with macros enabled.
  • Deploy PowerShell logging and auditing to track command execution and detect anomalies.
  • Analyze scheduled tasks and registry modifications for known persistence techniques.

Analyst Notes

This case study highlights the persistent evolution of malware tactics, particularly in the context of social engineering and stealth operations. It’s critical for organizations to implement layered defenses, actively monitor for anomalies, and conduct regular employee training on recognizing phishing attempts. By enhancing threat detection capabilities and incident response readiness, organizations can better mitigate risks posed by adversaries employing similar techniques in the future.

Source: Original Report