SSHStalker Botnet Targeting Linux Systems via Legacy Kernel Exploits

Summary:

SSHStalker is a recently identified Linux-targeting botnet that actively exploits legacy kernel vulnerabilities dating back to 2009–2010 to compromise unpatched or long-tail infrastructure. The campaign leverages automated SSH scanning and an IRC-based command-and-control (C2) architecture to establish scalable, persistent access across exposed Linux systems. Unlike financially motivated botnets that prioritize immediate monetization through DDoS or cryptomining, SSHStalker appears focused on maintaining durable, covert access for potential staging, lateral movement, or strategic follow-on activity. The malware incorporates rootkit-style persistence, automated process relaunch mechanisms, and anti-forensic SSH log manipulation to evade detection and extend dwell time. Organizations operating legacy Linux environments or internet-exposed SSH services should prioritize kernel patching, SSH hardening, and log integrity monitoring to mitigate exposure.

Technical Description:

SSHStalker is a Linux-focused botnet that combines automated SSH reconnaissance with exploitation of legacy kernel vulnerabilities to compromise outdated systems, particularly those running 2.6.x-era kernels. A Golang-based scanning component identifies hosts exposing TCP port 22 and attempts exploitation using publicly available exploit modules targeting vulnerabilities from 2009 to 2010. Once access is obtained, the malware deploys IRC-controlled bot payloads that establish communication with an UnrealIRCd server for centralized command-and-control. The malware emphasizes stealth and resilience through rootkit-style persistence mechanisms, SSH log tampering (utmp, wtmp, and lastlog manipulation), and a watchdog-style keep-alive component that automatically relaunches the malicious process if terminated. At least 16 known historical Linux kernel vulnerabilities are leveraged for initial compromise or privilege escalation. Operational behavior suggests that SSHStalker prioritizes sustained, covert access over immediate monetization, indicating possible preparation for future staging or coordinated activity. The details and technicalities of the attack campaign are discussed further

Delivery and Infection Chain:

SSHStalker primarily gains initial access through automated scanning of exposed SSH services (TCP port 22). A Golang-based scanner performs internet-wide probing to identify Linux hosts that are inadequately hardened or running legacy kernels. Exploitation focuses on publicly known Linux kernel CVEs from 2009–2010, particularly affecting outdated 2.6.x systems. In some cases, weak SSH credentials or misconfigurations may facilitate compromise.

The Infection chain was identified as follows,

  • The attacker conducts automated internet-wide scanning to identify Linux systems exposing SSH services (TCP port 22).
  • Vulnerable hosts are exploited using legacy Linux kernel vulnerabilities (primarily 2009–2010 CVEs) to obtain initial access or escalate privileges.
  • IRC-based bot payloads (C and Perl variants) are deployed onto the compromised system.
  • The infected host establishes communication with an UnrealIRCd server, joins predefined IRC control channels, and registers for command-and-control.
  • Persistence and stealth mechanisms are activated, including SSH log tampering (utmp/wtmp/lastlog manipulation) and a keep-alive process that automatically relaunches the malware if terminated.

Technical Capabilities:

SSHStalker demonstrates centralized command-and-control combined with automated exploitation designed for heterogeneous Linux environments. The botnet propagates in a worm-like fashion, identifying exposed SSH services using a Golang-based scanner. It exploits at least 16 legacy Linux kernel vulnerabilities from 2009–2010 to gain or escalate privileges, primarily affecting outdated 2.6.x systems. After compromise, IRC-controlled bot variants—primarily written in C—are deployed, alongside Perl components that connect to an UnrealIRCd server to receive remote instructions. Additional toolkit components include modular scripts such as EnergyMech IRC bots and utilities capable of harvesting exposed AWS credentials, suggesting potential expansion into cloud-focused post-compromise activity.

Beyond exploitation and C2 functionality, SSHStalker incorporates robust persistence and evasion mechanisms. SSH-related log files (utmp, wtmp, and lastlog) are modified to reduce forensic visibility and conceal unauthorized access. A built-in keep-alive component ensures that the primary malicious process is relaunched within approximately 60 seconds if terminated, enhancing resilience against remediation efforts. The inclusion of rootkit-style artifacts and auxiliary offensive tooling reflects operational maturity and the ability to sustain long-term, covert access across legacy and unmanaged Linux environments.

Attribution and Evolution:

Language artifacts observed in IRC communications and configuration files suggest potential Romanian actor involvement. Operational overlaps with the Outlaw (Dota) hacking group have been identified, including similarities in infrastructure reuse, campaign structure, and tooling patterns. Rather than developing novel exploits, the actor demonstrates disciplined automation, reuse of established exploit kits, and coordinated mass exploitation techniques. The campaign’s evolution reflects a shift from opportunistic monetization toward strategic persistence and infrastructure control.

Active Campaign and Geographic Spread:

