Deep Dive Analysis of Recent Phishing Campaign Leveraging Custom Malware for Lateral Movement

Daniel Osei — SOC Lead & Malware Analyst

Key Takeaways

  • This campaign utilized spear-phishing emails to deliver a custom dropper, enabling initial access to sensitive networks.
  • The implant was designed to evade detection, employing T1059.001 – Command and Scripting Interpreter: PowerShell for execution and persistence.
  • A well-structured C2 infrastructure was evident, relying on DNS tunneling to achieve stealthy command dissemination.

Executive Summary

In this analysis, we detail a recent, sophisticated phishing campaign we investigated, where adversaries employed a custom dropper to establish initial footholds in targeted environments. Our analysis revealed a series of tactics, techniques, and procedures (TTPs) that aligned closely with known threat actor behaviors, specifically focusing on a combination of social engineering and advanced evasion techniques. The campaign successfully targeted several enterprise networks, compromising critical assets.

Initial Access

The initial access vector was identified as a well-crafted spear-phishing email containing a malicious attachment. During the investigation, we observed that the attachment was a Microsoft Word document designed to look legitimate, urging the user to enable macros. This document employed the T1203 – Exploitation for Client Execution technique, utilizing embedded VBA scripts to download the payload. The dropper, upon execution, established a foothold by saving itself to %APPDATA%\Temp\temp.exe.

Execution & Persistence

Upon execution, the dropper executed a series of obfuscated PowerShell commands that leveraged T1059.001 – Command and Scripting Interpreter: PowerShell. These commands were responsible for fetching the primary implant from a remote server. To ensure persistence, we noted that the malware created a scheduled task, modifying the registry at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\ to include a reference to the executable. This allowed the malware to execute at user logon.

Command and Control

The implant established communication with its command and control (C2) servers through DNS tunneling, which is indicative of a well-orchestrated operation designed to evade network detection. Our observation of the traffic patterns pointed to a domain generated algorithm (DGA) for domain resolution purposes. The malware used T1071.001 – Application Layer Protocol: Web Protocols for protocol dynamics, facilitating covert communication with the threat actors.

Lateral Movement & Discovery

Following successful C2 communications, the implant initiated lateral movement across the compromised network. Leveraging T1075 – Pass the Hash techniques, we documented attempts to access credential store entries and escalate privileges. The malware also queried Active Directory for user groups, highlighting a clear discovery phase aimed at gaining further access to sensitive data and systems.

Impact & Objectives

The impact of this campaign was significant, with evidence pointing towards data exfiltration as one of the primary objectives. The actors sought to identify high-value targets within the organization, likely intending to harvest sensitive intellectual property and employee credentials. Furthermore, the use of lateral movement techniques indicated a strategic approach, aiming for data access beyond the initial compromised accounts.

MITRE ATT&CK Mapping

  • T1203 – Exploitation for Client Execution: Exploitation of vulnerabilities in documents for malware delivery.
  • T1059.001 – Command and Scripting Interpreter: PowerShell: Use of PowerShell scripts for execution and post-exploitation activities.
  • T1071.001 – Application Layer Protocol: Web Protocols: Covert communication through web protocols for command and control operations.
  • T1075 – Pass the Hash: Credential accessing behavior to facilitate lateral movement within the network.

Detection Opportunities

  • Monitor for unusual file access to %APPDATA%\Temp\ directory, specifically for files with execution attempts.
  • Implement stricter email filtering rules to detect and block malicious attachments, especially those utilizing macros.
  • Utilize anomaly detection systems to identify deviations in network traffic patterns, particularly pertaining to DNS requests.

Analyst Notes

This investigation highlights the importance of proactive measures in email security, endpoint protection, and network monitoring. The sophisticated nature of the techniques employed calls for a revisitation of defense strategies, concentrating on user awareness as the frontline in defense against phishing attempts. Continuous updates to detection signatures and threat intelligence sharing will be crucial in mitigating future risks associated with this threat landscape.

Source: Original Report