MuddyWater Threat Actor Expands Targets List

The MuddyWater cyber-espionage campaign was observed using spear-phishing emails to target entities in more countries, Kaspersky Lab reports.

The MuddyWater threat actor was first detailed last year, focusing mainly on governmental targets in Iraq and Saudi Arabia. Attribution appears difficult and numerous new attacks were linked to the group this year.

Recently, the group was observed targeting government bodies, military entities, telcos and educational institutions in Jordan, Turkey, Azerbaijan and Pakistan. Other victims were detected in Mali, Austria, Russia, Iran, and Bahrain, and the initially discovered attacks on Iraq and Saudi Arabia continued as well.

The attacks used new spear-phishing documents and relied on social engineering to trick users into enable malicious macros. Password-protected to hinder analysis, the macros in the malicious documents execute obfuscated VBA code when enabled.

Base64-encoded, the macro payload drops three files in the “ProgramData” folder and also adds a registry entry in the current user’s RUN key (HKCU) to ensure execution when the user next logs in. Sometimes, the macro spawns the malicious payload/process instantly and doesn’t wait for the next user login.

The attacks leverage legitimate executables from Microsoft, all of which are whitelisted, thus ensuring the payload’s execution. The macro drops either INF, SCT, and text files or VBS and text files.

In the first scenario, INF is launched via the advpack.dll “LaunchINFSection” function to register the SCT file (scriptlet file) via scrobj.dll (Microsoft Scriptlet library). Next, JavaScript or VBscript code in the SCT leverages WMI (winmgmt) to spawn a PowerShell one-liner that consumes the text file.

In the second scenario, the VBS file decodes itself and calls mshta.exe. One line of VBScript code passed to mshta spawns a PowerShell one-liner to consume the text file.

The one-liner PowerShell code reads the encoded text file dropped in ProgramData and decodes it to obfuscated code.

The code disables the Macro Warnings and Protected View in Office, to ensure future attacks can be performed without user interaction. It also checks the running processes against a hardcoded list and reboots the machine if it finds any match.

For communication with the command and control (C&C) server, the code randomly selects a URL from a list. If communication fails, it attempts to connect to another randomly selected URL from that list, then sleeps from one to 30 seconds and loops again.

Once a machine has been infected, the code attempts to obtain the victim’s public IP and sends the information along with OS version, internal IP, machine name, domain name, and username to the C&C, which allows the attackers to filter victims.

Based on commands received from the C&C, the code can take screenshots, retrieve another stage of the PowerShell code that is executed via Excel, Outlook, or Explorer.exe, download files from the C&C and save them to “ProgramData,” destroy the disk drives C, D, E, F and then reboot the system, or simply reboot or shut down the victim’s machine.

Most of the group’s victims are in Jordan, Turkey, Iraq, Pakistan, Saudi Arabia, Afghanistan and Azerbaijan, but Russia, Iran, Bahrain, Austria and Mali were also impacted. The attacks, Kaspersky notes, are geopolitically motivated, targeting sensitive personnel and organizations.

“The MuddyWaters group has carried out a large number of attacks and demonstrated advanced social engineering, in addition to the active development of attacks, infrastructure and the use of new methods and techniques. The attackers are actively improving their toolkit in an effort to minimize their exposure to security products and services,” Kaspersky concludes.

view counter

Ionut Arghire is an international correspondent for SecurityWeek.

Previous Columns by Ionut Arghire:

Tags: