Hackers Deploy SANSAR Rootkit to Hide Cryptocurrency Mining on Linux AI Servers

Hackers compromised three Linux GPU hosts in a cryptomining campaign that combined hidden mining processes, fake GPU readings, and multiple remote access channels.

Tracked as REF3364, the intrusion used SANSAR, a Rust program that controls CPU and GPU miners through Tor. Although SANSAR manages the operation, a separate kernel rootkit hides its activity. Another backdoor, named netns, retrieves its controller address from an Ethereum smart contract.

The toolkit shows how attackers can steal computing resources while making routine monitoring tools display misleading information.

SANSAR Rootkit Hides Cryptomining

The attacker entered through an internet-accessible Ray job agent that accepted submissions without authentication. Ray supports distributed AI and Python workloads, while its Jobs API allows remote users to submit applications for execution across a cluster.

Although the Ray dashboard listened only on the local loopback interface, the exposed agent still provided an entry point.

Elastic recorded external probes on October 22, 2026. Two days later, a submitted job executed NVIDIA’s nvidia-smi utility and sent GPU inventory details to an external server.

On October 25, the attacker submitted a Python reverse shell. It ran under the account owning the Ray session. The attacker then added an SSH key to that account’s authorized_keys file for continued access.

After obtaining root privileges, the actor placed the toolkit under /opt/vadi_ and installed its components.

SANSAR supervised XMRig, renamed kurt, for CPU mining and SRBMiner-MULTI, renamed tilki, for GPU mining. Mining pool addresses and wallet settings came from the controller rather than hardcoded fallback values.

The acpi_thermal_mgr kernel module used Linux ftrace hooks to conceal selected processes, files, and socket entries. It filtered directory listings and blocked direct inspection of hidden process paths.

C2 domain decoded in memory (Source: elastic)
C2 domain decoded in memory (Source: elastic)

Installation through Dynamic Kernel Module Support and an initramfs loader allowed the rootkit to load again when the machine booted with the modified image.

A separate NVIDIA Management Library wrapper manipulated information returned to monitoring tools, including nvidia-smi.

The wrapper reported GPU utilization as zero percent. It also substituted random temperatures between 36 and 46 degrees Celsius and power readings between 100 and 200 watts, masking signs of mining activity.

SANSAR used the Arti Tor library for command communications, with optional bridges supported through Lyrebird. Before connecting, it checked for debugging and suspicious execution delays.

Meanwhile, netns provided an independent access route. It queried an Ethereum smart contract for an encoded controller IPv4 address, then connected directly over TCP port 8080.

The controller could instruct netns to launch a Bash reverse shell toward another destination. Elastic supplied YARA rules for SANSAR and netns.

The research highlights checks for AI infrastructure operators review who can submit Ray jobs, investigate unexpected SSH keys and systemd services, inspect kernel module persistence, and verify NVIDIA library integrity. GPU dashboards alone may not reliably reveal this intrusion.

Join 16,000+ SOC teams using ANY.RUN to streamline threat investigations and reduce manual effort. Explore for your team 

Varshini
Varshini
Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies..

Trending News

Related Stories