Sophisticated Phishing Campaign Exploits Office Vulnerabilities to Deploy Custom Malware

Sarah Chen — Malware Reverse Engineer

Key Takeaways

  • A targeted phishing campaign utilized malicious document attachments to exploit Microsoft Office vulnerabilities.
  • The malware employed a multi-stage dropper mechanism, facilitating the deployment of a custom implant.
  • Indicators of compromise highlighted lateral movement techniques leveraging Windows Management Instrumentation (WMI).

Executive Summary

During our analysis of a recent phishing campaign, we observed that attackers targeted several industries with carefully crafted emails containing malicious Microsoft Office document attachments. The goal: to exploit vulnerabilities in Office to deploy a custom payload. This campaign highlights not only the sophistication of modern threat actors but also the necessity for enhanced detection and response protocols to mitigate such risks.

Initial Access

Our investigation began with the identification of multiple phishing emails routed through compromised mail servers. The emails contained a link to a malicious document hosted on a cloud storage service. Upon download, users were prompted to enable macros, which initiated the infection chain. By exploiting CVE-XXXX-XXXX, the document leveraged a vulnerability in Microsoft’s macro interpreter—facilitating execution of embedded payloads. The initial malicious document, located at C:\Users\\Downloads\malicious.docx, was designed to appear legitimate, luring the victim into enabling content.

Execution & Persistence

Once the macros were enabled, they initiated a PowerShell command that executed a base64-encoded .NET payload. This payload acted as a dropper, which we identified as DropperX. The dropper was responsible for creating a persistence mechanism using the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\ registry key, specifically creating an entry named MalwareService. This ensured that the implant executed on every user logon. Our analysis revealed that the dropper also had a built-in self-delete routine to remove traces from the system.

Command and Control

The dropper established a covert connection to a remote command and control (C2) server, which we traced to an IP address registered to a cloud provider. The C2 server employed a dynamic DNS service, complicating tracking efforts. Communication was conducted via HTTPS, using obfuscated queries to avoid detection. The implant regularly beaconed back to the server every 30 seconds, allowing the actor to control the compromised host remotely. We noted communication patterns and identified specific payloads downloaded for further exploitation of the environment.

Lateral Movement & Discovery

Following initial compromise, the implant commenced lateral movement within the network. Our analysis uncovered that the actor utilized Credential Dumping (T1003) techniques to harvest credentials from memory and Windows Credential Manager, facilitating access to additional hosts. Leveraging WMI (T1047) for remote execution, the actor was able to execute commands on other machines without raising alarms. We found references in the logs pointing to queries made to WMI namespaces, indicating the use of commands like Get-WmiObject -Class Win32_Process to run new instances of the malware.

Impact & Objectives

The goals of the actor appeared to be multifaceted: data exfiltration, lateral movement for network disruption, and potentially deploying additional payloads for ransomware. During our investigation, we found that the implant had capabilities for keylogging and screen capture. Notably, files were exfiltrated via FTP and cloud storage APIs, and we suspect that the actor has connections to organized cybercriminal groups, given the operations’ level of sophistication. The damage could extend beyond immediate data loss, potentially leading to significant operational downtime.

MITRE ATT&CK Mapping

  • T1566 – Phishing: Utilization of phishing emails with malicious document attachments.
  • T1059.001 – PowerShell: Execution of PowerShell commands to run the payloads.
  • T1003 – Credential Dumping: Techniques used for credential collection from the compromised environment.
  • T1047 – Windows Management Instrumentation: Used for lateral movement and remote command execution.

Detection Opportunities

  • Monitor for unusual registry modifications under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\.
  • Implement detection for known phishing indicators, such as URL patterns leading to malicious document downloads.
  • Utilize endpoint detection and response (EDR) tools to capture anomalous PowerShell execution arguments and commands.

Analyst Notes

The complexity and stealth exhibited by this threat illuminate a broader trend in cyberattacks, where threat actors craft targeted campaigns utilizing social engineering, combined with advanced techniques for exploitations. Understanding the attack vector—phishing in this case—can significantly aid in improving defensive measures. Continuous user education, along with the deployment of advanced detection technologies, is essential in combating these sophisticated attacks effectively. Regular audits and threat hunting exercises should also be conducted to identify anomalies suggesting lateral movement and other malicious activities within the network.

Source: Original Report