STARWHALE
- Type
- Backdoor
- Capabilities
- ReconnaissancePersistenceExfiltrationPost exploitationDefense evasion
- Delivery
- Spearphishing
- Platforms
- Windows
STARWHALE, also known as Canopy, is a VBScript-based Windows backdoor used by MuddyWater, an Iranian state-sponsored threat actor subordinate to Iran’s Ministry of Intelligence and Security. It has also been observed in activity tracked as UNC3313. STARWHALE supports host reconnaissance, remote command execution, and data exfiltration in cyberespionage operations. MuddyWater’s broader targeting includes government and private-sector organizations in telecommunications, defense, local government, and oil and natural gas across Asia, Africa, Europe, and North America.
STARWHALE is distributed through spearphishing attachments, including malicious Microsoft Excel workbooks. When victims enable embedded VBA macros, the macros decode and install Windows Script File payloads. Observed deployments maintain persistence through startup-folder scripts or an automatically starting Windows service. The malware can dynamically resolve VBScript functions using GetRef. It collects the infected system’s IP address, computer name, and username, encodes this information, and transmits it to command-and-control infrastructure through HTTP POST requests. It receives commands from its controller, executes them through the Windows command interpreter, stages command output locally, and returns encoded results over the same communications channel. Observed samples use hexadecimal or custom encoding for collected data and command output.
Associated threat actors
2 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
MuddyWater also uses Canopy/Starwhale malware, likely distributed via spearphishing emails with targeted attachments.
"STARWHALE communicates with its C2 server, which is hardcoded in the malware... The C2 server will then respond with a command meant to be executed via cmd.exe"
Techniques & procedures
25 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
2 techniques
Initial Access
The latest campaigns undertaken by the hacking crew involve the use of malware-laced documents delivered via phishing messages to deploy a remote access trojan called SloughRAT
MuddyWater attempts to coax their targeted victim into downloading ZIP files, containing either an Excel file with a malicious macro that communicates with the actor’s command and control server or a PDF file that drops a malicious file to the victim’s network.
Execution
5 techniques
Execution
The obfuscated Trojan also attempts to execute arbitrary code and commands received from its command and control servers... one written in Visual Basic during 2021-2022 and one written in JavaScript in 2019-2020, which also downloads and runs arbitrary commands on the victim's system.
[STARWHALE](https://attack.mitre.org/software/S1037) has the ability to execute commands via `cmd.exe`.(Citation: Mandiant UNC3313 Feb 2022)
[STARWHALE](https://attack.mitre.org/software/S1037) can use the VBScript function `GetRef` as part of its persistence mechanism.(Citation: Mandiant UNC3313 Feb 2022)
the other coded in JavaScript, both of which are engineered to download and run malicious commands on the compromised host
[STARWHALE](https://attack.mitre.org/software/S1037) has relied on victims opening a malicious Excel file for execution.(Citation: DHS CISA AA22-055A MuddyWater February 2022)
Persistence
2 techniques
Persistence
[STARWHALE](https://attack.mitre.org/software/S1037) has the ability to create the following Windows service to establish persistence on an infected host: `sc create Windowscarpstss binpath= "cmd.exe /c cscript.exe c:\\windows\\system32\\w7_1.wsf humpback_whale" start= "auto" obj= "LocalSystem"`.(Citation: Mandiant UNC3313 Feb 2022)
[STARWHALE](https://attack.mitre.org/software/S1037) can establish persistence by installing itself in the startup folder, whereas the GO variant has created a `HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OutlookM` registry key.(Citation: DHS CISA AA22-055A MuddyWater February 2022)(Citation: Mandiant UNC3313 Feb 2022)
Privilege Escalation
2 techniques
Privilege Escalation
[STARWHALE](https://attack.mitre.org/software/S1037) has the ability to create the following Windows service to establish persistence on an infected host: `sc create Windowscarpstss binpath= "cmd.exe /c cscript.exe c:\\windows\\system32\\w7_1.wsf humpback_whale" start= "auto" obj= "LocalSystem"`.(Citation: Mandiant UNC3313 Feb 2022)
[STARWHALE](https://attack.mitre.org/software/S1037) can establish persistence by installing itself in the startup folder, whereas the GO variant has created a `HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OutlookM` registry key.(Citation: DHS CISA AA22-055A MuddyWater February 2022)(Citation: Mandiant UNC3313 Feb 2022)
Stealth
2 techniques
Stealth
This file was identified as an obfuscated PowerShell script
[STARWHALE](https://attack.mitre.org/software/S1037) has been obfuscated with hex-encoded strings.(Citation: DHS CISA AA22-055A MuddyWater February 2022)
Discovery
3 techniques
Discovery
[STARWHALE](https://attack.mitre.org/software/S1037) has the ability to collect the IP address of an infected host.(Citation: DHS CISA AA22-055A MuddyWater February 2022)
[STARWHALE](https://attack.mitre.org/software/S1037) can gather the username from an infected host.(Citation: Mandiant UNC3313 Feb 2022)(Citation: DHS CISA AA22-055A MuddyWater February 2022)
[STARWHALE](https://attack.mitre.org/software/S1037) can gather the computer name of an infected host.(Citation: Mandiant UNC3313 Feb 2022)(Citation: DHS CISA AA22-055A MuddyWater February 2022)
Collection
4 techniques
Collection
[STARWHALE](https://attack.mitre.org/software/S1037) can collect data from an infected local host.(Citation: DHS CISA AA22-055A MuddyWater February 2022)
The content repeatedly describes adversaries and malware storing collected data, command output, credentials, archives, or files in local temporary folders, working directories, hidden directories, registry locations, recycle bins, or specific files prior to exfiltration.
[STARWHALE](https://attack.mitre.org/software/S1037) has stored collected data in a file called `stari.txt`.(Citation: Mandiant UNC3313 Feb 2022)
BabyShark has encoded data using certutil before exfiltration... KONNI has used a custom base64 key to encode stolen data before exfiltration... Mafalda can encode data using Base64 prior to exfiltration.
Command and Control
6 techniques
Command and Control
These components retrieve encrypted commands from a C2 server.
[STARWHALE](https://attack.mitre.org/software/S1037) has the ability to contact actor-controlled C2 servers via HTTP.(Citation: Mandiant UNC3313 Feb 2022)(Citation: DHS CISA AA22-055A MuddyWater February 2022)
MuddyWater also relies heavily on the use of DNS to contact their C2 servers
When executed, the macros decode and install the embedded wsf files into the directories below
C2 traffic from ADVSTORESHELL is encrypted, then encoded with Base64 encoding... APT19 HTTP malware variant used Base64 to encode communications to the C2 server... APT33 has used base64 to encode command and control traffic.
[STARWHALE](https://attack.mitre.org/software/S1037) has the ability to hex-encode collected data from an infected host.(Citation: DHS CISA AA22-055A MuddyWater February 2022)
Exfiltration
1 technique
Exfiltration
[STARWHALE](https://attack.mitre.org/software/S1037) can exfiltrate collected data to its C2 servers.(Citation: DHS CISA AA22-055A MuddyWater February 2022)
Observables
59 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
28 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.