T1496.001

Compute Hijacking

Adversaries may leverage the compute resources of co-opted systems to mine cryptocurrency or perform other resource-intensive tasks, degrading system performance and hosted service availability. The most prevalent form is unauthorized cryptocurrency mining (cryptojacking), typically targeting Monero (XMR) via XMRig or derivative tools due to CPU-friendliness and transaction privacy. Threat actors including TeamTNT, Blue Mockingbird, Rocke, APT41, Kinsing, and Hildegard have deployed miners as follow-on payloads targeting Windows endpoints, Linux servers, and containerized environments. Miners connect to mining pools over stratum protocol (commonly ports 3333, 4444, 14444) and are often deployed alongside rootkits, cron-based persistence, and competing miner kill scripts.

Microsoft Sentinel / Defender
kusto
let MinerProcessNames = dynamic([
  "xmrig", "xmrig.exe", "xmrig-notls", "xmrig-cuda", "xmrig-amd",
  "minerd", "cpuminer", "cpuminer-opt",
  "ethminer", "nbminer", "t-rex", "phoenixminer",
  "nanominer", "xmr-stak", "xmrstak", "rhminer",
  "kdevtmpfsi", "kinsing", "sysupdate", "networkservice", "sysguard",
  "pastebin", "bioset", "kerberods"
]);
let MinerCmdPatterns = dynamic([
  "stratum+tcp://", "stratum+ssl://", "stratum2+tcp://",
  "--donate-level", "--mining-threads", "--coin monero", "--coin xmr",
  "pool.minexmr", "pool.hashvault", "xmrpool.eu", "monerohash.com",
  "supportxmr.com", "nanopool.org", "2miners.com", "f2pool.com",
  "--nicehash", "-o stratum", "pool.xmr", "mine.xmr",
  "cryptonight", "randomx", "--threads", "--max-cpu-usage"
]);
let MiningPorts = dynamic([3333, 4444, 5555, 7777, 14444, 45700, 3032, 8008, 9999, 14433, 45560]);
// Branch 1: Known miner process names or mining-specific command line arguments
let ProcessBranch = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName has_any (MinerProcessNames)
      or ProcessCommandLine has_any (MinerCmdPatterns)
| extend DetectionBranch = "ProcessExecution"
| extend MinerBinaryMatch = FileName has_any (MinerProcessNames)
| extend MiningArgMatch = ProcessCommandLine has_any (MinerCmdPatterns)
| extend SuspiciousParent = InitiatingProcessFileName has_any ("cmd.exe", "powershell.exe", "bash", "sh", "cron", "curl", "wget", "python", "python3")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine,
          SHA256, FolderPath, DetectionBranch, MinerBinaryMatch, MiningArgMatch, SuspiciousParent;
// Branch 2: Outbound connections to mining pool ports from any process
let NetworkBranch = DeviceNetworkEvents
| where Timestamp > ago(24h)
| where RemotePort in (MiningPorts)
| where RemoteIPType == "Public"
| extend DetectionBranch = "MiningPoolConnection"
| extend MinerProcessMatch = InitiatingProcessFileName has_any (MinerProcessNames)
| extend MiningArgMatch = InitiatingProcessCommandLine has_any (MinerCmdPatterns)
| project Timestamp, DeviceName,
          AccountName = InitiatingProcessAccountName,
          FileName = InitiatingProcessFileName,
          ProcessCommandLine = InitiatingProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine,
          DetectionBranch, RemoteIP, RemotePort, RemoteUrl,
          MinerProcessMatch, MiningArgMatch, SuspiciousParent = false;
// Combine and sort
union ProcessBranch, NetworkBranch
| sort by Timestamp desc
high severity high confidence

Data Sources

Process: Process Creation Network Traffic: Network Connection Creation Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents DeviceNetworkEvents

False Positives

  • Authorized cryptocurrency mining operations or research environments where staff legitimately run miners
  • Security researchers testing miner detection capabilities using XMRig or similar tools in sandboxed environments
  • Port 3333 used by legitimate development tools or custom applications (e.g., some IoT platforms, local proxy servers)
  • Penetration testers running authorized mining simulations as part of red team engagements with documented change tickets
  • Academic HPC (High Performance Computing) workloads that use similar CPU-maximizing flags but for legitimate compute tasks

Unlock Pro Content

Get the full detection package for T1496.001 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections