Sysrv
- Type
- Worm
- Capabilities
- Initial accessScanningBrute forceLateral movementPrivilege escalationPersistenceDefense evasion
- Platforms
- LinuxWindows
Sysrv is a Go-based, self-propagating malware family and cryptomining botnet first publicly identified in December 2020. It targets Linux and Windows servers, compromising exposed services to deploy the XMRig miner for unauthorized Monero mining. Early variants separated the worm and miner components, while later variants combined them or retrieved additional mining payloads after infection.
Sysrv scans for vulnerable services and propagates through remote code execution vulnerabilities, hardcoded credential dictionaries, and SSH access using keys and host information discovered on compromised systems. Targets include MySQL, Apache Tomcat, Jenkins, Oracle WebLogic, and numerous web applications. Its exploit arsenal includes Apache Struts vulnerabilities, PHPUnit CVE-2017-9841, Spring Cloud Gateway CVE-2022-22947, and Atlassian Confluence vulnerabilities CVE-2021-26084 and CVE-2023-22527. Some variants use MySQL user-defined functions for command execution and privilege escalation. Platform-specific Bash and PowerShell loaders retrieve and execute the worm and mining components.
Linux variants establish persistence through cron jobs and authorized SSH keys, terminate competing miners, disable firewalls, and remove security software. They also clear shell history, masquerade as system processes, and use local TCP listeners as single-instance checks. Many binaries are packed with UPX, and later versions introduce Go code obfuscation. Campaigns have used compromised websites and legitimate hosting services to distribute encoded mining payloads. Sysrv's principal objective is monetizing compromised computing resources rather than stealing cryptocurrency wallets or credentials.
Associated vulnerabilities
24 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
12 more CVEs associated with this family tracked in Mallory.
Associated threat actors
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
This blog post takes a deep dive into the Sysrv botnet, which first made headlines at the end of December 2020 and has continued to evolve since then.
Techniques & procedures
32 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
1 technique
Initial Access
Sysrv continually incorporated new exploits to spread more effectively... Exploits with the corresponding CVE number: CVE-2019-7238 – Nexus Repository Manager RCE ... CVE-2021-3129 – Ignition RCE
Execution
5 techniques
Execution
Edit crontab file to achieve persistence
Post exploitation, the malware will deliver a loader script: ld.sh for Linux and ld.ps1 for Windows. The loader is responsible for dropping and running the XMRig Miner and the Golang worm on the exploited service.
Two Sysrv loader scripts are circling for Linux and Windows: ldr.sh and ldr.ps1 ... the latter in Powershell
Two Sysrv loader scripts are circling for Linux and Windows: ldr.sh and ldr.ps1 ... the former in Bash
Sysrv continually incorporated new exploits to spread more effectively... CVE-2019-7238 – Nexus Repository Manager RCE ... CVE-2021-3129 – Ignition RCE ... Apache Tomcat RCE
Persistence
4 techniques
Persistence
Edit crontab file to achieve persistence
Hardcoded SSH key for persistence
The malware will send Get requests and will parse the parameters with the jsp file: %s/1.jsp? win= %s& linux= %s. These parameters will contain the dropper script URL. The jsp script will then drop and run the loaders.
If crontab command is not available install cron via apt, crontabs via yum and start the appropriate services
Privilege Escalation
4 techniques
Privilege Escalation
Edit crontab file to achieve persistence
After a successful login, it will run a shellcode to gain a local privilege escalation using mysql UDF.
Hardcoded SSH key for persistence
If crontab command is not available install cron via apt, crontabs via yum and start the appropriate services
Stealth
9 techniques
Stealth
The first obfuscated sample appeared in April 2021... This sample also had obfuscated Go packages and some function names... the obfuscation tool used is gobfuscate
Most malicious samples were packed with vanilla UPX
Upon executing the binary in a controlled environment... the binary operates under the name kthreaddk, a frequently observed identifier for this strain of malware.
/tmp/ folder cleanup
Bash history cleanup
In addition to disabling UFW and killing several running services
Get function to download binary (curl, get, php -r)
2550 execve ( "/bin/sh" , [ "/bin/sh" , "-c" , "echo '* * * * * /dev/disk/by-partuuid/3hxr47' | /usr/bin/crontab -" ]
64-bit check (getconf LONG_BIT) ... Exit if a 32-bit system is detected ... Checking for the presence of nvidia-smi tool, listing GPUs for cryptomining
Defense Impairment
1 technique
Defense Impairment
Removing and renaming the iptables binary Aliyun AV software uninstaller Docker xmr image removal
Credential Access
3 techniques
Credential Access
tries to infiltrate the servers with a hardcoded password dictionary attack
MySql: Port 3306 The malware will run a credential spraying brute force attack. The malware uses a hardcoded dictionary of weak credentials, such as root:123456 , for this attack.
the loader does not possess the capabilities to gather and use SSH keys for subsequent propagation... the script then turns to enumerating all the private keys stored on the hosts
Discovery
3 techniques
Discovery
The worm module simply initiates port scans against random IPs to find vulnerable Tomcat, WebLogic, and MySQL services
Checks for competing botnets and cryptominers, kills their processes
64-bit check (getconf LONG_BIT) ... Exit if a 32-bit system is detected ... Checking for the presence of nvidia-smi tool, listing GPUs for cryptomining
Lateral Movement
2 techniques
Lateral Movement
SSH brute-force
In an older version, the worm has also attempted to exploit WebLogic’s latest vulnerability: CVE-2020-14882.
Command and Control
3 techniques
Command and Control
Within the configuration file... '{ ... "url": "194.38.23.2:8080" }'
The malware propagation starts with a simple loader script file, which pulls down those modules upon successful execution.
In Sysrv’s case, a check is implemented to see whether a hardcoded TCP port is open on the infected system ... We have observed the following TCP port numbers being leveraged as Mutex ports: 52013 ... 52021
Impact
2 techniques
Impact
Other known cryptocurrency miners such as kthreaddi, sysrv, and sysrv012 are stopped or killed. Other running processes listening on ports 3333, 4444, 5555, 7777, and 9000 are stopped.
At its core, Sysrv is a worm and a cryptocurrency miner ... The main goal of the Sysrv botnet is to mine the Monero cryptocurrency.
Observables
178 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
11 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.