Silent Crypto Miners: How a Linux PAM Abuse Campaign Turned Compromised Servers Into Hidden Monero Factories + Video

Listen to this Post

Featured ImageIntroduction: The New Era of Invisible Linux Attacks

Linux infrastructure has long been considered a trusted foundation for cloud platforms, enterprise servers, development environments, and critical applications. However, attackers are increasingly proving that even highly controlled Linux systems can become powerful weapons when identity controls, authentication systems, and third-party relationships are abused.

A stealthy Monero (XMR) cryptomining campaign discovered in May 2026 demonstrates how cybercriminals are moving beyond traditional malware deployment. Instead of simply dropping a mining binary and consuming CPU resources, the attackers built a sophisticated operation designed to survive investigations, bypass security monitoring, and remain hidden for extended periods.

The campaign abused Linux Pluggable Authentication Modules (PAM), a core authentication framework used across countless Linux distributions, to create a deceptive environment where malicious activity appeared to originate from legitimate user accounts rather than compromised root access.

This attack represents a major shift in Linux threats. The objective was not only cryptocurrency mining but also maintaining long-term control, reducing forensic visibility, and creating a resilient infrastructure capable of recovering after partial cleanup.

Attack Summary: From Trusted Access to Hidden Mining Operations

The intrusion began through a compromised trusted relationship, likely involving a third-party connection or legitimate user account. Instead of exploiting a simple vulnerability, attackers leveraged the trust placed in external access pathways to enter the victim’s environment quietly.

Once inside, the attackers escalated privileges until they obtained root-level control. However, directly operating as root often attracts attention from security monitoring systems because administrative behavior creates stronger indicators of compromise.

To avoid this, the attackers abused the Linux PAM subsystem, specifically the pam_rootok module. This allowed them to manipulate authentication behavior and switch from root privileges into multiple lower-privileged accounts without requiring passwords.

The technique created a sophisticated disguise. Rather than having all malicious activity linked to one administrator account, the attackers distributed their actions across several normal-looking users.

This approach created a forensic nightmare.

Security analysts investigating unusual CPU usage, suspicious processes, or unauthorized mining activity would see multiple user identities involved, making it significantly harder to determine the original attack path.

Deep Analysis: Linux PAM Abuse and Fileless Cryptomining

Linux Pluggable Authentication Modules are designed to provide flexible authentication mechanisms. They allow administrators to integrate different authentication methods without modifying core applications.

However, because PAM operates at a fundamental security layer, abusing it can provide attackers with powerful capabilities.

The attackers exploited the behavior of pam_rootok, which traditionally allows root users to authenticate without entering a password under specific conditions.

Instead of using this feature legitimately, attackers weaponized it as a privilege manipulation mechanism.

The attack chain looked similar to:

Compromised Account
|
v

Privilege Escalation

|
v

Root Access

|
v

PAM Abuse Using pam_rootok

|
v

Switching Into Multiple User Accounts

|
v

Deploy XMRig Mining Malware

By moving between accounts, attackers reduced the visibility of their operation.

Security teams typically associate root activity with administrative actions. But activity spread across ordinary accounts may appear less suspicious, especially in environments with many users.

Persistence Strategy: Cron Jobs and Authentication Manipulation

The attackers did not rely on a single infection method.

They created cron jobs under compromised user accounts to maintain persistence. Cron-based execution remains one of the most common persistence techniques in Linux environments because it is lightweight, reliable, and often overlooked.

Even if defenders removed root access, the scheduled tasks could restore malicious components.

Example investigation commands:

crontab -l
ls -la /etc/cron
grep -R "curl|wget|xmrig" /etc/cron

The attackers also attempted to destroy visibility by disabling logging systems and modifying authentication records.

Commands commonly used during Linux investigations include:

journalctl --since "24 hours ago"
last
cat /var/log/auth.log
grep "sudo" /var/log/auth.log

By manipulating these sources, attackers reduced the evidence available to defenders.

This tactic highlights a growing trend: modern malware campaigns are not only designed to execute malicious code but also to actively interfere with the investigation process.

XMRig Modification: A Private Mining Botnet Built for Stealth

At the center of the campaign was a heavily modified version of XMRig 6.25.0, a popular open-source Monero mining tool.

Although XMRig itself is legitimate software, attackers frequently modify it for unauthorized cryptocurrency mining operations.

The malware was compiled using musl libc, suggesting attackers optimized the binary for portability across different Linux environments.

The internal labeling indicated that this was not a random deployment but part of a private botnet operation.

The malware included several advanced features:

Single-instance execution control.

Self-deletion after launch.

Memory-based execution.

CPU optimization.

Process hiding.

Custom mining communication.

Anti-analysis capabilities.

Fileless Execution: Removing the Evidence Trail

One of the most dangerous features was self-unlinking.

After execution, the malware deleted its own executable file from disk.

Example:

ls -la /proc//exe
lsof | grep deleted

Linux systems allow running processes to continue operating even after their executable file has been removed.

This means investigators may find an active malicious process without finding the original file responsible for the infection.

This technique significantly increases forensic complexity.

Traditional antivirus approaches that rely heavily on file scanning become less effective because the malware exists primarily in memory.

CPU Optimization and Resource Hijacking

Cryptomining malware survives by maximizing computational output.

The campaign dynamically analyzed the victim’s CPU capabilities and adjusted mining behavior accordingly.

The malware used:

Huge Pages for memory optimization.

Model-Specific Registers (MSR) interaction.

Process termination against competing applications.

Maximum CPU consumption modes.

Example monitoring commands:

top
htop
ps aux --sort=-%cpu

lscpu

The goal was simple: extract the highest possible Monero profit while remaining unnoticed.

