In-Depth Analysis of a Multi-Stage Malware Campaign Utilizing Custom Dropper and C2 Architecture

Daniel Osei — SOC Lead & Malware Analyst

Key Takeaways

  • A sophisticated multi-stage malware campaign utilizes a custom dropper to establish foothold.
  • The actor employs T1059.001 – PowerShell for execution and persistence mechanisms.
  • Advanced command and control techniques disguised the C2 communication within legitimate traffic.

Executive Summary

During our analysis of a recent malware sample, we observed a well-structured attack chain designed to penetrate corporate networks using a multi-stage approach. The campaign leveraged a custom dropper that delivered a payload with an array of functionalities. Initial reconnaissance indicated that the threat actor aimed at data exfiltration while maintaining persistence and control over the compromised environment.

Initial Access

Our investigation revealed that initial access was gained through a spear-phishing email with a malicious attachment. The dropper, identified as a modified version of Emotet, was delivered as a Microsoft Word document that exploited macros for execution. Users were manipulated into enabling macros, triggering the execution of embedded PowerShell scripts that initiated the malware payload.

Execution & Persistence

Upon execution, the dropper deployed a secondary payload using T1059.001 – PowerShell. This immediate execution exploited common scripting methods to download a more advanced implant from its command and control (C2) server. During persistence analysis, we noted that the implant registered itself via the registry at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\, utilizing a subkey to maintain execution post-reboot.

Command and Control

The C2 infrastructure was particularly noteworthy due to its sophistication. We identified several domains that the malware used to beacon back to the actor’s server. The communication was embedded within regular HTTP traffic, making it difficult to detect. Moreover, the malware utilized a randomized domain generation algorithm (DGA) for its C2 addresses, ensuring reliable communication despite potential takedowns.

Lateral Movement & Discovery

Using T1021.001 – Remote Services, the implanted payload employed PsExec to facilitate lateral movement across the network. We traced several attempts where the actor used Windows Management Instrumentation (WMI) calls to discover other hosts within the local network, seeking privileged accounts to expand their reach. This lateral movement was coupled with attempts to harvest credentials stored in the Windows Credential Manager.

Impact & Objectives

The ultimate objective of the malware deployment was to exfiltrate sensitive data. During our analysis, we discovered endpoint activity related to file transfers to the actor’s C2 servers within compressed archives. Targeted data included financial documents and intellectual property, indicating that the threat actor was interested in valuable enterprise data.

MITRE ATT&CK Mapping

  • T1059.001 – PowerShell: The initial execution of the payload was achieved via PowerShell scripts executed directly from the dropper.
  • T1071.001 – Application Layer Protocol: The malware used standard HTTP/S protocols for command and control channels.
  • T1021.001 – Remote Services: The actor invoked PsExec for lateral movement to compromised hosts.
  • T1086 – PowerShell: Further interactions utilized PowerShell for command execution within compromised environments.
  • T1075 – Binary Padding: The malware utilized padding techniques to obfuscate its payload and evade detection.

Detection Opportunities

  • Monitor for suspicious execution of PowerShell scripts from document files and unauthorized registry modifications.
  • Implement logging and analysis of outbound HTTP/S traffic to identify abnormal patterns consistent with C2 communication.
  • Utilize endpoint detection solutions to identify and block lateral movement techniques via protocols like WMI and PsExec.

Analyst Notes

This campaign exemplifies the importance of a multi-layered defense strategy, especially regarding user education on phishing attacks and the risks associated with enabling macros. Furthermore, continuous monitoring of network traffic for anomalies and unauthorized access attempts is paramount to prevent such sophisticated malware deployments from achieving their objectives.

Source: Original Report