Attackers have found a clever way to run crypto mining on stolen GPU servers without tripping a single alarm. A new Linux toolkit called SANSAR rewrites the numbers that monitoring tools show, so a GPU that runs at full load looks completely idle. Elastic Security Labs tracks the campaign as REF3364 and saw it in late October on three Linux GPU hosts.

If you run AI training or inference infrastructure, this one deserves your attention. The attackers did not need a zero-day. They walked in through a door the victim left open.
How Hackers Hijacked GPU Servers Through an Exposed Ray Job Agent
The intrusion started with an exposed Ray job agent. Ray is an open-source framework that teams use to spread Python and AI workloads across many machines, and its Jobs API lets users send commands to the cluster.
On the compromised host, the Ray dashboard listened only on the local loopback address, which looks safe on paper. The job agent told a different story. It stayed reachable from the internet and accepted job submissions with no authentication at all.
The attackers moved fast once they found it:
- October 22: External probes first appeared in the Ray logs.
- October 24: A submitted job ran nvidia-smi and sent the GPU inventory to an outside server.
- October 25: The attackers submitted a Python reverse shell job that called back to their listener.
The shell ran under the local account that owned the Ray session. The attackers then added their own SSH key to that account's authorized_keys file, which gave them a permanent way back in. They later gained root, though the public analysis does not explain exactly how.
What Is SANSAR? The Rust Toolkit Controlling the Miners
SANSAR is a Rust program that works as the brain of the operation. It does not mine coins itself. It controls off-the-shelf miners and takes its orders over the Tor network.
The toolkit lives under /opt/vadi_ and includes these parts:
- sansar: The Rust orchestrator that handles Tor-based command and control, starts and stops miners, and opens interactive shells.
- kurt: A renamed copy of XMRig 6.25.0 that SANSAR launches for CPU mining.
- tilki: A renamed copy of SRBMiner-MULTI 3.6.9 that SANSAR launches for GPU mining.
- lyrebird: A legitimate Tor pluggable transport helper that lets SANSAR reach Tor through bridges.
- acpi_thermal_mgr.ko: A Linux kernel rootkit that hides processes, files, and sockets.
- netns: A separate backdoor that finds its controller through the Ethereum blockchain.
SANSAR also has no built-in wallet or mining pool. The operator sends the pool address and login details through the command channel, so researchers found nothing hardcoded to trace.
Anti-Debugging Checks and Hidden Tor Address
Before it connects anywhere, SANSAR checks whether someone is debugging it. It reads the TracerPid value from the process status and quits if the number is not zero. It also times a short loop and exits if the loop runs too slowly, a sign that an analyst may be stepping through the code.
The Tor address of its controller sits inside the binary as 62 scrambled bytes. The malware rotates and XORs each byte to rebuild the onion domain at runtime, so a simple string search finds nothing useful.
SANSAR understands 16 command types. They cover shell sessions, miner control, bridge updates, and even a raw TCP SYN flood against a chosen address and port. That last feature means the infected servers could also work as part of a Linux botnet in denial-of-service attacks.
How SANSAR Fakes 0% GPU Usage With a Modified NVIDIA Library
Admins usually spot mining by checking GPU load, heat, and power draw. SANSAR attacks exactly those signals.
NVIDIA's Management Library, known as NVML, feeds data to monitoring tools such as nvidia-smi. The attackers swapped the genuine libnvidia-ml.so.1 file for a wrapper. The wrapper still calls the real library, then edits the results before it hands them back.
The edited readings look like this:
- GPU utilization: Always reported as 0%.
- Temperature: Replaced with random values between 36 and 46 degrees Celsius (96.8 to 114.8 degrees Fahrenheit).
- Power draw: Replaced with random values between 100 and 200 watts.
The wrapper also filters process information. SANSAR can rebuild and reinstall the wrapper from source files on the host, so the operator can repair it if an update or cleanup breaks it.
Any dashboard that relies on NVML now tells the same false story. A zero on the screen proves nothing.
Kernel Rootkit That Hides Mining Processes on Linux
The acpi_thermal_mgr kernel module uses the Linux kernel ftrace feature to intercept system calls. It hooks directory listings, file opens, and process signals, and it also reaches into the routines that print TCP and UDP socket lists.
When a tool asks about a hidden process, the rootkit removes the matching entries or returns an error such as "No such file or directory" or "No such process." Only the SANSAR process itself can still signal its hidden children. The module can even remove itself from the kernel module list.
The attackers built the module through Dynamic Kernel Module Support (DKMS) and added an initramfs loader. The initramfs is a small filesystem that Linux loads into memory early in the Linux boot process. Because the module and loader sit in the boot image on disk, the rootkit loads again after every reboot that uses that image.
The source code carries Turkish comments, which hints at the author's language. Elastic did not name a specific group or person.
netns Backdoor Finds Its Server Through an Ethereum Smart Contract
The netns backdoor runs as a systemd service and gives the attackers a second way in. Instead of storing a fixed server address, it asks public Ethereum RPC services to read a smart contract. The contract returns an encoded IPv4 address, and netns connects to that address on TCP port 8080.
The controller can then send a SHELL command with a host and port. netns spawns Bash and opens a reverse shell to that destination, which may differ from the controller address. The command loop uses no authentication, so anyone who controls the contract data controls the backdoor.
Blockchain-based command lookup makes takedowns harder. Defenders cannot seize a domain when the server address lives on a public ledger.
SANSAR Indicators of Compromise and Files to Hunt For
Use these values to hunt for the toolkit in your logs and file systems:
| Type | Indicator |
|---|---|
| Onion controller | efxisnqldelyr5ra25oqfrsut54b34g26e7zrsiuupsoekjof2gho2id[.]onion:9051 |
| Ethereum contract | 0x43eb291f56688c63c93e8a93c4591fc997cf6349 |
| Contract selector | 0x6ded96e7 |
| Backdoor port | TCP 8080 |
| Toolkit directory | /opt/vadi_ |
| Rootkit module | acpi_thermal_mgr.ko under /usr/src/acpi_thermal_mgr-1.0/ |
| Fake NVML backup | /usr/lib/.libnvidia-ml.so.1.backup |
Elastic also published YARA rules for SANSAR and netns, so security teams can scan their hosts directly.
How to Detect and Stop Cryptomining on Your GPU Cluster
Start with the entry point. Most of the damage traces back to one unauthenticated service.
- Lock down Ray. Never expose the job agent to the internet. Put the cluster behind a private network, a VPN on Linux, or an authenticated gateway, and remember that Ray expects the surrounding environment to enforce security.
- Audit every job-accepting service. Check bind addresses, firewall rules, and security groups for the head node, workers, and agents. A private dashboard means little if another port accepts work.
- Review SSH keys. Look for unknown entries in authorized_keys on every account that Ray touches.
- Check systemd services. Hunt for unfamiliar units, especially anything named netns.
- Inspect kernel module persistence. Review DKMS modules and initramfs contents against a trusted baseline.
- Verify NVIDIA library integrity. Compare libnvidia-ml.so.1 against the official package or image, and compare it from a trusted source rather than from the suspect host.
- Trust external records. Use cloud billing, power metering, and network flow logs that the compromised server cannot rewrite.
- Rebuild, do not just clean. A rootkit that survives reboots means you should reinstall from a trusted image and rotate any credentials the account could reach.
Why Attackers Now Target GPU Monitoring Tools
GPU servers cost a lot to buy and run, and cryptojacking turns that expense into profit for attackers. Every hour of hidden mining steals compute from your real workloads and raises your power bill.
SANSAR also shows a bigger shift. Attackers now go after the monitoring layer itself, not just the machine. When the tools that report the truth can lie, teams must rely on evidence from outside the host.
Frequently Asked Questions
What is SANSAR malware?
SANSAR is a Rust-based orchestrator that controls CPU and GPU cryptocurrency miners on Linux servers. It receives commands over the Tor network and works alongside a kernel rootkit, a modified NVIDIA library, and a separate backdoor.
How does SANSAR hide GPU mining?
It replaces NVIDIA's management library with a wrapper that reports 0% GPU utilization. The wrapper also swaps real temperature and power readings for random values, so tools like nvidia-smi show a calm, idle card.
How did the attackers break in?
They abused an internet-facing Ray job agent that accepted job submissions without authentication. They used it to run commands, open a reverse shell, and plant an SSH key.
Which miners does SANSAR use?
It runs renamed copies of XMRig for CPU mining and SRBMiner-MULTI for GPU mining. The operator supplies the pool and wallet details through the command channel.
What is the netns backdoor?
netns is a separate backdoor that reads a controller IP address from an Ethereum smart contract and then connects over TCP port 8080. It lets the attackers open reverse shells even if SANSAR's Tor channel fails.
Can I trust nvidia-smi on a suspected host?
No. If the NVML library has been replaced, nvidia-smi reports false data. Verify the library against a trusted source and compare it with power, billing, and network records from outside the server.
Who is behind SANSAR?
Nobody has been named. Elastic found Turkish language comments in the rootkit source, but that detail alone does not identify the operators.
Related Guides
- PwnEscape (CVE-2026-99999): Linux Kernel Flaw Lets VMs Escape to the Host
- Can Blockchain Analytics Trace Your Crypto? How Investigators Find Stolen Funds
- How to Set Up a Profitable Bitcoin Mining Rig [Complete Hardware Guide]
- Microsoft Defender for Linux Desktops: Supported Distros, Licensing, Requirements and How to Onboard
- Fake Software Downloads Are Now Installing Cryptojacking Malware on Your PC




