Threat Response Unit

MuddyWater APT + Tsundere Botnet: EtherHiding the C2

eSentire Threat Response Unit (TRU)

March 12, 2026

9 MINS READ

What did we find?

In March 2026, eSentire's Threat Response Unit (TRU) investigated an open-directory web server attributed to MuddyWater, an Iranian state-sponsored APT active since at least 2017 known for conducting cyber espionage campaigns against organizations worldwide. During the investigation, TRU identified a file that establishes persistence and deploys the Tsundere botnet malware.

Tsundere is a botnet that enables arbitrary command execution on victim machines and uses a technique called "EtherHiding" to retrieve C2 servers stored in smart contracts on the Ethereum blockchain. The malware is suspected to be a Malware-as-a-Service (MaaS) offering of Russian origin, a finding that TRU's analysis supports through the discovery of logic that checks whether the infected host is located in a CIS country (including Ukraine) and terminates execution if so. MuddyWater's deployment of Tsundere demonstrates they are leveraging MaaS offerings, even those developed by Russian threat actors, to achieve their operational objectives.

Artifacts discovered in our analysis are nearly identical to those documented in Ctrl-Alt-Intel's blog, MuddyWater Exposed: Inside an Iranian APT operation. Additionally, Tsundere and the persistence module covered in this blog share many JavaScript obfuscation similarities with North Korean APT malware we analyzed in our previous blog, North Korean APT Malware Analysis: DEV#POPPER RAT and OmniStealer (Everyday I'm Shufflin').

In both cases, the free tool Obfuscator.io was likely used to obfuscate Node.js-based payloads - a common approach across Node.js malware in general.

For a comprehensive list of TTPs, targeted vulnerabilities, and recommendations to protect against MuddyWater, see eSentire's security advisory, "Iranian APT MuddyWater Exposed".

Stager PowerShell Analysis (reset.ps1)

The PowerShell script found in the open directory, "reset.ps1" is a stager that decodes, decrypts, and executes Tsundere Botnet named, "sysuu2etiprun.js", and a persistence module named, "VfZUSQi6oerKau.js".

The function "bxgdbzgf" takes three parameters: hex-encoded ciphertext to decrypt, the base64 encoded AES key, and base64 encoded AES IV. It is called twice, first to decrypt Tsundere, and subsequently to decrypt the persistence module.

Figure 1 - reset.ps1 file contents correlating to persistence/Tsundere
Figure 1 - reset.ps1 file contents correlating to persistence/Tsundere

The following CyberChef recipe emulates the behavior of reset.ps1 - decrypting the persistence module and Tsundere Botnet payloads using the AES key and IV identified in reset.ps1:

Find_/_Replace({'option':'Regex','string':'[^0-9A-Fa-f]'},'',true,true,true,true)
AES_Decrypt({'option':'Base64','string':'iW06Rp1urCAH5d26NZHHZL6ehy57J4MVvkM3T/alhuU='},{'option':'Base64','string':'lTKi4AViF/tqc1+6HGprfw=='},'CBC','Hex','Raw',{'option':'Hex','string':''},{'option':'Hex','string':''})

Tsundere Analysis (sysuu2etiprun.js)

Tsundere uses WebSockets + AES-256-CBC to establish encrypted channels with C2 servers. C2 servers are retrieved from the Ethereum blockchain via a list of RPC providers that are used in acquiring the C2 address from an Ethereum smart contract. This technique is known as "EtherHiding".

Prior to retrieving the C2 address, Tsundere checks if the victim machine's language is affiliated with any of the following countries via PowerShell. If so, it exits immediately.

The PowerShell command used in this process is included in the following code snippet:

powershell.exe -Command "[System.Globalization.CultureInfo]::InstalledUICulture.Name"
Figure 2 - CIS country check via PowerShell
Figure 2 - CIS country check via PowerShell

