← News

SANSAR malware uses modified NVIDIA library to hide mining

New Linux cryptojacking campaign uses the SANSAR orchestrator, kernel rootkit, and a modified NVIDIA library to report 0% GPU usage.

By CyberX I.T SolutionsCibersegurança5 min readSource: SANSAR Linux Cryptomining Malware Uses Modified NVIDIA Library to Hide GPU Activity ↗Ler em português →

SANSAR Malware Uses Modified NVIDIA Library to Conceal Mining

A cryptocurrency mining operation focused on Linux systems, tracked by Elastic Security Labs under the REF3364 activity cluster, targets servers equipped with GPUs and used for Artificial Intelligence and machine learning workloads. The campaign employs a sophisticated toolkit called SANSAR, designed to bypass hardware monitoring tools and conceal malicious activity from system administrators.

Identified in October 2026, the initial intrusion often occurs through exposed and unauthenticated Ray agents on the internet. Once initial access and root privileges are obtained, operators deploy persistence modules in the initial ramdisk (initramfs), in addition to a Rust orchestrator, a kernel rootkit, and a modified NVIDIA management library to falsify hardware telemetry.

Infection and Persistence Mechanism

The initial vector documented in the occurrences involves the exploitation of misconfigured Ray task agents. Attackers execute remote commands to inventory GPU resources using the utility nvidia-smi, inject a Python reverse shell, and add unauthorized SSH keys to the file authorized_keys to ensure persistent access.

After privilege escalation to root, the toolkit is installed in the /opt/vadi_ directory. To ensure kernel-level persistence, attackers compile the acpi_thermal_mgr.ko module using Dynamic Kernel Module Support (DKMS) and configure a loader in initramfs. This way, the rootkit is automatically loaded whenever the operating system boots.

SANSAR Toolkit Architecture

The core of the operation is SANSAR, an orchestrator developed in Rust that communicates encrypted over the Tor anonymity network using the Arti implementation. Before starting its routine operations, the malware performs anti-debugging checks by reading the TracerPid value, terminating execution if it detects analysis tools running.

SANSAR manages two main miners renamed on the system:

  • kurt: XMRig variant (version 6.25.0) dedicated to CPU processing.

  • tilki: SRBMiner-MULTI variant (version 3.6.9) dedicated to GPU processing.

Additionally, the toolkit maintains redundant communication channels using a secondary backdoor called netns. Registered as a systemd service, netns queries a smart contract on the Ethereum network (0x43eb291f56688c63c93e8a93c4591fc997cf6349) to retrieve the command and control (C2) IP address before establishing a direct TCP connection to receive orders.

Telemetry Spoofing and Process Hiding

The most distinctive aspect of the REF3364 threat is the use of a modified NVIDIA Management Library (NVML) wrapper. The malicious component intercepts calls made by monitoring tools, such as nvidia-smi, altering the returned data to mask high processing load.

While mining consumes hardware capacity in the background, the wrapper forces the GPU utilization report to 0%. Additionally, temperature and power consumption values are replaced with simulated metrics, displaying temperatures between 36°C and 46°C and power between 100 and 200 watts to avoid operational alerts.

To complement the camouflage, the acpi_thermal_mgr.ko rootkit uses the kernel function tracer (ftrace) to intercept system calls, hiding processes, files, and network socket entries. Listing tools executed on the host receive standard error messages like "No such file or directory" when attempting to inspect the intrusion artifacts.


CyberX Technical Analysis

The analysis of the REF3364 architecture demonstrates a significant methodological effort to maximize persistence time in High-Performance Computing (HPC) environments and AI infrastructures. The use of Rust in the SANSAR orchestrator provides portability and resilience against traditional reverse engineering, while the employment of dual communication layers — Tor via Arti and C2 resolution via Ethereum smart contract — mitigates the risk of disruption by centralized infrastructure takedowns.

From a defensive standpoint, process hiding through ftrace hooks and the tampering of hardware management libraries (NVML) invalidate superficial operational monitoring metrics. Traditional EDR tools or native command-line utilities become ineffective if they blindly rely on compromised NVIDIA driver APIs.

Rigorous validation of hardware management library integrity and auditing of permissions on distributed task execution agents, such as Ray, are recommended. Detection should focus on deviations in the system's process tree, inspection of unsigned kernel modules, and analysis of anomalous network traffic directed to Tor nodes or contract query transactions on public blockchains.


CyberX SOC Intelligence Bulletin

The REF3364 cluster represents a direct cryptojacking threat targeting expanding GPU infrastructure environments, requiring immediate response from defensive security teams and Site Reliability Engineering (SRE). The initial mass exploitation of distributed computing agents exposed on the internet enables frictionless remote command execution for operators.

To mitigate risks and hunt for correlated threats, SOC analysts should prioritize the following operational guidelines:

  • Asset and Exposure Verification: Immediately audit control panels, APIs, and distributed computing agents (such as Ray) exposed to the external network without robust certificate- or token-based authentication.

  • Library Integrity: Validate hashes and cryptographic signatures of critical hardware libraries, with an emphasis on the NVIDIA Management Library (NVML), detecting potential replacements or runtime hooks.

  • Kernel Inspection: Investigate the presence of unauthorized kernel modules loaded via DKMS, using system integrity tools to inspect changes to initramfs images and the loading of ftrace hooks.

  • Network Monitoring: Monitor anomalous requests to the Tor network or TCP traffic directed to non-standard ports originating from unknown services registered in systemd.

No additional indicators of compromise were identified beyond the public artifacts validated in the threat intelligence sources consulted for this incident.


Frequently asked questions

What is SANSAR?

SANSAR is an orchestrator developed in Rust, part of a cryptojacking campaign, which communicates via the Tor network and manages miners on compromised Linux systems.

How does the malware hide GPU usage?

The malware uses a modified wrapper of the NVIDIA Management Library (NVML) that intercepts calls from monitoring tools to force-report GPU utilization to 0%, in addition to simulating temperature and power metrics.

What is the initial access vector of the infection?

The breach frequently occurs through the exploitation of unauthenticated Ray task agents exposed on the internet.

How does the rootkit ensure system persistence?

The attackers compile the acpi_thermal_mgr.ko kernel module using DKMS and configure a loader in initramfs so that it is automatically loaded at every system boot.

Esta análise foi útil?

Ainda não há avaliações.