By NHI Mgmt Group Editorial TeamDomain: Breaches & IncidentsSource: ExpelPublished January 7, 2026

TL;DR: Unauthorized XMRig deployments are appearing across Windows, Linux, Kubernetes, and AWS EC2, with attackers using exposed credentials, SSH brute force, commodity malware, and software vulnerabilities to install a miner that can persist and consume resources, according to Expel. The pattern matters because cryptomining is often the visible symptom of a wider access-control failure, not the end of the intrusion.


At a glance

What this is: This analysis shows that XMRig is being installed through multiple intrusion paths across endpoints, containers, and cloud instances, making cryptomining a cross-environment indicator of compromised access.

Why it matters: It matters to IAM and cloud security teams because the same weaknesses that allow miner deployment often expose service accounts, remote admin tools, and cloud workloads to broader compromise.

By the numbers:

👉 Read Expel's analysis of XMRig deployment across endpoints, Kubernetes, and AWS


Context

Cryptomining often surfaces where attackers have already crossed an access boundary. XMRig is not the core problem on its own; it is a payload that reveals weak controls around remote access, workload hardening, and credential hygiene in environments that span endpoints, containers, and cloud infrastructure.

For IAM and NHI practitioners, the important question is how a miner reached the environment in the first place. Expel's analysis links installation to exposed credentials, SSH brute force, commodity malware, and vulnerability exploitation, which makes this a governance problem as much as a malware problem.

The article's starting position is typical of opportunistic intrusion: attackers use whatever entry path is easiest, then convert access into resource theft and persistence. That pattern is common across modern enterprise estates, especially where identity and workload controls are fragmented.


Key questions

Q: What breaks when cryptominers appear in enterprise systems?

A: Cryptominers usually mean the attacker already has a foothold, so the real failure is access control, not just malware execution. If the environment lets XMRig run, it often also allows persistence, lateral movement, and resource abuse. Teams should treat the miner as evidence of compromised credentials, exposed services, or weak workload boundaries rather than a standalone nuisance.

Q: Why do NHI and cloud controls matter when attackers deploy miners?

A: Because miners are often installed through stolen service access, remote admin tools, or workload abuse. Weak governance over non-human identities, such as overprivileged service accounts or exposed API keys, gives attackers the entry path they need. Strong identity controls reduce the chance that a simple miner becomes the first visible symptom of broader compromise.

Q: How do security teams know whether mining activity is legitimate or malicious?

A: They should correlate sustained CPU usage with network destinations, persistence artefacts, and system ownership. Legitimate compute-heavy workloads should be known, approved, and explainable. If a host or pod suddenly begins mining, especially outside expected business hours or outside a documented workload profile, it should be treated as unauthorised until proven otherwise.

Q: What should teams do when XMRig is discovered on a host or cluster?

A: Contain the system, identify how the attacker got in, and review associated credentials, startup mechanisms, and neighbouring assets. Removal alone is not enough because the same path could be reused for a more damaging payload. The investigation should determine whether the issue came from exposed credentials, brute force, or a vulnerable service.


Technical breakdown

How XMRig persists after initial compromise

XMRig is often installed as a follow-on payload after attackers gain access through exposed credentials, brute force, or a vulnerable service. Once present, it can be configured to survive restarts through scheduled tasks, cron jobs, or registry startup items, which makes the miner harder to remove than a one-time process. Because it is legitimate software, defenders cannot rely on a binary signature alone. The operational question is whether the environment has enough control over startup mechanisms and administrative pathways to detect unauthorised persistence early.

Practical implication: monitor startup persistence locations and tie them to privileged change workflows, not just malware alerts.

Why XMRig appears in Kubernetes pods and AWS EC2 instances

XMRig works across operating systems and is effective in low-resource or spare-capacity environments, which is why attackers place it in containers and cloud instances as well as traditional endpoints. In Kubernetes, a miner can hide inside a pod if workload controls are weak; in EC2, it can consume paid compute while blending into normal infrastructure activity. The underlying issue is not only malware execution, but the absence of workload identity, privilege scoping, and runtime guardrails that would limit what a compromised workload can do.