After ensuring the victim device is not affiliated with the aforementioned list of countries, it sends a request to an RPC provider to retrieve the hex-encoded C2 address, connects to the C2 via Websocket, and establishes handlers for messages, e.g. "handleMessage".

Figure 3 - Connect function, check CIS, fetch C2 via EtherHiding, setup message callbacks
Figure 3 - Connect function, check CIS, fetch C2 via EtherHiding, setup message callbacks

The figure below displays the logic used in sending a request to the RPC provider, where the ethers.js library is used to get the C2 address string from the smart contract.

Figure 4 - Fetch C2 via EtherHiding
Figure 4 - Fetch C2 via EtherHiding

The following Ethereum wallet and smart contract addresses were identified in our analysis:

The following RPC servers are used to determine which C2 address to use by querying all of them concurrently and selecting the C2 address that is returned most frequently:

For clarification purposes, here is the Set String function input data (decoded from hex) from the wallet address to the smart contract address, revealing a Tsundere Botnet C2 at 193.17.183[.]126 (ASN 400992 "ZhouyiSat Communications").

There are three transactions from the wallet to the smart contract, each revealing two different Tsundere Botnet C2s, the one previously mentioned, and 185.236.25[.]119 (ASN 400992 "ZhouyiSat Communications").

Figure 5 - C2 stored in Ethereum smart contract input data
Figure 5 - C2 stored in Ethereum smart contract input data

After acquiring the C2 via EtherHiding, Tsundere establishes initial contact with it to retrieve a 32-byte AES key and subsequent communications to retrieve a 16-byte AES IV. It then generates a Hardware ID (HWID) of the victim machine by sha256 hashing a JSON-serialized object containing fingerprint information about the victim machine (shown below):

It then sends this HWID and associated fingerprint information to the C2.

Figure 6 - Fingerprint victim OS, sha256 hash JSON-serialized object
Figure 6 - Fingerprint victim OS, sha256 hash JSON-serialized object

The table below lists command lines used in the process of fingerprinting the victim machine:

Command Description
powershell.exe -Command "Get-WmiObject Win32_VideoController | Select-Object -ExpandProperty Name" GPU name acquired from WMI via PowerShell
reg.exe query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName Windows version acquired by LOLBin reg.exe
vol Volume serial acquired by regex matching stdout of the vol command
reg.exe query "HKLM\HARDWARE\DESCRIPTION\System\BIOS" BIOS information acquired by LOLBin reg.exe
reg.exe query "HKLM\SOFTWARE\Microsoft\Cryptography" /v MachineGuid Machine GUID acquired by LOLBin reg.exe

Subsequent communication with the C2 is decrypted using the AES-256 key/IV. Decrypted messages are in JSON format and have a key named, "id" that serves to differentiate messages containing JavaScript code to execute vs simply maintaining a heartbeat "pong" with the server. The "id" value associated with JavaScript code execution is the numeric value "1", whereas pong is the string "pong".

Tsundere executes C2 commands by creating a new JavaScript Function from the message content it receives, then immediately invoking that function using .call().

Figure 7 - Execute C2 supplied commands via new function
Figure 7 - Execute C2 supplied commands via new function

Persistence Module Analysis (VfZUSQi6oerKau.js)

The persistence module installs dependencies (ws, [email protected]) and validates the execution environment to ensure Node.js and NPM are installed. It then executes the Tsundere payload file through spawn or execSync (fallback option) and establishes persistence by a PowerShell command that creates a new value in the Run registry key. Russian is used frequently throughout; we have included translated comments in the figure for clarity.

Figure 8 - Persistence module, install dependencies, execute Tsundere payload
Figure 8 - Persistence module, install dependencies, execute Tsundere payload

An example PowerShell command used in this process is as follows. Note, the value name is a randomly generated 32-character hexadecimal string, e.g. "9f3a7c1d4b2e8a0c6d5f1e9a3c7b0d12".

