Deep Dive into the Recent Phishing Campaign Leveraging Fake Document Macros

Daniel Osei — SOC Lead & Malware Analyst

Key Takeaways

  • Exploited phony document macros for initial access, utilizing social engineering techniques.
  • We identified multiple persistence mechanisms deployed via Windows Task Scheduler and registry modifications.
  • Command and Control infrastructure employed a mix of HTTP and DNS tunneling techniques to evade defenses.

Executive Summary

Our investigation of a recent malware campaign uncovered a series of sophisticated initial access techniques centered around phishing emails containing malicious Microsoft Word documents. The campaign exploited users’ trust through impersonation of reputable organizations. Once the document was opened, the adversary utilized macro techniques to execute payloads, gaining foothold within targeted environments. Throughout the investigation, we documented critical indicators of compromise (IOCs) that facilitate detection and response efforts for organizations facing similar threats.

Initial Access

The initial access vector employed by the threat actor was largely facilitated through a phishing campaign. Our analysis revealed that the emails were crafted to resemble legitimate communications, often including a subject line that referenced urgent business matters. This social engineering tactic aimed to incite curiosity and urgency, prompting recipients to open the attached Microsoft Word documents. Upon execution, the document prompted users to enable macros, which, once allowed, triggered a series of base64-encoded scripts that downloaded additional malware.

Execution & Persistence

Once the payload successfully executed, it immediately established persistence on the infected system. We observed that the threat actor added entries to the Windows Task Scheduler, ensuring that the implant would run at user logon. The specific task was often named in a way to disguise its legitimate intent, residing under C:\Windows\System32\Tasks\LegitTaskName. Additionally, our investigation revealed modifications to registry keys, specifically HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\MaliciousPayload, allowing the malware to remain active even after system reboots.

Command and Control

The command and control (C2) communication was primarily conducted over HTTPs. The actors utilized fast-flux techniques, allowing them to regularly change the domain and IP addresses associated with their C2 infrastructure. During our analysis, we recorded several unique domains used for the C2 communication, frequently changing to evade detection. Notably, some of the requests contained indicators of DNS query tunneling, indicating an advanced evasion tactic that complicates traffic analysis and detection.

Lateral Movement & Discovery

The adversary displayed capabilities for lateral movement within compromised networks, indicating a broader campaign targeting multiple systems. Our investigation revealed that the threat actor exploited valid administrator credentials acquired during initial access. They employed the Windows Management Instrumentation (T[1086] – WMI) to execute commands remotely across the network. We also observed scanning for network shares, often invoking net view commands to enumerate connected systems and identify potential targets for further exploitation.

Impact & Objectives

The overarching goal of this campaign appeared to be data exfiltration and establishing a long-term presence within the corporate environment. We documented instances of sensitive data retrieval, which suggested that the threat actor intended to gather information for either financial gain or espionage. The malware not only extracted data but also created backdoors for future access, highlighting a clear objective of establishing persistence and maximizing their operational footprint within the victim’s network.

MITRE ATT&CK Mapping

  • T1566 – Phishing: The campaign heavily relied on phishing emails to deliver the malicious payloads.
  • T1203 – Exploitation for Client Execution: Exploitation of Microsoft Word macros to execute embedded scripts.
  • T1053 – Scheduled Task: The malware created tasks within the Windows Task Scheduler for persistence.
  • T1071.001 – Application Layer Protocol: Web Protocols: Use of HTTP/S for command and control communications.

Detection Opportunities

  • Monitoring for suspicious entries in the Windows Task Scheduler can help identify potentially malicious tasks.
  • Implementing email filtering rules that spot characteristics of phishing attempts can significantly reduce initial access risks.
  • Analyzing network traffic for unusual patterns, particularly DNS tunneling activity, enhances visibility into C2 communications.

Analyst Notes

This campaign reinforces the critical importance of user training and awareness around phishing techniques, especially in organizations that handle sensitive data. Continuous monitoring, coupled with robust detection mechanisms such as implementing honeypots, could greatly enhance preparedness against similar threats. As the threat landscape evolves, so must our strategies for combating sophisticated cyber adversaries. Cyber hygiene practices remain vital in reducing these risks.

Source: Original Report