Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore

Odin Research / What is / Malware and backdoors

What Is XMRig? The Open-Source Miner Behind Most Cryptojacking

A legitimate, open-source cryptocurrency miner that intruders install on other people's servers: how it works, how it is abused, and how to spot it.

By
Odin by Brandefense
Updated
21 Nov 2026
Reading time
6 min read
Type
Cryptocurrency miner (dual-use)

In short

XMRig is a free, open-source cryptocurrency miner for CPUs and GPUs. It supports algorithms such as RandomX, KawPow, CryptoNight and GhostRider and runs on Windows, Linux, macOS and FreeBSD. It is legal software, but attackers often install it on breached servers to mine with stolen computing power, a practice called cryptojacking.

Key takeaways

What it is
A GPL-3.0 open-source miner and RandomX benchmark for CPUs and GPUs, with official builds for Windows, Linux, macOS and FreeBSD.
How it works
XMRig reads a JSON config, connects to a mining pool and turns CPU or GPU time into cryptocurrency for the wallet in that config.
Why it matters
Attackers install it after a breach. CISA reported Iranian government-sponsored actors deploying XMRig in a US federal network after exploiting Log4Shell.
What Odin Research saw
A watchdog script in Monograph 03 was written to kill rival miners, including xmrig, every two minutes, a sign that intruders fight over the same servers.
What to do first
Treat an unexpected miner as proof of a wider intrusion. Find the entry point, patch it, and hunt for persistence and other tools.

What is XMRig?

XMRig is a free, open-source cryptocurrency miner that uses a computer's CPU or GPU to mine coins for a wallet set in its configuration. It is legitimate software with official builds for Windows, Linux, macOS and FreeBSD. Attackers often install it on breached servers, turning stolen computing power into money. This abuse is called cryptojacking.

The project's GitHub README describes XMRig as a high-performance, open-source, cross-platform miner and RandomX benchmark. It is licensed under GPL-3.0 and supports the RandomX, KawPow, CryptoNight and GhostRider algorithms. The repository had about 10,200 stars and 3,900 forks on 21 November 2026.

Because XMRig is open source, anyone can download, rebuild or rename it. That is why its name appears in so many intrusion reports. Finding it where nobody installed it on purpose is a clear sign of trouble.

How XMRig works

  1. Configuration. The README says a JSON config file is the preferred way to set XMRig up. The config names the mining pool, the wallet and the algorithm.
  2. Backends. The CPU backend covers x86, x64, ARMv7, ARMv8 and RISC-V. An OpenCL backend runs on AMD GPUs, and a CUDA plugin adds NVIDIA GPUs.
  3. Mining. XMRig fetches work from the pool, hashes it as fast as the hardware allows and sends results back. The CPU stays busy for as long as the miner runs.
  4. Control. An HTTP API lets an operator change settings at run time without a restart.
  5. Donation. By default XMRig donates 1% of mining time, one minute in every 100, to its developers. Users can raise this level or remove it in the source code.

Nothing in this design is malicious. The question is always whose hardware it runs on and who gets the coins.

How attackers use XMRig

MITRE ATT&CK files this behavior under Resource Hijacking (T1496): using a victim's systems for resource-heavy work such as mining, which can degrade the availability of services on them. The sub-technique Compute Hijacking (T1496.001) covers CPU and GPU theft.

A well-documented case comes from CISA and the FBI. Advisory AA22-320A, first published on 16 November 2022, describes Iranian government-sponsored APT actors in a US federal civilian network:

  • Entry. The actors exploited Log4Shell (CVE-2021-44228) on an unpatched VMware Horizon server as early as February 2022. See Exploit Public-Facing Application (T1190).
  • Miner. They installed XMRig, including the WinRing0x64.sys driver, a config.json file and an executable named RuntimeBroker.exe to look like a Windows component.
  • Persistence. A scheduled task ran that executable daily as SYSTEM.
  • Everything else. The same actors set up Ngrok reverse proxies, used PsExec and Mimikatz, created a rogue domain admin account and added a Defender exclusion for the whole C: drive.

The lesson: a miner is often the visible part of a larger intrusion. The same access that runs XMRig can steal credentials or move laterally.

What Odin Research observed

Odin Research has not run a dedicated XMRig study. The miner and its relatives appear as context in several reports.

  • Turf wars on shared servers. Monograph 03 described a staged watchdog script written to evict rival intruders from internet-facing servers. Every 120 seconds it would kill processes matching 13 names, including xmrig, xmr-stak, minerd, nicehash and kryptex, and move rival files to a quarantine folder rather than delete them.
  • Why it matters. The report's advice is direct: a quarantine folder full of other people's malware is a sign that a second intruder is on the host. Finding one miner should prompt a search for others.
  • Mining as a side business. The same staging server held mining configurations next to lateral-movement scripts. A Windows script was designed to write a plaintext Stratum config.json, register a task named like a Microsoft Edge update and close Task Manager if it stayed open during a night-time mining window.
  • Shared pools are not C2. The scripts named public mining-pool front ends used by many unrelated miners. Monograph 03 treats them as policy signals, not attacker infrastructure.
  • Miner droppers next to C2. Monograph 09 recorded a staging host that served both a GitHub-based C2 agent and a cryptominer dropper script.
  • Miner panels. Monograph 27 counted eight SilentCryptoMiner web panels on seven IP addresses. One was suspected and the rest were candidates, so none was published.

