Join our Newsletter — 33% off our NHI Course

How do you detect crypto mining on Linux hosts?

Detect it by watching for sustained high CPU or GPU usage, miner-like process names, and outbound connections to mining pools or proxy services. Review new scheduled tasks, unusual container activity, and binaries launched from writable directories. Correlate host resource spikes with suspicious downloads, privilege changes, and known persistence mechanisms, then confirm whether the workload matches an approved application.

What crypto mining looks like on a Linux host

Crypto mining detections work best when you treat mining as a behavior pattern, not a single indicator. A miner usually creates a steady workload, talks to a pool or proxy, and tries to persist through cron, systemd, containers, or writable paths. On Linux, that often shows up as a process tree that does not match the host’s expected role, especially when compute spikes line up with suspicious downloads or recent privilege changes.

The most useful question is whether the host is doing work that is explainable by the approved application stack. If the CPU or GPU pattern is sustained, the binary source is unusual, and network traffic resembles pool access rather than normal service communication, the suspicion rises quickly. That is why detection should combine process, file, network, and persistence signals instead of relying on one noisy symptom.

For Linux-specific investigation, watch the usual execution paths that miners abuse, such as cron entries, systemd units, shell profiles, tmp locations, and other writable directories. Also inspect container workloads carefully, because mining inside a container can blend into normal orchestration activity unless you correlate it with the underlying host resource use and the image provenance.

Signals that separate mining from ordinary high usage

Resource use alone is not enough, because legitimate workloads can be CPU intensive. What makes mining distinct is repetition and consistency, such as long-running saturation with little business variation, a process name that imitates a common tool, or a binary that appears shortly after an external download. If the host is idle from a business perspective but the compute load never settles, that mismatch deserves a deeper look.

Network context is equally important. Mining traffic often points to known pools, proxy layers, or a small set of destinations that do not align with the host’s purpose. Even when the destination is hidden behind TLS, the pattern of persistent outbound sessions, unusual ports, or repeated connection attempts can still distinguish it from ordinary application traffic. Anchoring that observation to host logs and process lineage gives you a far stronger detection than port-based hunting alone.

Persistence and privilege changes are the other strong clues. If a new scheduled task, service, startup script, or container restart policy appears around the same time as the mining behavior, treat that as a likely enablement mechanism. For a broader Linux hunting playbook, use the Linux Detection and Response Guide to map those signals to audit sources, sensor coverage, and incident workflow.

How to confirm and scope the compromise

Confirmation is about correlating artifacts, not just spotting a heavy process. Start by identifying the parent process, the file hash, the launch location, and the user context, then compare that chain to what should normally run on the host. If the same binary or container image is tied to suspicious downloads, unexpected privilege use, and repeated outbound access to pool-like infrastructure, the case is much stronger.

Scope matters because miners are often a symptom of broader compromise. Review whether the host exposed SSH keys, tokens, service credentials, or writable automation paths that could have been used for persistence. Check whether the attacker installed additional tooling, disabled logging, or changed security controls after initial access, because mining campaigns commonly reuse the same foothold for later abuse. The point is to decide whether you are seeing only unauthorized compute abuse or a wider host compromise that needs containment and credential review.

If the workload sits on cloud infrastructure or a large fleet, understand whether the mining activity was enabled by compromised access rather than only by malware. In those cases, Amazon AWS Hacked Accounts Crypto-Mining is a useful reminder that compromised access can be the real root cause, with the host merely providing the compute.

Risk and Threat Considerations

Mining on a Linux host is usually a sign of unauthorized resource consumption, but the operational risk is broader than wasted CPU cycles. A miner can coexist with persistence, privilege abuse, and credential exposure, so the visible workload may be only one part of the compromise. If defenders stop at process killing, they may miss the access path that will let the attacker return.

Failure mechanism: Attackers get execution on the host, establish persistence through common Linux startup mechanisms, and use the system’s resources to run mining software while blending into normal administration or container activity.

Impact: You can lose compute capacity, create noisy and unstable hosts, and leave behind a compromised foothold that can be reused for additional payloads, lateral movement, or credential abuse.

Standards & Framework Alignment

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

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

Framework Control / Reference Relevance
MITRE ATT&CK T1496 — Resource Hijacking Mining on Linux is a classic resource-hijacking behavior.
Recommendation — Map sustained compute abuse to T1496 and hunt for pool traffic plus persistence.
CIS Controls v8 CIS-1 — Inventory and Control of Enterprise Assets Detecting rogue miners depends on knowing which Linux hosts and workloads are authorized.
CIS-8 — Audit Log Management Mining detection relies on correlating process, network, and persistence evidence from logs.
Recommendation — Maintain an accurate Linux asset and workload inventory to flag unauthorized mining. Centralize host and container logs so mining indicators can be correlated quickly.
NIST CSF 2.0 DE.CM-01 — Networks and network services are monitored to find potentially adverse events Pool/proxy connections are a primary mining indicator on Linux hosts.
Recommendation — Monitor outbound connections for repeated mining-pool or proxy patterns.
NIST SP 800-53 Rev 5 AU-6 — Audit Record Review, Analysis, and Reporting Linux mining investigations require correlating host, process, and network evidence.
Recommendation — Review audit data for process launches, persistence changes, and suspicious egress.

Practitioner Guidance

What to prioritise: Correlate process, network, and persistence evidence before you declare a true mining incident. A single CPU spike is weak evidence; a sustained workload plus pool-like egress plus a suspicious launch path is a much better threshold for action.

What to verify: Confirm whether the binary, container image, or scheduled task belongs to an approved workload. If it does not, treat the host as potentially compromised and preserve process, network, and file evidence before you clean it up.

Common mistake: Teams often stop after killing the miner, but that only removes the symptom. The more important judgement is whether the access path, credential, or persistence mechanism that enabled the miner has also been removed.

Practitioner takeaway: The best detections combine resource anomalies with execution, network, and persistence context, because crypto mining is usually the visible payload, not the full incident.