Detect Resource Hijacking in CrowdStrike LogScale
Adversaries may leverage the resources of co-opted systems to complete resource-intensive tasks, which may impact system and/or hosted service availability. Resource hijacking includes cryptocurrency mining (cryptojacking), selling network bandwidth to proxy networks (proxyjacking), generating SMS traffic for profit, and abusing cloud-based messaging or compute services. Adversaries often deploy miners via initial access (phishing, exploitation), lateral movement, or compromised cloud credentials, and may use rootkits or process hollowing to hide mining activity.
MITRE ATT&CK
- Tactic
- Impact
- Technique
- T1496 Resource Hijacking
- Canonical reference
- https://attack.mitre.org/techniques/T1496/
LogScale Detection Query
#event_simpleName in [ProcessRollup2, SyntheticProcessRollup2, NetworkConnectIP4]
| MinerProcess := FileName = /(?i)\b(xmrig|minerd|cpuminer|ethminer|nheqminer|t-rex|nbminer|phoenixminer|lolminer|gminer|bfgminer|cgminer|xmr-stak|poolminer|kawpowminer|teamredminer)(\.exe)?\b/
| MinerCmdLine := CommandLine = /(?i)(stratum\+(tcp|ssl)|stratum2\+tcp|--donate-level|--coin[ =](xmr|monero)|-o\s+pool\.|--url=.*pool|--wallet|mining\.(subscribe|authorize))/
| MiningPoolPort := RemotePort in [3333, 4444, 5555, 7777, 9999, 14444, 45700, 3256, 14433, 20536]
| SpawnedByLOLBin := MinerProcess = true AND ParentBaseFileName = /(?i)\b(cmd\.exe|powershell\.exe|wscript\.exe|cscript\.exe|mshta\.exe|bash|sh)\b/
| filter(MinerProcess = true OR MinerCmdLine = true OR MiningPoolPort = true)
| case {
SpawnedByLOLBin = true | RiskScore := 95;
MinerProcess = true AND MinerCmdLine = true | RiskScore := 90;
MinerProcess = true | RiskScore := 80;
MinerCmdLine = true | RiskScore := 75;
MiningPoolPort = true | RiskScore := 70;
* | RiskScore := 50;
}
| select([ComputerName, UserName, FileName, CommandLine, ParentBaseFileName, RemoteAddress, RemotePort, MinerProcess, MinerCmdLine, MiningPoolPort, SpawnedByLOLBin, RiskScore, @timestamp])
| sort(RiskScore, order=desc) Detects T1496 Resource Hijacking using CrowdStrike Falcon LogScale CQL against Falcon Insight EDR telemetry. Queries ProcessRollup2 and SyntheticProcessRollup2 events for known miner executable names via FileName regex and stratum protocol command-line patterns via CommandLine regex. Queries NetworkConnectIP4 events for outbound connections to mining pool ports via RemotePort set membership. Computes a risk score in a case block: LOLBin-spawned miners score 95, miners with stratum args score 90, standalone miner process names score 80, command-line patterns only score 75, and mining pool port connections score 70. Requires Falcon Insight with process and network telemetry collection enabled.
Data Sources
Required Tables
False Positives & Tuning
- Authorized mining hosts with Falcon sensor deployed — add a filter clause such as ComputerName != /approved-miner-host-pattern/ or use a Falcon exclusion policy scoped to those machine groups
- Legitimate use of ports 3333 or 4444 by internal security tools, protocol analyzers, or services that share mining pool port ranges — correlate RemoteAddress against threat intel before escalating NetworkConnectIP4 matches
- Open-source cryptocurrency wallet software such as Electrum or Exodus that connects to ElectrumX or blockchain nodes on ports overlapping with the mining pool port list
Other platforms for T1496
Testing Methodology
Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1XMRig Miner Execution with Stratum Protocol Arguments
Expected signal: Sysmon Event ID 1 (or Security Event ID 4688): Process Create for cmd.exe with CommandLine containing 'stratum+tcp', 'pool.minexmr.com', '--donate-level', and '--coin xmr'. The echo command generates no network connection but the command-line telemetry fully triggers the detection.
- Test 2Linux Miner Binary Dropped to /tmp and Executed
Expected signal: Auditd or Sysmon for Linux: file creation event for /tmp/xmrig (execve or open syscall), process execution event showing Image=/tmp/xmrig. Linux audit log: SYSCALL records for execve with /tmp/xmrig. EDR: DeviceFileEvents for /tmp/xmrig creation, DeviceProcessEvents for /tmp/xmrig execution.
- Test 3Outbound Connection to Mining Pool Port
Expected signal: Sysmon Event ID 3: Network Connection with DestinationPort=3333, Image=powershell.exe, DestinationIp=127.0.0.1. The connection fails but the attempt is logged. In production, the query filters 127.0.0.1 — modify DestinationIp to an external test IP if available in your lab.
- Test 4Miner Persistence via Scheduled Task
Expected signal: Security Event ID 4698: A scheduled task was created, with TaskContent XML showing the action command line including 'stratum+tcp'. Sysmon Event ID 1 on next logon: cmd.exe executing with the stratum-like command line. Registry: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks entry created.
- Test 5Cloud Credential Abuse Simulation (AWS CLI Reconnaissance)
Expected signal: AWS CloudTrail: DescribeInstances and DescribeInstanceTypes API calls logged with the caller's IAM identity, source IP, and timestamp. These reconnaissance calls immediately precede RunInstances in real cryptojacking campaigns. Process telemetry: Sysmon Event ID 1 for aws.exe with describe-instances arguments.
References (9)
- https://attack.mitre.org/techniques/T1496/
- https://sysdig.com/blog/labrat-cryptojacking-proxyjacking-campaign/
- https://www.trendmicro.com/en_us/research/23/l/teamtnt-returns-with-new-cloud-attacks.html
- https://unit42.paloaltonetworks.com/watchdog-cryptojacking/
- https://www.crowdstrike.com/blog/cryptomining-harmless-nuisance-or-serious-threat/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1496/T1496.md
- https://www.microsoft.com/en-us/security/blog/2023/07/25/cryptojacking-understanding-and-defending-against-cloud-compute-resource-abuse/
- https://xmrig.com/docs/miner/command-line-options
- https://www.aquasec.com/blog/cryptomining-attacks-targeting-cloud-native-environments/
Unlock Pro Content
Get the full detection package for T1496 including response playbook, investigation guide, and atomic red team tests.