Practical implication: enforce workload-level identity and runtime policy so a compromised pod or instance cannot freely consume compute or reach external mining pools.

How defenders distinguish mining activity from legitimate high-CPU workloads

Cryptominers create a detection problem because sustained CPU use is not automatically malicious. Teams need to correlate host telemetry with network indicators such as DNS lookups to mining pool domains, outbound connections on common mining ports like TCP 3333, and unusual encrypted traffic patterns. That correlation matters because a miner may be configured to obscure network behaviour while still leaving resource and persistence traces. The analytical model is therefore behavioural, not signature-only, and it needs baseline awareness of which systems should never be mining continuously.

Practical implication: pair CPU baselining with network and persistence telemetry so detection survives encrypted traffic and repackaged binaries.


Threat narrative

Attacker objective: The attacker wants to monetise compromised infrastructure by quietly converting compute capacity into Monero mining output while preserving access for follow-on abuse.

  1. Entry occurs through exposed credentials, SSH brute force, commodity malware, or exploitation of React2Shell vulnerabilities, giving the attacker a foothold in the target environment.
  2. Escalation turns that foothold into a durable miner installation by adding scheduled tasks, cron jobs, or registry startup items that keep XMRig running after reboot.
  3. Impact is resource theft and operational drag, with attackers monetizing CPU capacity across endpoints, Kubernetes pods, and AWS EC2 instances while leaving the environment open to further payloads.
  • 230M AWS environment compromise — 230M AWS environments compromised via exposed .env files with cloud credentials.
  • MITRE ATT&CK Enterprise Matrix — MITRE ATT&CK Enterprise — adversary tactics and techniques, threat detection, attack chain mapping, credential access, lateral movement, privilege escalation.

Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Cryptomining is a control-failure indicator, not a standalone threat. XMRig usually appears after access has already been lost somewhere in the environment, which makes it a useful signal for broader governance gaps. The presence of a miner tells practitioners that credentials, remote administration, or workload hardening were already inadequate. The right conclusion is not that mining is harmless, but that it often marks the point where deeper compromise became visible.

Cloud and container environments amplify the value of weak identity hygiene. When attackers place XMRig in Kubernetes or AWS EC2, they are exploiting the same access assumptions that drive machine identity risk elsewhere: overbroad permissions, weak runtime boundaries, and insufficient service-account visibility. This is where NHI governance intersects directly with cloud security. If a workload can be repurposed for mining without immediate containment, the organisation likely has the same weakness for more damaging payloads.

Persistent miner activity exposes a named failure mode: ungoverned runtime persistence. Scheduled tasks, cron jobs, and registry startups are simple mechanisms, but they work because too many environments treat them as local system artefacts rather than governed control points. That gap matters because persistence is what lets a low-value payload become a long-lived intrusion. Practitioners should treat runtime persistence as a governance boundary, not just an endpoint detail.

The detection problem is a visibility problem first. Legitimate mining software can hide in plain sight, which means defenders need telemetry that connects process behaviour, network destinations, and workload ownership. This is where frameworks like NIST-CSF and NIST SP 800-53 matter because the issue is not just alerting, but asset visibility, access control, and configuration integrity. Teams that cannot map who owns a workload cannot reliably decide whether a miner is authorised or malicious.

Attackers rarely stop at mining if the environment remains open. XMRig is often the least damaging thing an intruder can deploy once access exists. That is why the operational priority is to close the credential, access, or exploitation path that allowed the miner in. If the environment can host cryptomining, it can usually host something worse.

From our research:

What this signals

Runtime miner activity is a governance smell that usually points back to identity. If a workload can be hijacked for cryptomining, the surrounding environment often has weak secret handling, overextended access, or poor offboarding of machine identities. That makes NHI lifecycle management a control priority, not an administrative task. Teams should expect the next incident to exploit the same gap if the access model is unchanged.

Compute theft and privilege theft are converging control problems. The same monitoring that catches a miner should also expose misused service accounts and cloud permissions, which is why identity telemetry belongs alongside workload and runtime telemetry. Aligning detection to frameworks such as NIST SP 800-53 Rev 5 Security and Privacy Controls helps teams tie resource abuse back to access governance rather than treating it as isolated noise. The practical signal is simple: if runtime abuse is rising, access scope is probably too broad.

Miner detection can be used as a precursor metric for NHI remediation. When organisations start seeing commodity payloads move through endpoints, containers, and cloud instances, they should expect the same access paths to support more targeted threats later. That is why the next step is to tighten secrets inventory, rotate stale credentials, and map workload ownership before attackers pivot to exfiltration or persistence.


For practitioners

  • Harden remote administration pathways Inventory SSH, RDP, and remote management tools, then restrict them with MFA, source-IP controls, and explicit allowlists so brute force and stolen credentials cannot be reused at scale.
  • Correlate persistence with change control Alert on new scheduled tasks, cron jobs, and registry startup items on systems that should not introduce mining software, and require change tickets for any sanctioned startup modification.
  • Baselining cloud and container compute use Set CPU and network baselines for pods and EC2 instances, then investigate sustained high CPU, especially when paired with outbound traffic to mining pools or uncommon encrypted sessions.
  • Strengthen workload runtime guardrails Apply restrictive pod security controls and cloud runtime monitoring so a compromised workload cannot freely execute, persist, or reach external mining infrastructure.
  • Treat miner detection as compromise response When XMRig appears, assume the attacker already has a usable foothold and review identity, privilege, and lateral movement paths before focusing only on removal.

Key takeaways

  • XMRig is rarely the main problem. It is a visible sign that attackers already found a usable access path and may have broader control of the environment.
  • The article shows that exposed credentials, brute force, malware, and vulnerability exploitation can all lead to the same result: unauthorised compute theft across endpoints, containers, and cloud instances.
  • The limiting control is not miner removal alone. Teams need tighter identity governance, runtime persistence monitoring, and workload hardening to prevent repeat compromise.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-03The article centres on compromised non-human access and unauthorised credential use.
MITRE ATT&CKTA0006 , Credential Access; TA0003 , PersistenceThe observed paths include credential abuse and persistence through startup mechanisms.
NIST CSF 2.0PR.AC-4Least-privilege access is central when attackers repurpose workloads for mining.
NIST SP 800-53 Rev 5IA-5Credential management is directly implicated by exposed access and reuse of admin paths.
CIS Controls v8CIS-5 , Account ManagementUnauthorised miner deployment often follows poor account and service access governance.

Inventory and rotate NHI credentials, then flag any miner activity tied to stale or overprivileged access.


Key terms

  • Cryptominer: A cryptominer is software that uses computing resources to generate cryptocurrency, usually by solving proof-of-work calculations. In security incidents, the key issue is not the software itself but unauthorised deployment, persistence, and resource abuse on systems the organisation pays to run.
  • Workload Identity: The identity assigned to a software workload — such as a containerised application, serverless function, or microservice — enabling it to authenticate to other services without storing static credentials.
  • Lifecycle Persistence: Lifecycle persistence is the ability to preserve the approved state of an identity or configuration across deletion, recovery, or re-download events. Without it, systems can revert to stale or unsafe defaults, which creates drift between policy and live behaviour even when the original settings were correct.
  • Secrets Exposure: Secrets exposure is the accidental or uncontrolled disclosure of credentials such as API keys, tokens, certificates, and service passwords. In NHI programs, it matters because a leaked secret often behaves like a live identity, creating immediate access risk until it is revoked or rotated.

What's in the full article

Expel's full article covers the operational detail this post intentionally leaves for the source:

  • Exact installation paths seen in recent XMRig incidents, including how different initial-access methods led to deployment.
  • Practical detection indicators such as mining pool traffic, off-hours CPU spikes, and persistence artefacts across Windows, Linux, Kubernetes, and AWS.
  • Cloud-specific guidance on AWS GuardDuty and Runtime Monitoring for unauthorised miners.
  • Defensive checks for Kubernetes pod security policies that help constrain cryptomining workloads.

👉 Expel's full article covers installation vectors, detection signals, and cloud-specific response guidance.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, secrets management, workload identity, and identity lifecycle controls. It helps practitioners connect machine identity risk to the broader identity programme they already run.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 20, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org