powershell -Command "Set-ItemProperty -Path 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Run' -Name '9f3a7c1d4b2e8a0c6d5f1e9a3c7b0d12' -Value 'cmd.exe /c "C:\\Users\\<USERNAME>\\AppData\\Local\\Nodejs\\node-v18.17.0-win-x64\\node.exe" " C:\\Users\\<USERNAME>\\AppData\\Local\\Nodejs\\VfZUSQi6oerKau.js"'"
Figure 9 - Establish persistence via PowerShell command, Run key entry
Figure 9 - Establish persistence via PowerShell command, Run key entry

What did we do?

What can you learn from this TRU Positive?

Recommendations from the Threat Response Unit (TRU)

Indicators of Compromise

Type Value Description
IPv4 Address 193.17.183.126 Tsundere Botnet C2
IPv4 Address 185.236.25.119 Tsundere Botnet C2
File 7ab597ff0b1a5e6916cad1662b49f58231867a1d4fa91a4edf7ecb73c3ec7fe6 Stager "reset.ps1"
File 6a19953b6bb1b4eedb8beba5f9e1f4d1eb64a283a5f90f0deeba89593a3ca9f4 Tsundere Botnet "sysuu2etiprun.js" (obfuscated)
File dd87dfb302501e3cbe2e59fca9e14bfd53e65ed313c1b70e4d7daf68d86386ff Tsundere Botnet "sysuu2etiprun.js" (deobfuscated)
File e3c0ffeb5fcaab75bb2cf32c930e32b3f219325cb72ba813a033531aa2ff0305 Persistence Module "VfZUSQi6oerKau.js" (obfuscated)
File df8b94f7b3399b005cb64e879cfe04bfc3ba1499cf98608c10e532dbb493fa8d Persistence Module "VfZUSQi6oerKau.js" (deobfuscated)
Command Line powershell.exe -Command "[System.Globalization.CultureInfo]::InstalledUICulture.Name" Command used to determine if CIS country or not
Command Line powershell.exe -Command "Get-WmiObject Win32_VideoController | Select-Object -ExpandProperty Name" GPU name acquired from WMI via PowerShell
Command Line reg.exe query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName Windows version acquired by LOLBin reg.exe
Command Line vol Volume serial acquired by regex matching stdout of the vol command
Command Line reg.exe query "HKLM\HARDWARE\DESCRIPTION\System\BIOS" BIOS information acquired by LOLBin reg.exe
Command Line reg.exe query "HKLM\SOFTWARE\Microsoft\Cryptography" /v MachineGuid Machine GUID acquired by LOLBin reg.exe
Command Line powershell -Command "Set-ItemProperty -Path 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Run' -Name '9f3a7c1d4b2e8a0c6d5f1e9a3c7b0d12' -Value 'cmd.exe /c "C:\\Users\\<USERNAME>\\AppData\\Local\\Nodejs\\node-v18.17.0-win-x64\\node.exe" " C:\\Users\\<USERNAME>\\AppData\\Local\\Nodejs\\VfZUSQi6oerKau.js"'" PowerShell command used to establish persistence

References

To learn how your organization can build cyber resilience and prevent business disruption with eSentire’s Next Level MDR, connect with an eSentire Security Specialist now.

GET STARTED

ABOUT ESENTIRE’S THREAT RESPONSE UNIT (TRU)

The eSentire Threat Response Unit (TRU) is an industry-leading threat research team committed to helping your organization become more resilient. TRU is an elite team of threat hunters and researchers that supports our 24/7 Security Operations Centers (SOCs), builds threat detection models across the eSentire XDR Cloud Platform, and works as an extension of your security team to continuously improve our Managed Detection and Response service. By providing complete visibility across your attack surface and performing global threat sweeps and proactive hypothesis-driven threat hunts augmented by original threat research, we are laser-focused on defending your organization against known and unknown threats.

Back to blog

Take Your Cybersecurity Program to the Next Level with eSentire MDR.

BUILD A QUOTE

Read Similar Blogs

EXPLORE MORE BLOGS