SANSAR Linux Cryptominer Hides GPU via Modified NVIDIA Lib

Introduction
A financially motivated threat group tracked as REF3364 has been linked to a Linux‑focused cryptocurrency mining campaign that deliberately masks GPU utilization. The operation centers on a toolkit named SANSAR, a Rust‑based orchestrator that pulls commands through the TOR anonymity network to direct both CPU and GPU miners. Researchers note that the campaign targets servers and workstations equipped with NVIDIA GPUs, aiming to monetize idle compute cycles while remaining invisible to standard monitoring tools.
Initial telemetry shows the malware arriving via compromised container images and vulnerable SSH credentials, giving the operators a foothold on GPU‑enabled hosts.
Technical Overview of SANSAR
SANSAR functions as a modular controller written in Rust, a language chosen for its memory safety and low runtime overhead. The orchestrator can launch, pause, and reconfigure mining processes without writing persistent files to disk, reducing forensic artifacts. Its design includes a plug‑in architecture that allows the operators to swap mining algorithms or add new payloads without recompiling the core binary.
The binary is stripped of symbols and employs anti‑debugging tricks, making static analysis more time‑consuming for defenders.
GPU Activity Concealment via Modified NVIDIA Library
The most distinctive technique involves a patched version of an NVIDIA user‑space library. By altering the library’s reporting functions, the malware feeds falsified utilization metrics to standard monitoring utilities such as nvidia‑smi. Administrators relying on those metrics see normal GPU load while the miner runs at full capacity. Because the library is loaded by any process that queries GPU state, the deception is systemic and affects all user‑space observers.
The patch is applied at runtime through a loader that replaces the legitimate library in the process namespace, leaving the on‑disk file untouched.
Command and Control over TOR
All operator instructions travel over hidden services within the TOR network. This design obscures the controller’s IP address and makes sinkholing or blocking based on IP reputation ineffective. The orchestrator authenticates each command using embedded cryptographic keys, preventing hijacking by third parties. The use of TOR also provides resilience against takedown attempts, as the hidden service address can be rotated quickly.
Traffic analysis reveals periodic heartbeat messages that keep the mining fleet synchronized with the operator’s schedule.
Detection Challenges
Traditional host‑based detectors that poll GPU counters through the vendor library will miss the activity because the library itself is compromised. Network‑level signatures are also weak, as TOR traffic resembles legitimate privacy‑preserving connections. Behavioral analytics that correlate unexpected CPU spikes with hidden GPU work can provide a more reliable signal. Additionally, integrity verification of the NVIDIA library at boot time can reveal tampering before miners start.
Endpoint detection and response platforms that rely solely on user‑space API calls are blind to this class of evasion.
Practical Mitigation Steps
- Deploy file‑integrity monitoring on all NVIDIA library files and alert on any unauthorized modification.
- Enable kernel‑level GPU accounting, for example via eBPF or cgroup controllers, that does not depend on user‑space libraries.
- Restrict execution of unsigned binaries in directories commonly used by miners.
- Monitor outbound TOR connections and correlate them with anomalous process behavior.
- Apply least‑privilege principles to container runtimes and virtual machines that host GPU workloads.
Grivyonx Expert Analysis
The SANSAR campaign illustrates how attackers increasingly target the trust chain between hardware vendors and monitoring software. By subverting a single library they gain a stealth foothold that bypasses most agent‑based defenses. Organizations should treat GPU telemetry as a critical integrity surface and invest in kernel‑level observability combined with automated response playbooks.
Conclusion
The REF3364 operation demonstrates that cryptomining threats are evolving beyond simple binary deployment into sophisticated supply‑chain style subversion of monitoring libraries. Defenders who combine library integrity checks, kernel‑level GPU accounting, and TOR traffic analysis will be better positioned to detect and disrupt similar campaigns. Grivyonx’s AI‑driven automation and DevSecOps pipelines can help teams enforce those controls continuously across cloud and on‑premise GPU fleets.
- #Linux
- #cryptomining
- #SANSAR
- #GPU evasion
- #NVIDIA
- #TOR
- #Rust
- #threat intel



