SANSAR Linux Cryptomining Malware Uses Modified NVIDIA Library to Hide GPU Activity
What Happened – Researchers tracking threat cluster REF3364 uncovered a new Linux‑focused cryptomining toolkit named SANSAR. The Rust‑based orchestrator runs on compromised Linux hosts and receives commands over the Tor network, allowing operators to spin up both CPU and GPU miners on demand. What sets SANSAR apart is a custom‑built NVIDIA driver library that intercepts the kernel’s GPU‑usage counters, feeding falsified low‑utilisation values back to system‑monitoring tools. By doing so, the malware evades the typical heuristics that security products use to flag sustained high‑GPU workloads—a classic “resource‑abuse” evasion technique.
The campaign was first observed in early October 2026 when a security‑operations team at a large cloud‑service provider noticed an unexplained dip in GPU utilisation metrics on a subset of its bare‑metal instances. Deep packet inspection of outbound traffic revealed periodic connections to hidden services on the Tor network, each carrying short, encrypted payloads that matched the SANSAR command‑and‑control (C2) protocol. Subsequent reverse‑engineering showed that the toolkit downloads pre‑compiled miner binaries (both XMR‑ and ETH‑compatible) and launches them as low‑privilege processes, while the malicious NVIDIA library runs in kernel space to mask the extra load.
Technical Walk‑through –
- Initial Access – The attackers gain foothold via exposed SSH services (brute‑force or credential‑stuffing) or by exploiting unpatched container‑runtime vulnerabilities (e.g., CVE‑2025‑3456). Once inside, they elevate privileges using a local‑exploit chain that leverages a known kernel privilege‑escalation bug (CVE‑2025‑1122).
- Persistence – SANSAR drops its Rust orchestrator binary in
/usr/local/sbin/and registers a systemd service (sansar.service) that auto‑starts on boot. The service is deliberately named to blend with legitimate system daemons. - GPU‑Masking Library – A patched version of
libnvidia‑gpu.sois placed in/usr/lib/x86_64-linux-gnu/. The library hooks thenvmlDeviceGetUtilizationRatesAPI, returning values no higher than 5 % regardless of actual load. This subverts monitoring tools such as NVIDIA‑DCGM, Prometheus exporters, and even custom scripts that query/proc/driver/nvidia/gpus/*/information. - Mining Operations – The orchestrator pulls miner binaries from a Tor hidden service, verifies their SHA‑256 hashes, and launches them with CPU affinity masks that spread load across idle cores. GPU miners are launched with the
CUDA_VISIBLE_DEVICESenvironment variable set to the targeted GPU IDs, but the masking library ensures the OS still reports low utilisation. - C2 Communication – All C2 traffic is encapsulated in TLS‑wrapped HTTP over Tor, making network‑based detection extremely difficult. Commands include “scale‑up”, “scale‑down”, and “self‑destruct”.
Impact – The primary impact is resource theft. In the observed window (Oct 1 – Oct 15 2026), the compromised fleet of 1,200 GPU‑enabled instances generated an estimated 3.4 BTC (≈ US $115 M) in illicit revenue for the threat actors. No customer data was accessed or exfiltrated, and the malware does not install backdoors beyond the mining payloads. However, the hidden GPU load caused performance degradation for legitimate workloads, leading to SLA breaches for several SaaS customers.
Detection & Response – The cloud provider’s security team leveraged a combination of hardware‑level telemetry (NVIDIA’s NVLink counters) and behavioural analytics to spot the discrepancy between reported and actual power draw. After confirming the presence of the malicious library, they isolated the affected hosts, revoked the compromised SSH keys, and applied the latest kernel patches (including fixes for CVE‑2025‑1122). All SANSAR binaries were removed, and the compromised systemd units were disabled. The provider also issued a public advisory urging customers to audit their GPU‑monitoring stacks.
Industry Reaction – Security analysts note that SANSAR represents a new class of “resource‑obfuscation” malware that specifically targets high‑value GPU assets, a trend that could expand to AI‑training clusters and edge‑compute devices. The use of a custom NVIDIA library is reminiscent of earlier Windows‑based cryptominers that tampered with driver APIs, but this is the first publicly documented Linux variant. Researchers recommend that organisations adopt hardware‑rooted attestation and continuous integrity verification of driver binaries to mitigate similar threats.
Why It Matters for Trust & Control Assurance – The incident underscores the need for continuous monitoring of system‑resource metrics and the verification of trusted software components—a single control objective that satisfies multiple frameworks (e.g., NIST CSF Detect, ISO 27001 A.12.4, SOC 2 CC6).
Who Is Affected – Cloud‑infrastructure providers, SaaS platforms that rely on GPU‑accelerated workloads, high‑performance computing (HPC) facilities, and any organisation running Linux servers with NVIDIA GPUs.
Recommended Actions –
- Deploy hardware‑based telemetry (e.g., NVIDIA DCGM, IPMI power sensors) and correlate it with OS‑level metrics.
- Implement integrity‑checking of driver libraries using signed packages or a trusted‑boot chain.
- Enforce strict SSH hardening (key‑based auth, MFA, rate‑limiting) and patch known kernel vulnerabilities promptly.
- Add the GPU‑utilisation anomaly rule to SIEM/EDR detection playbooks.
Technical Notes –
- Attack Vector: Malware that modifies a vendor‑supplied GPU driver library (kernel‑space).
- Tools: Rust‑based orchestrator, custom
libnvidia‑gpu.so, Tor C2, XMR‑/ETH‑miners. - Vulnerabilities Exploited: CVE‑2025‑1122 (local privilege escalation), CVE‑2025‑3456 (container runtime).
- Data Types: No PII or confidential data accessed; impact limited to compute resources.