XMRig Botnet Abuses Linux PAM to Hide Root Activity and Persist Across Accounts

A stealthy Monero (XMR) cryptomining campaign uncovered in May 2026 is leveraging Linux Pluggable Authentication Modules (PAM) to evade detection, maintain persistence, and obscure root-level activity across compromised environments.

The operation highlights growing risks from supply chain compromises and the increasing sophistication of fileless malware targeting Linux infrastructure.

The intrusion began through a trusted third-party relationship, allowing attackers to silently pivot into the victim’s network using a legitimate user account.

After gaining initial access, the threat actor escalated privileges to root. Instead of operating directly as root which typically triggers security alerts the attackers abused the pam_rootok module within Linux PAM.

XMRig Botnet PAM Abuse

This technique enabled password-less switching from root to multiple low-privileged user accounts using the su command.

By distributing malicious actions across several standard accounts, the attackers created a forensic smokescreen, making it difficult for incident responders to trace activity back to a single source.

Persistence was further reinforced by deploying cron jobs under these accounts, ensuring the malware could regenerate even if root access was remediated.

To further evade detection, the attackers actively disabled logging mechanisms and tampered with authentication logs.

This significantly reduced visibility for security tools relying on file-based monitoring, effectively blinding defenders during critical stages of the attack lifecycle.

At the core of the campaign is a heavily modified version of XMRig 6.25.0, compiled with musl libc and labeled internally as a private botnet build. The malware incorporates several advanced techniques to maintain stealth and optimize mining performance.

XMRig Botnet PAM Abuse (Source: group-ib)
XMRig Botnet PAM Abuse (Source: group-ib)

Upon execution, the binary creates a mutex file at /tmp/.lock to ensure only one instance runs at a time. It then deletes its own executable from disk a technique known as self-unlinking allowing it to operate entirely in memory.

This fileless execution method significantly complicates forensic analysis, as no persistent binary remains on the filesystem.

The malware dynamically evaluates the host’s CPU configuration to maximize mining efficiency.

It leverages Huge Pages and interacts with Model-Specific Registers (MSRs) to optimize performance, while also terminating competing processes to monopolize system resources.

A custom command-line interface replaces standard XMRig arguments, enabling rapid and flexible deployment.

Notable options include LAN-based mining pool connections to bypass DNS filtering, process masquerading to imitate legitimate services like SSH, and flags to disable cron persistence or enforce maximum CPU usage.

Further analysis revealed obfuscated configuration data protected using layered XOR encryption.

Keys such as “I3F0” and “CLIENT” are used to decode internal parameters, including mining pool details. Investigators identified campaign-specific markers such as “My-V25-GEN-26,” linking the activity to a broader V25 (Generation 26) botnet operation, group-ib said.

The malware also employs MITRE ATT&CK technique T1564.013 (Hidden Artifacts), masking its presence through process name spoofing and obfuscated network traffic.

Memory analysis showed that its mining communication mimics legitimate traffic using a “Java/Agent” user-agent string, blending into normal application flows.

Cut SOC investigation blind spots and contain threats earlier to reduce response costs and business disruption with ANY.RUN. 

Varshini
Varshini
Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies..

Trending News

Related Stories