SANSAR
- Type
- Backdoor
- Capabilities
- Post exploitationReconnaissanceDefense evasionDDOS
- Platforms
- Linux
SANSAR is a Rust-based Linux backdoor and cryptocurrency-mining orchestrator associated with REF3364, a financially motivated activity cluster tracked by Elastic Security Labs. It targets computing resources on Linux GPU servers and supervises XMRig for CPU mining and SRBMiner-MULTI for GPU mining. Observed intrusions began through an internet-exposed Ray job agent that accepted unauthenticated job submissions, allowing attackers to execute reconnaissance commands and deploy a reverse shell before installing the toolkit.
SANSAR communicates with its controller over Tor using the Rust-based Arti client and authenticates using HMAC-SHA256. It collects host and GPU information, starts and stops miners, updates mining configurations, opens interactive shells, forwards command output, manages Tor connectivity, and generates TCP SYN traffic. It detects debugging by checking process tracing status and suppresses saved command history during shell setup.
The associated toolkit conceals mining through a modified NVIDIA Management Library wrapper that filters mining processes from monitoring results, reports zero GPU utilization, and fabricates temperature and power readings. SANSAR can rebuild and reinstall this wrapper. A companion kernel rootkit uses Linux ftrace to conceal files, processes, and socket entries, with persistence established through Dynamic Kernel Module Support and an initramfs loader. The operation also deploys a separate backdoor, netns, which retrieves its controller address from an Ethereum smart contract. This blockchain-based discovery mechanism belongs to netns rather than SANSAR's own Tor command channel.
Associated threat actors
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Central to the intrusion is a toolkit called SANSAR , a Rust-based orchestrator that receives commands over the TOR anonymity network to manage CPU and GPU miners.
Techniques & procedures
9 distinct techniques documented for this family, organized by ATT&CK tactic.
Execution
1 technique
Execution
exécute des commandes SHELL <host> <port> en lançant Bash sans authentification applicative
Stealth
3 techniques
Stealth
Domaine C2 encodé : 62 octets décodés par rotation droite + XOR avec masque 32 octets
62 octets décodés par rotation droite + XOR avec masque 32 octets
Anti-debugging : lecture de /proc/self/status (TracerPid) et mesure de timing sur 1000 itérations
Discovery
3 techniques
Discovery
IP publique via 4 services externes
Inventaire hôte : GPU via nvidia-smi, IP publique via 4 services externes, CPU via /proc/cpuinfo
Anti-debugging : lecture de /proc/self/status (TracerPid) et mesure de timing sur 1000 itérations
Command and Control
1 technique
Command and Control
Tor via Arti (implémentation Rust du Tor Project), modes direct et bridge (WebTunnel/obfs4)
Impact
2 techniques
Impact
kurt XMRig 6.25.0, mineur CPU ; tilki SRBMiner-MULTI 3.6.9, mineur GPU
Protocole binaire sur Tor avec 16 types de messages (shells interactifs, gestion mineurs, trafic SYN, mise à jour bridges)
Observables
8 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
14 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.