Elastic REF3364 SANSAR takes over exposed Ray GPU hosts and hides utilization
Elastic Security Labs (Salim Bitam, Nov 12, 2026) tracks REF3364. The Ray dashboard was bound to loopback, but the job agent was reachable from the internet and accepted unauthenticated Jobs API…
What happened
Elastic Security Labs (Salim Bitam, Nov 12, 2026) tracks REF3364. The Ray dashboard was bound to loopback, but the job agent was reachable from the internet and accepted unauthenticated Jobs API submissions. External probes appeared in the Ray logs on October 22, 2026. On October 24 a submitted job ran nvidia-smi and sent the GPU inventory out. On October 25 a Python reverse-shell job connected to an external listener under the account that owned the Ray session. The actor added an SSH key to that account's authorized_keys, obtained root, and staged SANSAR under /opt/vadi_ on three GPU hosts. SANSAR is a Rust orchestrator (v0.1.3) with Tor/Arti command and control and Lyrebird obfs4/WebTunnel. It supervises XMRig, stored as kurt, and SRBMiner-MULTI, stored as tilki (https://github.com/xmrig/xmrig and https://github.com/doktor83/SRBMiner-Multi). A replaced libnvidia-ml.so.1 wraps the real NVML library and reports GPU use as 0 percent, randomizes temperature between 36 and 46 C and power between 100 and 200 W, and filters process lists, so nvidia-smi and other NVML clients lie. An ftrace rootkit, acpi_thermal_mgr.ko, is built with DKMS, loaded through the initramfs, and hides processes, files, and sockets. A systemd backdoor named netns reads its command-and-control address from an Ethereum smart contract and connects on TCP 8080. Elastic publishes YARA rules for SANSAR and netns. Link shadowray-2-0-hijacks-exposed-ray-2025-11.
The target is Ray, a distributed Python framework used for AI training and inference. The attacker is not described as using a model. The NVML wrapper is aimed at the GPU telemetry ML operators watch.
How it happened
Read the flow as text & sources
A catalog reconstruction of the supplied source account. Unknown steps remain explicit; an edge describes the reported relationship between steps.
- 01 · Unauthenticated Ray job
October 22 probes, then an October 24 job that runs nvidia-smi and sends the GPU inventory out.
Hunt: Untrusted content or a changed tool definition precedes a file read, command, or remote call outside the user's intended task.
Process logs cannot recover model intent. Remote connectors and in-process interpreters may produce no local child process. Prompt content alone is not a reliable signature.
Source for step 1 - 02 · Python reverse shell
On October 25 a Python reverse-shell job connects out as the Ray session account.
Hunt: A Linux process executes from a memfd or /proc file-descriptor path, or stages an executable in a transient directory, consistent with fileless payload or miner execution.
Updaters, runtimes, and security tools can legitimately execute anonymous files. Process collectors differ in how they represent memfd paths, so absence of a match is not proof of absence.
Source for step 2 - 03 · SSH key and root
An SSH key is added to authorized_keys. The actor then stages SANSAR under /opt/vadi_.
Hunt: A shell or file utility modifies an SSH authorized_keys file and is followed by an SSH session or outbound tunnel that is not part of approved administration.
Administrators and configuration-management tools legitimately rotate SSH keys. Process-only telemetry can miss direct file writes, and a matching command does not prove that the write succeeded.
Source for step 3 - 04 · NVML wrapper and DKMS rootkit
libnvidia-ml.so.1 reports 0 percent GPU use. acpi_thermal_mgr.ko is loaded through DKMS and the initramfs.
Source for step 4
Why it matters
Reported entry point: Unauthenticated Ray Jobs API on an internet-reachable job agent. Reported impact: An SSH key is added to authorized_keys. The actor then stages SANSAR under /opt/vadi_; reported targets include Three GPU hosts running Ray. Elastic did not name the organizations; applicability to your setup has not been assessed, so verify affected versions, permissions, and configuration in the original report.
What you can do
Protection & prevention
Do not expose the Ray job agent. Require authentication on the Jobs API. Alert on a Python reverse shell from the Ray account, a new authorized_keys entry, an out-of-tree kernel module, and a miner command line even when the binary is named kurt or tilki. Compare nvidia-smi with a second GPU telemetry source so a wrapped libnvidia-ml.so.1 cannot be the only reading.
Catalog defensive guidance based on the reported behavior. Confirm scope and current mitigations in the original source.
Detection queries
Draft query starters grouped by the attack stages where they apply.
Start with the logs you collect. Each hunt identifies its required visibility, field mapping and limits. Queries are catalog-authored drafts using reusable behavior profiles; test with known activity and your normal baseline before alerting.
01Unauthenticated Ray jobUnexpected agent tool useCustom schema · Draft
October 22 probes, then an October 24 job that runs nvidia-smi and sends the GPU inventory out.
What to look for
Untrusted content or a changed tool definition precedes a file read, command, or remote call outside the user's intended task.
Visibility: Defender-side logs where collected
Required logs
- Agent tool-call audit records with session / tool / destination
- Tool-definition and approval changes
- Endpoint process, file-access and network evidence where available
Coverage limit. Process logs cannot recover model intent. Remote connectors and in-process interpreters may produce no local child process. Prompt content alone is not a reliable signature.
Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.
Sigma
title: Hunt - Unexpected agent tool use
id: c709e384-0e11-479e-ab4d-3a06e2431e4b
status: experimental
description: Untrusted content or a changed tool definition precedes a file
read, command, or remote call outside the user's intended task.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
- Authorized activity matching this broad hunt; baseline and investigate
before alerting.
level: low
logsource:
category: application
product: openattacks_audit
definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
Target and CorrelationId from the required source logs first.
detection:
selection:
EventType:
- agent.tool.call
- agent.tool.definition.change
condition: selection
KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("agent.tool.call", "agent.tool.definition.change")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated descSPL
sourcetype="openattacks:audit"
EventType IN ("agent.tool.call", "agent.tool.definition.change")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _timeInvestigation steps
- Join input provenance, tool descriptions and calls by session ID and compare the action to the approved task.
- Inspect child processes and destinations; record whether execution was in-process, local, or through a remote SaaS connector.
02Python reverse shellLinux fileless or anonymous-file executionNative logs · Draft
On October 25 a Python reverse-shell job connects out as the Ray session account.
What to look for
A Linux process executes from a memfd or /proc file-descriptor path, or stages an executable in a transient directory, consistent with fileless payload or miner execution.
Visibility: Linux process and audit telemetry where collected
Required logs
- Linux process creation with executable paths and command lines
- Audit or EDR telemetry for memfd_create and execve where available
- Network and persistence activity from the resulting process
Coverage limit. Updaters, runtimes, and security tools can legitimately execute anonymous files. Process collectors differ in how they represent memfd paths, so absence of a match is not proof of absence.
Linux process candidates whose image or command line exposes a memfd or procfs descriptor. Tune known runtimes and require supporting behavior before alerting.
MCP reference matches: Potential Fileless Execution via Unusual memfd Create Call (Elastic detection-rules). The query below is a catalog adaptation, not a verbatim upstream rule.
Sigma
title: Hunt - Linux Anonymous File Execution
id: afc1e20b-3eae-46fd-b736-e14b639f3a66
status: experimental
description: Detects process paths or command lines associated with memfd and procfs file-descriptor execution.
author: MagicSword OpenAttacks catalog
date: 2026-11-06
references:
- https://github.com/elastic/detection-rules/blob/main/rules/linux/defense_evasion_fileless_execution_via_unusual_memfd_create.toml
falsepositives:
- Legitimate runtimes, updaters, and security software using anonymous files
level: medium
logsource:
category: process_creation
product: linux
detection:
selection_image:
Image|contains:
- /memfd:
- /proc/self/fd/
- /proc/thread-self/fd/
selection_command:
CommandLine|contains:
- memfd:
- /proc/self/fd/
- /proc/thread-self/fd/
condition: 1 of selection_*
KQL
DeviceProcessEvents
| where Timestamp > ago(7d)
| where OSPlatform =~ "Linux"
| where FolderPath has_any ("/memfd:", "/proc/self/fd/", "/proc/thread-self/fd/")
or ProcessCommandLine has_any ("memfd:", "/proc/self/fd/", "/proc/thread-self/fd/")
| project Timestamp, DeviceName, AccountName, FolderPath, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine, SHA1
| order by Timestamp descSPL
| tstats count min(_time) as firstTime max(_time) as lastTime
from datamodel=Endpoint.Processes
where Processes.process IN ("*memfd:*", "*/proc/self/fd/*", "*/proc/thread-self/fd/*")
by Processes.dest Processes.user Processes.process_name Processes.process
Processes.parent_process_name Processes.parent_process
| `drop_dm_object_name(Processes)`
| sort - lastTimeInvestigation steps
- Capture the process memory or recovered executable, parent tree, user, container, and destination.
- Correlate the execution with downloads, persistence changes, mining traffic, or reverse shells.
03SSH key and rootLinux SSH authorized-key persistenceNative logs · Draft
An SSH key is added to authorized_keys. The actor then stages SANSAR under /opt/vadi_.
What to look for
A shell or file utility modifies an SSH authorized_keys file and is followed by an SSH session or outbound tunnel that is not part of approved administration.
Visibility: Linux endpoint and SSH logs where collected
Required logs
- Linux process creation with complete command lines
- File modification telemetry for user and root SSH directories
- SSH authentication and network connection logs
Coverage limit. Administrators and configuration-management tools legitimately rotate SSH keys. Process-only telemetry can miss direct file writes, and a matching command does not prove that the write succeeded.
Linux process candidates that reference authorized_keys. The queries require process command lines; correlate with file and SSH telemetry before alerting.
MCP reference matches: Linux SSH Authorized Keys Modification (Splunk Security Content). The query below is a catalog adaptation, not a verbatim upstream rule.
Sigma
title: Hunt - Linux SSH Authorized Key Modification
id: ba847b8a-0dd7-4062-a6ba-bc923654f22a
status: experimental
description: Detects shell and file utilities referencing SSH authorized_keys files.
author: MagicSword OpenAttacks catalog
date: 2026-11-06
references:
- https://github.com/splunk/security_content/blob/develop/detections/endpoint/linux_ssh_authorized_keys_modification.yml
falsepositives:
- Approved SSH key rotation and configuration management
level: medium
logsource:
category: process_creation
product: linux
detection:
selection_image:
Image|endswith:
- /bash
- /sh
- /zsh
- /cat
- /tee
- /sed
- /cp
selection_target:
CommandLine|contains: authorized_keys
condition: all of selection_*
KQL
DeviceProcessEvents
| where Timestamp > ago(7d)
| where OSPlatform =~ "Linux"
| where ProcessCommandLine contains "authorized_keys"
| where FileName in~ ("bash", "sh", "zsh", "cat", "tee", "sed", "cp")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine, SHA1
| order by Timestamp descSPL
| tstats count min(_time) as firstTime max(_time) as lastTime
from datamodel=Endpoint.Processes
where Processes.process="*authorized_keys*"
by Processes.dest Processes.user Processes.process_name Processes.process
Processes.parent_process_name Processes.parent_process
| `drop_dm_object_name(Processes)`
| sort - lastTimeInvestigation steps
- Recover the added key and identify the process, user, package, or script that changed the file.
- Correlate the change with new SSH sessions, reverse tunnels, and other persistence artifacts.
Technical detailsTooling, impact & MITRE ATLAS
Attack context
- AI's role
- Agent / MCP as target
- Initial access
- Unauthenticated Ray Jobs API on an internet-reachable job agent
Tooling as reported
AI products, models and artifacts
- Ray (https://github.com/ray-project/ray)
Other tooling
- SANSAR orchestrator
- XMRig, filename kurt (https://github.com/xmrig/xmrig)
- SRBMiner-MULTI, filename tilki (https://github.com/doktor83/SRBMiner-Multi)
- Lyrebird obfs4/WebTunnel
- NVML wrapper libnvidia-ml.so.1
Targets and reported impact
- Targets / sectors
- Three GPU hosts running Ray. Elastic did not name the organizations.
- Reported scale / exposure
- Three GPU hosts. Activity from October 22 through October 25, 2026, from probe to persistent access.
Elastic did not name the countries of the GPU hosts.
Reported attribution
REF3364. Elastic does not attribute the activity to a named group or country.
Structured attribution
- Actor
- REF3364
- Country
- Unknown
- Motivation
- financially-motivated
- Attributed by
- Elastic Security Labs
- Attribution confidence
- medium
Detection rules
- Python Reverse Shell Execution Via PTY And Socket ModulesSIGMAView rule
Linux process creation. python -c with import, pty, socket, spawn, and connect. Matches that common reverse-shell form. A job that is a script file without those strings on one command line will not match.
- Linux SSH Authorized Keys ModificationSPLUNKView rule
Linux endpoint. Modification of authorized_keys, which is how the actor kept access after the reverse shell.
- Linux Install Kernel Module Using Modprobe UtilitySPLUNKView rule
Linux endpoint. modprobe loading a kernel module. DKMS loads acpi_thermal_mgr.ko this way.
- Tainted Out-Of-Tree Kernel Module LoadELASTICView rule
Linux endpoint. An out-of-tree module that taints the kernel. Fits the DKMS-built acpi_thermal_mgr.ko rootkit.
- Linux Crypto Mining IndicatorsSIGMAView rule
Linux process creation. Stratum URLs, --donate-level=0, and related miner flags. The binaries are renamed kurt and tilki, so a process-name rule for xmrig does not match. These command-line flags still can.
- NVML wrapper and netns contractGUIDANCE
No cited rule looks for a replaced libnvidia-ml.so.1, the path /opt/vadi_, or a systemd unit that reads an Ethereum contract. LD_PRELOAD rules do not match this library replacement.
Activity timeline
- First seen
- 2026-10-22
- Last updated
- 2026-11-12
Updates
- 2026-10-22 — Elastic Security Labs
External probes appear in the Ray job logs.
- 2026-10-24 — Elastic Security Labs
A submitted job runs nvidia-smi and sends the GPU inventory to an external server.
- 2026-10-25 — Elastic Security Labs
A Python reverse-shell job connects out. The actor adds an SSH key, gains root, and stages SANSAR under /opt/vadi_.
- 2026-11-12 — Elastic Security Labs
Elastic publishes REF3364, the seven file hashes, the NVML wrapper, and the DKMS rootkit.
Source defensive notes
Do not expose the Ray job agent. Require authentication on the Jobs API. Alert on a Python reverse shell from the Ray account, a new authorized_keys entry, an out-of-tree kernel module, and a miner command line even when the binary is named kurt or tilki. Compare nvidia-smi with a second GPU telemetry source so a wrapped libnvidia-ml.so.1 cannot be the only reading.
MITRE ATLAS
AI-specific catalog annotations based on the reported behavior; these are not MITRE case-study assignments.
The internet-reachable Ray Jobs API accepted unauthenticated job submissions. Source
Submitted jobs ran nvidia-smi and a Python reverse shell. Source
The October 25 job was a Python reverse shell to an external listener. Source
SANSAR mined on the stolen GPU capacity while reporting 0 percent utilization. Source
Indicators of compromise
domains
ips
hashes
00c9ac44291f83c72d54302e99d155a3e26d02225a3e516764d5833a99657c9e96fc528ca5e7d1c2b3add5e31b8797cb126f704976c8fbeaecdbf0aa4309ad46acc706afc9322a3eae1ef49049749e0a7c9f1a123895ac56dc8a289beb2fb5b7cc1ad7f14777a098ccc91fd4e8f6143da14418c2b6fdf23b7f8f6b3d1b0b7f1d675c24728f87f7aa0fa07527027c95c24c246049c65eaef89270ab04ea50a1806ba1aa275e0e2826e8b48b36473539ca56cbdc41f429e539a45f8532b084d7a4df8ab6fd699e6ae90e63e9696bae8f01342708bafc2ed88af414337e4f237194
urls
Sources & research credit
1 sourceResearch by Salim Bitam · Elastic Security Labs
Dates, paths, component names, and the seven SHA-256 hashes are from the Elastic Security Labs article. The miners are renamed, so a rule that requires the process name xmrig or srbminer will miss kurt and tilki. The NVML change is a replaced libnvidia-ml.so.1, not an LD_PRELOAD or ld.so.preload edit, so those rules are not cited.
Record & downloads
- Source record name
- Elastic REF3364 SANSAR takes over exposed Ray GPU hosts and hides utilization
- Entry ID
- elastic-sansar-ray-gpu-2026-11
- Catalog review
- November 15, 2026
- Category
- attacks-on-ai
- AI involvement confidence
- confirmed