The campaign exhibits opportunistic, global targeting of internet-exposed Linux systems, without region-specific focus. Environments at elevated risk include legacy infrastructure, unmanaged servers, academic networks, hosting providers, and long-tail enterprise assets that remain unpatched. Because exploitation relies on exposed SSH services rather than targeted victim profiling, infections are likely distributed wherever vulnerable systems remain reachable.

Conclusion:

SSHStalker highlights how threat actors can effectively leverage legacy vulnerabilities and traditional IRC-based infrastructure to maintain scalable, covert access across diverse Linux environments. Although technically unsophisticated in terms of zero-day innovation, the campaign demonstrates strong operational discipline, automation, and persistence. Organizations should prioritize modernization of legacy systems, reduction of SSH exposure, enforcement of key-based authentication, continuous log integrity monitoring, and deployment of behavioral endpoint detection controls to mitigate similar botnet threats.

Impact :

While SSHStalker does not currently demonstrate large-scale DDoS or cryptomining activity, its primary risk lies in sustained, covert access retention. Compromised systems may be leveraged for coordinated attacks, credential harvesting (including AWS secrets), lateral movement, or future payload staging. Persistence and anti-forensic techniques extend dwell time and reduce detection probability, creating elevated risk for organizations maintaining outdated Linux infrastructure. The campaign underscores the security debt associated with legacy systems and insufficient SSH hardening.

IOC and Context Details:

Topics Details
Tactic Name Initial Access, Execution, Persistence, Defense Evasion, Command and Control, Lateral Movement
Technique Name Exploit Public-Facing Application, Remote Services (SSH), Command and Scripting Interpreter, Indicator Removal on Host, External Remote Services
Sub-Technique Name Exploitation of Public-Facing Application, SSH, Unix Shell, File Deletion, Log Clearing, IRC Command Channel
Attack Type Malware
Targeted Applications Linux Operating Systems, Linux Kernel 2.6.x, SSH Services (TCP Port 22), UnrealIRCd Servers, Web Servers Hosting Exposed AWS Credentials
Region Impacted Global
Industry Impacted Hosting Providers, Cloud Service Providers, Telecommunications, Enterprise Organizations
(IOCs) MD5 Hashes:
0d01bd11d1d3e7676613aacb109de55f
1e288bb6920d9cf07d0e5dbc8614469d
32ee52b2918e06e3925eaccb0bea2d66
88a31724d376ba7ac8ce5c10f97da83d
f8f76d8772f07b716913ba85f3af8380
5b9d4ff6a89da88dcf1d7d04b6d1e976
4c3d248b1fc8d4963ebdded4aecfcb8e
70677ce8be9ebc5f81c299f753b98d66
26ad93d703a565a2642c422b2434fc78
98f1ac9c9baf2562eb00b7d4f89dc0dc
6ca73134ee02fb373ebaf9321b9840c8
a24cabef282713b6c0e3f9c3efdabd91
3b64c2ecd7ea152f9d4af9d0461db265
fb2ddb699bed59ff420b43f5640e7e0c
a8d19e08aa022bacd8a76777874fad8a
1d4c9039ca7e0b3e93c708f5d02f92a0
077cdcbe6c1bf4a0f4bc81feaf283be3
2b31ba929f3e4f8e8c84b3815b0e4909
94e513b01f26399ae16ac91b50fde268
fd55f0754084ba041539bb469f06a83d
4777d24c864c04a6bfabb836811edf2d

IP Addresses:
64.227.142.133
185.243.218.59
154.35.175.201
94.125.182.255
23.228.66.219
199.71.214.87
172.83.156.122

Domains:
irc.undernet.org
plm.ftp.sh
gsm.ftp.sh
CVE CVE-2009-2692, CVE-2009-2698, CVE-2009-2267, CVE-2009-2908, CVE-2009-3547, CVE-2010-3849, CVE-2010-1173, CVE-2010-2959, CVE-2010-3437

Recommended Actions:

  • Immediately patch and update all Linux systems, particularly those running legacy 2.6.x kernels, to remediate known vulnerabilities.
  • Restrict SSH exposure through firewall rules, limiting connections to trusted IP addresses, and disabling root login over SSH.
  • Enforce key-based authentication and strong credential policies to reduce unauthorized SSH access risk.
  • Monitor SSH login attempts and configure alerts for anomalous patterns, including repeated failed attempts or logins from unfamiliar geographies.
  • Implement integrity monitoring for critical log files such as /var/log/wtmp, /var/log/utmp, and /var/log/lastlog to detect tampering.
  • Deploy endpoint detection and response (EDR) solutions capable of identifying suspicious processes, persistent malware artifacts, or IRC traffic.
  • Regularly audit and decommission legacy or unused infrastructure to minimize long-tail exposure.
  • Train IT and security teams to recognize IRC-based botnet indicators and unusual outbound network activity, and maintain incident response procedures for compromised Linux hosts.

Reference:

https://flare.io/learn/resources/blog/old-school-irc-new-victims-inside-the-newly-discovered-sshstalker-linux-botnet