In-Depth Analysis of a Multi-Stage Phishing Attack Leveraging Custom Malware

Sarah Chen — Malware Reverse Engineer

Key Takeaways

  • We identified a sophisticated phishing campaign that utilized a bespoke malware payload to establish persistence.
  • The attack leveraged several MITRE ATT&CK techniques, including credential dumping and lateral movement via Pass-the-Hash.
  • Early detection and monitoring of phishing email indicators and related infrastructure can mitigate the attack vector.

Executive Summary

During our investigation of a recent incident, we came across a multi-stage phishing attack involving a customized malware implant that laterally moved within the network. The methodology employed by the threat actor showcased advanced operational security measures and a keen understanding of the target environment. Our analysis revealed the tactics, techniques, and procedures (TTPs) used, carving a clear picture of the attack chain from initial access to goal achievement.

Initial Access

The attack commenced with a well-crafted phishing email directed to employees of the targeted organization. The email included a malicious attachment masquerading as an official document, enticing the recipient to download it. Upon execution, this attachment dropped a lightweight dropper executable at %TEMP%\docupload.exe, which was designed to download the main payload from a command-and-control (C2) server hosted on a dynamic DNS service.

Execution & Persistence

Once the main payload was executed, we observed that it installed additional components in the form of persistent malware. The persistence mechanism involved modifying the registry by adding an entry under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run with the value pointing to %APPDATA%\malware.exe. This ensured that the payload would execute on subsequent logins, maintaining an active presence within the system.

Command and Control

The C2 communication was established through HTTP requests to an unpredictable domain. Our analysis of traffic revealed a beaconing pattern occurring every 60 seconds, enabling the operator to issue commands and download additional modules. The absence of SSL implemented in the initial connection made the C2 traffic easily detectable if network monitoring tools were properly configured. Subsequent stages of communication involved exchanging JSON-formatted data to obfuscate commands and responses.

Lateral Movement & Discovery

With initial foothold achieved, the malware harvested credentials from memory using techniques aligned with T1081 – Credential Dumping. During our investigation, we noted various tools utilized for credential theft, including Windows LSASS. The actor employed Pass-the-Hash tactics to traverse the network, moving laterally to other systems by abusing Windows administrative shares, and performing remote code execution with tools like PsExec.

Impact & Objectives

The primary intent of the threat actor appeared to be exfiltration of sensitive data. Our findings indicated a systematic examination of files related to financial reports and employee data within the targeted organization. By leveraging administrative privileges gained through hijacked credentials, the actor accessed shares containing intellectual property, which posed a significant threat to the organization’s competitive edge.

MITRE ATT&CK Mapping

  • T1071.001 – Application Layer Protocol: Web Protocols: Establishing C2 communication through HTTP.
  • T1081 – Credential Dumping: Extracting stored credentials from the local system.
  • T1550 – Use of Alternative Authentication Materials: Leveraging Pass-the-Hash for lateral movement.

Detection Opportunities

  • Monitor for unusual email patterns and attachments with high-risk file types.
  • Implement real-time monitoring of registry changes particularly under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run.
  • Utilize EDR solutions to track and analyze C2 traffic aiming at dynamic DNS domains.

Analyst Notes

This investigation underscores the importance of robust email filtering and user awareness training. Organizations must maintain a proactive defense posture, ensuring that they can identify and mitigate potential threats before they can escalate. Additionally, enhancing logging and monitoring mechanisms can provide more visibility into potential lateral movement and C2 activity on the network.

Source: Original Report