However, aggressive CPU usage often creates operational damage:

Slower applications.

Increased electricity costs.

Reduced server lifespan.

Cloud infrastructure cost explosions.

Custom Command Interface and Network Evasion

Unlike standard XMRig deployments, this malware used a customized command-line interface.

Attackers created specialized options for:

LAN mining pool communication.

DNS filtering bypass.

Process name spoofing.

CPU enforcement.

Persistence control.

Using internal network mining pools helps attackers avoid external network monitoring because traffic remains inside trusted environments.

The malware also disguised mining traffic by using a fake Java Agent user-agent string.

This allowed malicious communications to blend into normal application activity.

Obfuscation and Botnet Attribution

Researchers discovered encrypted configuration data protected through layered XOR encryption.

Recovered keys included:

I3F0

CLIENT

These keys helped decode internal configuration information, including mining pool settings.

Investigators also discovered campaign markers:

My-V25-GEN-26

The identifier connected the operation to a larger V25 Generation 26 botnet campaign.

The attackers also used MITRE ATT&CK technique:

T1564.013 – Hidden Artifacts

This technique involves hiding malicious activity through:

Fake process names.

Obfuscated communication.

Hidden files.

Misleading system behavior.

Defensive Recommendations: How Organizations Can Detect PAM Abuse

Organizations running Linux infrastructure should treat authentication abuse as a high-priority security concern.

Recommended actions include:

Check PAM configuration
cat /etc/pam.d/

Review privileged users

cat /etc/passwd

Find suspicious scheduled tasks

find /etc/cron -type f

Search running deleted binaries

lsof | grep deleted

Security teams should also monitor:

Unexpected root-to-user transitions.

Abnormal CPU usage.

New cron entries.

Modified authentication logs.

Unknown mining pool connections.

Suspicious process names.

Endpoint detection solutions should prioritize behavioral analysis rather than relying only on malware signatures.

What Undercode Say:

The Linux ecosystem has entered a new phase of cyber conflict where attackers are no longer satisfied with simple malware installation.

This campaign demonstrates how attackers are combining old Linux mechanisms with modern stealth techniques.

PAM abuse is particularly concerning because authentication frameworks are trusted components.

When attackers compromise trust itself, traditional defenses become weaker.

The most dangerous aspect of this operation is not Monero mining.

Cryptocurrency mining is often viewed as a low-level cybercrime because it does not immediately destroy data.

However, the techniques used reveal capabilities that could easily be adapted for espionage or destructive attacks.

An attacker who understands PAM manipulation can potentially maintain hidden access far beyond cryptocurrency theft.

The campaign also proves that root access does not always mean obvious administrator activity.

Modern attackers understand security monitoring behavior and actively design operations to avoid triggering alarms.

By switching identities, hiding binaries, and modifying logs, they create confusion during incident response.

The use of fileless execution shows why organizations must move beyond traditional antivirus approaches.

A malicious process without a file is still a serious threat.

Memory analysis, behavioral monitoring, and authentication auditing are becoming essential components of modern Linux defense.

The supply chain element is another major warning sign.

Trusted relationships remain one of the weakest points in enterprise security.

Organizations often protect their internal systems but underestimate third-party access risks.

Attackers understand this weakness and increasingly use legitimate accounts as their entry point.

The campaign also highlights the importance of identity security.

Passwords alone are not enough.

Organizations need stronger authentication controls, privilege separation, and continuous monitoring.

Linux administrators should assume that every privileged pathway could eventually become a target.

PAM configurations deserve the same attention as firewalls and endpoint security tools.

A small authentication weakness can become a complete infrastructure compromise.

The future of cyber defense will depend on detecting unusual behavior rather than searching only for known malware.

Attackers can modify binaries, change names, encrypt configurations, and remove evidence.

But abnormal behavior patterns remain difficult to hide.

The lesson from this campaign is clear:

The next generation of Linux threats will not always look like malware.

Sometimes they will look like normal users performing normal actions.

Security teams must learn to detect what should not be happening, even when everything appears legitimate.

✅ The campaign used Linux PAM abuse techniques to hide malicious activity.
The described use of pam_rootok, account switching, and authentication manipulation matches known Linux privilege abuse methods.

✅ The malware was based on a modified XMRig cryptocurrency miner.
XMRig is widely abused by threat actors for unauthorized Monero mining, and custom builds are frequently used in botnet campaigns.

✅ The operation included fileless execution techniques.

Self-unlinking binaries and memory-resident malware are recognized methods used to reduce forensic visibility.

❌ There is no public confirmation that every technical detail, including all internal markers and encryption keys, belongs to a single identified threat group.
Some attribution details remain based on researcher analysis and campaign indicators rather than confirmed attacker identity.

Prediction

(+1) Linux cryptomining campaigns will push organizations toward stronger identity-based security models, with increased adoption of behavioral monitoring, PAM auditing, and memory-based threat detection.

(+1) Security platforms will increasingly focus on detecting abnormal authentication behavior rather than only searching for malicious files.

(-1) Attackers will likely reuse PAM abuse techniques for more dangerous objectives, including long-term espionage campaigns and hidden backdoor operations.

(-1) Organizations that continue relying only on traditional antivirus solutions may remain vulnerable because modern malware increasingly operates without leaving obvious filesystem evidence.

▶️ Related Video (76% Match):

🕵️‍📝Let’s dive deep and fact‑check.

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

References:

Reported By: cyberpress.org
Extra Source Hub (Possible Sources for article):
https://www.github.com
Wikipedia
OpenAi & Undercode AI

Image Source:

Unsplash
Undercode AI DI v2

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow UndercodeNews & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin | 🦋BlueSky | 🐘Mastodon | 📺Youtube