Multi-Stage Intrusion and Ransomware Triage
An adversary has established a beachhead, moved laterally to host-314, exfiltrated data via Node.js to an AI service, and initiated ransomware encryption.
Based on research by Elastic Security Labs 2026-09-20 9 steps · 3 queries T1003 T1021 T1041 T1486
Brief
Why This Hunt
Adversaries use legitimate AI services to process or exfiltrate stolen data before they execute ransomware. This shift complicates traditional detection because connections to AI domains often look like authorized developer activity. This hunt, inspired by the capabilities discussed in the Elastic Security Labs article Elastic Security MCP App (https://www.elastic.co/security-labs/blog/elastic-security-mcp-app), focuses on identifying the specific transition point where data exfiltration turns into operational impact. By monitoring the transition from exfiltration to encryption, we catch the adversary before they complete their objective.
How the Hunt Flows
The hunt begins with a scoping phase on the hb_process_activity surface. The first query identifies hosts running binaries associated with lateral movement and exfiltration, such as Mimikatz, PsExec, or Node.js. It specifically targets host-314 to establish a baseline of activity from the suspected point of origin. This initial step limits the scope of the subsequent queries to relevant systems and reduces noise. Once the hunt identifies relevant hosts, it fans out into two parallel investigations. The first investigation monitors the hb_network_connection surface for connections to known AI domains like Claude and Anthropic. We specifically target the Node.js process because it is a common tool for scripted data handling and tunneling. The second investigation looks for file system bursts on the hb_file_activity surface, specifically processes performing over 100 file updates or renames within a single hour. This threshold filters out routine file operations and highlights the high-speed impact typical of encryption engines. An agent then correlates these signals. It examines the process telemetry and timestamps from both investigations to determine if the same entity is responsible for both the exfiltration and the file burst. This correlation is the core of the hunt; it distinguishes a multi-stage attack from two unrelated events. The agent assesses the temporal proximity of the network connection to the start of the file burst to confirm a coordinated chain of events.
Why This is a Hunt
Individual rules often flag AI domains or high-speed file activity in isolation. However, in environments with heavy automation or developer tools, these alerts produce significant noise. This hunt uses the agent to correlate these signals through process IDs and temporal proximity. By confirming that the same process communicating with an AI service is also the one performing the encryption burst, we significantly reduce false positives. This correlation provides the context needed for a confident response, such as host isolation, which is often too disruptive for automated detection rules.
Blind Spots
This hunt has two primary blind spots. First, while it detects the volume of file activity, the current telemetry lacks file extension capture. This means the hunt identifies that encryption is happening but cannot name the specific ransomware family. This limits the initial response to generic containment. Second, the hunt lacks authentication context. It sees the result of lateral movement on the target host but misses the specific credential theft event that enabled the transition. We recommend reviewing authentication logs separately to identify the source of the compromised credentials.
Steps
-
Scope host and suspicious tool activity
Query · scopingIdentify hosts running tools associated with exfiltration or the primary target host.
reads hb_process_activitysqlSELECT DISTINCT device_hostname, process_name, user_name, time FROM hb_process_activity WHERE (LOWER(device_hostname) = LOWER('{{target_host}}') OR instr(',' || '{{suspicious_binaries}}' || ',', ',' || LOWER(process_name) || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')What a hit looks like. A list of hosts and process names. Silence suggests the named host and suspicious tools have been inactive.
-
Data exfiltration to AI services
Query · detection candidateIdentify processes communicating with AI domains identified in the research.
reads hb_network_connectionsqlSELECT device_hostname, process_name, dst_endpoint_hostname, COUNT(*) AS connections, MIN(time) AS first_seen FROM hb_network_connection WHERE ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND instr(',' || '{{exfil_domains}}' || ',', ',' || LOWER(dst_endpoint_hostname) || ',') > 0 AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY device_hostname, process_name, dst_endpoint_hostnameWhat a hit looks like. Connections from internal processes to AI domains. Silence indicates no direct communication to the named domains occurred.
-
Ransomware encryption burst activity
Query · baselineIdentify processes modifying a high volume of files in a short window.
reads hb_file_activitysqlSELECT device_hostname, process_name, STRFTIME('%Y-%m-%d %H', time) AS hour_window, COUNT(*) AS file_ops, MIN(time) AS first_op FROM hb_file_activity WHERE ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND activity_id IN (3, 5) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY device_hostname, process_name, hour_window HAVING file_ops > 100What a hit looks like. A process performing over 100 updates or renames within one hour. Silence confirms no high-speed file impact occurred.
-
Correlate exfiltration and impact
Agent triageDetermine if the network exfiltration and file impact are driven by the same process entity.
-
Route on agent verdict
DecisionQuarantine the host if a coordinated attack chain is confirmed.
-
Isolate the host
Response actionSever network connectivity to prevent further data loss or encryption.
-
Validate intrusion timeline
Analyst taskVerify the automated triage and determine the scope of encrypted data.
-
Hunt close-out
Analyst taskDocument findings and propose rule improvements.
Coverage
Scenario coverage
| Stage | Covered | How, or why not |
|---|---|---|
| Credential Access and Lateral Movement T1003 · T1021 |
Yes | scoping-lead |
| Exfiltration over C2 T1041 |
Yes | network-exfil-to-ai |
| Ransomware Data Encryption T1486 |
Yes | file-impact-burst |
Blind spots
- Needs hb_file_activity with file extension capture. The hunt detects the activity volume but cannot identify the specific ransomware family without file extensions. It would answer Which specific files were renamed to ransomware extensions?.
- Needs hb_auth_signin. We see the result of lateral movement but miss the credential theft event that enabled it. It would answer Which user credentials were used to move laterally to host-314?.
Parameters & data
Parameters
| Parameter | Type | Default | What it is |
|---|---|---|---|
exfil_domains | list[domain] | claude.ai, anthropic.com | Domains associated with AI tools used for data exfiltration. |
lookback_days | number | 14 | Days of history to examine for intrusion signals. |
scope_hosts | list[host] | — | Paste hostnames from the scoping step here to narrow the parallel hunt. |
suspicious_binaries | list[path] | node, node.exe, mimikatz.exe, psexec.exe | Binaries associated with Node.js exfiltration and lateral movement. |
target_host | host | host-314 | The specific host identified in initial alert triage. |
Telemetry
| Source | Category | Telemetry |
|---|---|---|
| Endpoint telemetry (hb_ surfaces) | endpoint | endpoint |
| Network telemetry | network | network |
Source
---
analysis: While individual rules might flag AI domains or high file activity, this
hunt uses the agent to correlate them by process ID and temporal proximity, significantly
reducing false positives in environments with legitimate automation.
blind_spots:
- id: limited-file-telemetry
question: Which specific files were renamed to ransomware extensions?
requires: hb_file_activity with file extension capture
risk: The hunt detects the activity volume but cannot identify the specific ransomware
family without file extensions.
stage: ransomware-data-encryption
- id: no-auth-context
question: Which user credentials were used to move laterally to host-314?
requires: hb_auth_signin
risk: We see the result of lateral movement but miss the credential theft event
that enabled it.
stage: credential-access-and-lateral-movement
coverage:
- stage: credential-access-and-lateral-movement
status: covered
steps:
- scoping-lead
- stage: exfiltration-over-c2
status: covered
steps:
- network-exfil-to-ai
- stage: ransomware-data-encryption
status: covered
steps:
- file-impact-burst
guardrails:
claims: no_unsupported
evidence: citation_required
missing_data: not_benign
telemetry: untrusted
hunt:
applicability: campaign-specific
handoff: keep-as-periodic-hunt
justification: Adversaries often use AI tools to process or exfiltrate stolen data
before executing ransomware. This hunt identifies that transition point to prevent
operational impact.
methodology: model-assisted
trigger: intel-report
hypothesis: An adversary has established a beachhead, moved laterally to host-314,
exfiltrated data via Node.js to an AI service, and initiated ransomware encryption.
labels:
- hunt
- attack.t1003
- attack.t1021
- attack.t1041
- attack.t1486
name: Multi-Stage Intrusion and Ransomware Triage
parameters:
exfil_domains:
default:
- claude.ai
- anthropic.com
description: Domains associated with AI tools used for data exfiltration.
from:
kind: article
observed: '2026-05-12'
ref: elastic-security-mcp-app
type: list[domain]
lookback_days:
default: '14'
description: Days of history to examine for intrusion signals.
from:
kind: manual
observed: '2026-05-12'
ref: standard-lookback
type: number
scope_hosts:
default: []
description: Paste hostnames from the scoping step here to narrow the parallel
hunt.
from:
kind: manual
observed: '2026-05-12'
ref: scoping-parameter
type: list[host]
suspicious_binaries:
default:
- node
- node.exe
- mimikatz.exe
- psexec.exe
description: Binaries associated with Node.js exfiltration and lateral movement.
from:
kind: article
observed: '2026-05-12'
ref: elastic-security-mcp-app
type: list[path]
target_host:
default: host-314
description: The specific host identified in initial alert triage.
from:
kind: article
observed: '2026-05-12'
ref: elastic-security-mcp-app
type: host
provenance:
authors:
- name: Huntbase hunt generation
org: huntbase.io
generated:
by: huntbase-hunt-generation
from: https://www.elastic.co/security-labs/blog/elastic-security-mcp-app
gates:
- dry-run
- lint
model: hb_google/gemini-3-flash-preview
rationale: Start with host-314. Expand the hunt to any host where the specified lateral
movement or exfiltration tools are running from rare paths or by non-admin users.
references:
- name: "Elastic Security Labs \u2014 Elastic Security MCP App"
url: https://www.elastic.co/security-labs/blog/elastic-security-mcp-app
related:
- hunt: node-js-reverse-shell
reason: The Node.js activity could also indicate a reverse shell rather than exfiltration;
that requires process-to-network correlation on socket state.
relation: out-of-scope-alternative
scenario:
stages:
- name: Credential Access and Lateral Movement
observables:
- credential theft
- lateral movement
- host-314
- process tree
slug: credential-access-and-lateral-movement
tactic: lateral-movement
techniques:
- T1003
- T1021
- name: Exfiltration over C2
observables:
- data exfiltration
- node.js
- claude.ai
- network events
slug: exfiltration-over-c2
tactic: exfiltration
techniques:
- T1041
- name: Ransomware Data Encryption
observables:
- ransomware
- file system activity
- alert triage
slug: ransomware-data-encryption
tactic: impact
techniques:
- T1486
summary: A multi-stage campaign involving credential theft and lateral movement
leading to data exfiltration and a final ransomware impact. The intrusion is monitored
and triaged through an AI-integrated security operations workflow using the Elastic
Security MCP App.
severity: medium
targets:
analyst:
name: Tier-2 analyst
role: analyst
endpoint:
category: endpoint
name: Endpoint telemetry (hb_ surfaces)
telemetry:
- endpoint
hunter:
agent: true
name: Hunt agent
network:
category: network
name: Network telemetry
telemetry:
- network
tlp: clear
type: investigation
---
# Multi-Stage Intrusion and Ransomware Triage
This hunt identifies multi-stage activity starting from a known compromised host. It uses process telemetry to scope the intrusion, then fans out to detect data exfiltration to AI services and high-volume file modifications. An agent correlates these signals to confirm if a coordinated attack chain exists, specifically linking the network activity of Node.js to the file system impact of encryption.
## scoping-lead
<!-- Scope host and suspicious tool activity -->
Identify hosts running tools associated with exfiltration or the primary target host.
```sqlite target=endpoint role=scoping params=(target_host=target_host, suspicious_binaries=suspicious_binaries, lookback_days=lookback_days)
~~~yaml
expected: A list of hosts and process names. Silence suggests the named host and suspicious
tools have been inactive.
reads:
- device_hostname
- process_name
- user_name
- time
silence: not_evidence_of_absence
source: hb_process_activity
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT DISTINCT device_hostname, process_name, user_name, time FROM hb_process_activity WHERE (LOWER(device_hostname) = LOWER('{{target_host}}') OR instr(',' || '{{suspicious_binaries}}' || ',', ',' || LOWER(process_name) || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')
```
## fan-out-evidence
<!-- Fan out for exfiltration and impact -->
parallel:
- → network-exfil-to-ai
- → file-impact-burst
join: → agent-triage
## network-exfil-to-ai
<!-- Data exfiltration to AI services -->
Identify processes communicating with AI domains identified in the research.
```sqlite target=network role=detection-candidate params=(scope_hosts=scope_hosts, exfil_domains=exfil_domains, lookback_days=lookback_days)
~~~yaml
expected: Connections from internal processes to AI domains. Silence indicates no
direct communication to the named domains occurred.
reads:
- device_hostname
- process_name
- dst_endpoint_hostname
- time
silence: evidence_of_absence
source: hb_network_connection
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT device_hostname, process_name, dst_endpoint_hostname, COUNT(*) AS connections, MIN(time) AS first_seen FROM hb_network_connection WHERE ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND instr(',' || '{{exfil_domains}}' || ',', ',' || LOWER(dst_endpoint_hostname) || ',') > 0 AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY device_hostname, process_name, dst_endpoint_hostname
```
## file-impact-burst
<!-- Ransomware encryption burst activity -->
Identify processes modifying a high volume of files in a short window.
```sqlite target=endpoint role=baseline params=(scope_hosts=scope_hosts, lookback_days=lookback_days)
~~~yaml
baseline:
compare: first_seen
window: '{{lookback_days}}d'
expected: A process performing over 100 updates or renames within one hour. Silence
confirms no high-speed file impact occurred.
prevalence:
by: device_hostname
key:
- process_name
rare_below: 3
reads:
- device_hostname
- process_name
- activity_id
- time
silence: evidence_of_absence
source: hb_file_activity
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT device_hostname, process_name, STRFTIME('%Y-%m-%d %H', time) AS hour_window, COUNT(*) AS file_ops, MIN(time) AS first_op FROM hb_file_activity WHERE ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND activity_id IN (3, 5) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY device_hostname, process_name, hour_window HAVING file_ops > 100
```
## agent-triage
<!-- Correlate exfiltration and impact -->
```agent target=hunter
cite: required
context:
- scoping-lead
- network-exfil-to-ai
- file-impact-burst
max_iterations: 3
objective: Decide whether the process activity on the scoped hosts indicates a coordinated
intrusion. Determine if the process performing exfiltration to AI domains is also
the one responsible for the ransomware-like file burst.
success_criteria: A per-host verdict of malicious, suspicious, or benign with cited
evidence.
tools:
- endpoint
- network
```
## verdict-decision
<!-- Route on agent verdict -->
if~: "the agent verdict is malicious for at least one host based on the correlation of exfiltration and ransomware activity" (confidence: high, judge=hunter)
then: → isolate-host
indeterminate: → analyst-validation
unavailable: → analyst-validation (blind_spot: limited-file-telemetry)
else: → analyst-validation
## isolate-host
<!-- Isolate the host -->
```action target=endpoint
~~~yaml
approval: required
~~~
Isolate the host via the management console and invalidate all active user sessions associated with the compromised account.
```
→ analyst-validation
## analyst-validation
<!-- Validate intrusion timeline -->
```manual target=analyst
Review the parent process for the suspicious binaries. Confirm which directory paths were targeted by the file burst and assess the sensitivity of data exfiltrated to the AI service.
```
→ close-out
## close-out
<!-- Hunt close-out -->
```manual target=analyst
Record the exfiltration destination and process names for the permanent blocklist. Evaluate if the file burst threshold needs tuning for different server roles.
```
→ end
Run it
Take this hunt into your environment.
Open it in Huntbase to run every step against your own connections, with Scout weighing the evidence and your analysts in command. Or take the open hunt.md file anywhere that reads the format.
Machine-drafted by huntbase-hunt-generation using hb_google/gemini-3-flash-preview, gated by dry-run, lint, then reviewed by a person.