Kryptex, another mining tool named in that watchdog list, has its own Odin Research page.

How to detect XMRig cryptojacking

MITRE's detection guidance for T1496 centers on a few joined signals:

  • Sustained high CPU or GPU use by a process you do not recognize, especially on servers that are normally quiet.
  • Outbound connections to mining pools from servers, containers or cloud instances.
  • Persistence through cron jobs on Linux, or scheduled tasks and services on Windows, that restart the miner.
  • Cloud signals such as sudden VM CPU spikes or new instances nobody approved.

Add XMRig-specific checks:

  • Driver loads. CISA's case used WinRing0x64.sys. A load of that driver on a server with no hardware-monitoring software deserves a look.
  • Masquerading. Look for config.json next to an executable named like a Windows process, outside System32.
  • Defender changes. New broad exclusions, such as a whole drive, often come just before a miner starts.

Monograph 03 publishes a Suricata signature for its campaign's plaintext Stratum mining traffic and YARA rules for the eviction watchdog and mining configs. Odin Research has no XMRig-specific rule. Find the rules in the Defense Kit.

How to respond to XMRig on your systems

  1. Assume a breach. Find out how the miner got there. In CISA's case it was Log4Shell, so patch the entry point first. See How to respond to actively exploited vulnerabilities.
  2. Remove persistence. Delete scheduled tasks, services, cron entries and Defender exclusions the intruder added, then remove the binaries.
  3. Hunt wider. Look for reverse proxies, new admin accounts, credential dumping and other intruders' tools.
  4. Control egress. Servers rarely need to reach mining pools. Block outbound traffic that has no business purpose. See cloud security.
  5. Watch the bill. In the cloud, set CPU and spending alerts. MITRE notes that resource hijacking is hard to stop with preventive controls, so detection matters most.

XMRig compared with other mining tools seen by Odin Research

ToolWhat it isWhere it appears in Odin Research
XMRigOpen-source CPU and GPU miner (GPL-3.0)On a rival-kill list in Monograph 03
xmr-stak, minerd, nicehashOther miner and daemon namesOn the same rival-kill list in Monograph 03
KryptexMining service and poolOn the rival-kill list; its pool front ends named in mining scripts in Monograph 03
SilentCryptoMinerMiner with a web control panelEight panels on seven IP addresses in Monograph 27

Exposed cloud servers also attract worms such as P2PInfect and other botnets, so a cryptojacking finding should trigger a full check of the host.

Frequently asked questions about XMRig

What is XMRig?

XMRig is a free, open-source cryptocurrency miner for CPUs and GPUs. It supports RandomX, KawPow, CryptoNight and GhostRider and runs on Windows, Linux, macOS and FreeBSD.

Is XMRig a virus or malware?

No. XMRig itself is legitimate, GPL-3.0-licensed software. Attackers often install it on breached machines without permission, and security tools may flag it for that reason.

Is XMRig legal?

Yes, on hardware you own or are allowed to use. Running it on other people's servers or cloud accounts without permission is cryptojacking and is illegal in most countries.

Is XMRig safe to use?

Downloaded from the official project and run on your own hardware, it is a normal mining tool. Copies from unofficial sources may be modified, and a miner found on a server you did not set up is a sign of intrusion.

Why does XMRig use so much CPU?

Mining is designed to use as much compute as it can. XMRig keeps the CPU or GPU busy for as long as it runs, which is why sustained high CPU on a quiet server is a key cryptojacking signal.

How do attackers install XMRig?

Usually after exploiting an exposed service. In CISA advisory AA22-320A, actors exploited Log4Shell on VMware Horizon, then installed XMRig with a renamed executable and a daily SYSTEM scheduled task.

How do I detect XMRig?

Look for unknown processes with sustained high CPU, connections to mining pools, cron jobs or scheduled tasks that restart a binary, the WinRing0x64.sys driver and config.json files next to renamed executables.

How do I remove XMRig?

Kill the process, delete its persistence entries and files, and remove any Defender exclusions. Then find and close the entry point and hunt for other tools, because the miner is rarely alone.

What MITRE ATT&CK technique covers XMRig?

Resource Hijacking (T1496), and in particular the sub-technique Compute Hijacking (T1496.001), covers attackers using a victim's computing power for cryptocurrency mining.

Sources

  1. XMRig repository and README, GitHub. github.com/xmrig/xmrig (checked 21 November 2026)
  2. CISA and FBI, Advisory AA22-320A, Iranian Government-Sponsored APT Actors Compromise Federal Network, Deploy Crypto Miner, Credential Harvester. www.cisa.gov/news-events/cybersecurity-advisories/aa22-320a (checked 21 November 2026)
  3. MITRE ATT&CK, T1496 Resource Hijacking. attack.mitre.org/techniques/T1496/ (checked 21 November 2026)

Related tools and terms

All Odin Research explanations · Brandefense glossary

Odin Research

Get the rules, not just the definition

Every Odin Research report ships with verified indicators and detection rules you can load today.

Open the Defense Kit