Iranian hacking group OilRig (APT34) executed a stealthy and extended operation, breaching a Middle Eastern government network, and maintaining access for eight months, from February to September 2023. This group, affiliated with Iran’s Ministry of Intelligence and Security (MOIS), has a history of launching attacks against various targets.
Symantec’s threat hunter team uncovered their actions, which included stealing passwords and data, as well as deploying a PowerShell backdoor named ‘PowerExchange’ via Microsoft Exchange for executing commands. This incident reflects the persistent and multifaceted nature of APT34’s capabilities.
During these attacks, OilRig used PowerExchange to log into an Exchange Server with stolen credentials, monitoring emails for base64-encoded attachments containing commands for execution. After carrying out PowerShell commands, often involving file writing and exfiltration, the malware hid the messages in ‘Deleted Items’ to evade detection.
The executed command outputs were sent back to the threat actors via email. This approach allowed APT34 to use Exchange as a backdoor, making their activities appear as typical network traffic and minimizing the need for additional implants.
OilRig employed various tools in their campaign, including Backdoor.Tokel, Trojan.Dirps, Infostealer.Clipog, Mimikatz, and Plink, to execute PowerShell commands, enumerate files, steal clipboard data, capture keystrokes, and more.
The attacks commenced on February 1, 2023, and spanned eight months. The attackers conducted a series of activities, such as configuring RDP access, executing batch files, deploying keyloggers and backdoors, and setting up SSH tunnels. The attackers even performed scans for Log4j vulnerabilities and executed network share mounting and unmounting.
Symantec observed malicious activity on at least 12 computers, but evidence suggests that backdoors and keyloggers were deployed on many more. OilRig’s approach involved a combination of reconnaissance, lateral movement, and data exfiltration, demonstrating the group’s extensive capabilities despite their toolset leaking in 2019. This campaign underscores the continued activity and sophistication of APT34.