SPECIAL EDITION

Special Edition: Local AI Agent Discovery & Risk Hunting

Fleet discovery, behavioral risk hunting, validation, and governance for local coding agents, MCP tooling, and inference runtimes.
Edition
Special Edition
Threat
Local AI agents, MCP, and inference runtimes
Severity
POLICY-DEPENDENT
Type
Discovery / Governance
Scope
Windows + Linux + macOS (partial) · Falcon / LogScale
Queries
49 · 20 core / 29 extended
Version
v0.6 · 2026-08-28
Author
slapopotamus
01

Executive Overview

Local AI agents increasingly run as ordinary endpoint processes, CLI wrappers, IDE helpers, containers, MCP clients, MCP servers, and local inference APIs. Presence alone is not malicious; the defensive goal is to establish ownership and approval, then identify behavior that crosses policy boundaries.

Defender priority: escalate agent-spawned secret discovery, persistence, tunneling, privileged execution, archives, and model APIs bound beyond loopback.
02

AI Agent Inventory Model

No atomic malicious IOCs are claimed. Product names, executable names, ports, and configuration filenames are behavioral discovery pivots, not block indicators.

Affected Surface and Telemetry

SurfaceFalcon telemetryCoverage
Windows and Linux process executionProcessRollup2, SyntheticProcessRollup2Good
IPv4 listeners and connectionsNetworkListenIP4, NetworkConnectIP4, NetworkReceiveAcceptIP4Good
Executable introductionNewExecutableWritten, PeFileWritten, ELFFileWrittenPartial
Registry persistenceAsepValueUpdate, RegGenericValueUpdateWindows only
File content and prompt/tool auditProduct-specific logs and DLPGap / tenant-dependent
03

Risk Scenarios and ATT&CK

FamilyHypothesisUrgency
InventoryKnown agents, wrappers, runtimes, containers, or rare hashes appear on endpoints.Review
Tool executionAn agent launches shells, downloaders, remote tools, archives, or broad enumeration.Medium–High
MCPShort-lived Node/Python subprocesses reveal configured tool servers.Review
ExposureLocal inference APIs listen beyond loopback or accept remote connections.High
PersistenceAn agent establishes tasks, services, or auto-start registry entries.High
Sensitive accessAgent-driven commands enumerate secrets, credentials, environment tokens, or broad repositories.High

ATT&CK Mapping

T1059 Command and Scripting Interpreter; T1105 Ingress Tool Transfer; T1552.001 Credentials in Files; T1560.001 Archive via Utility; T1074.001 Local Data Staging; T1053.005 Scheduled Task; T1053.003 Cron; T1543.001/.004 Launch Agent and Daemon; T1543.003 Windows Service; T1572 Protocol Tunneling; T1610 Deploy Container; T1078.002 Domain Accounts; T1083 File and Directory Discovery. Inventory-only observations use T1518.001 Security Software Discovery as the closest administrative discovery mapping and should not be interpreted as adversary attribution.

Discovery-term transparency: Codex, Claude, MCP, Ollama, and LM Studio are anchored to primary product documentation in this pack. Additional product and model names are heuristic discovery terms, not malicious indicators. Confirm ownership, path, signer, hash, and business context before escalation.

04

Core CQL Hunts

Start here: these hunts prioritize fleet inventory, high-risk tool execution, persistence, exposed model services, sensitive behavior, and wrapper lineage.

Falcon time picker: Open in Falcon starts at 7 days. Set the Falcon time picker to each card's stated lookback before interpreting an empty or partial result.

Query Review Matrix

QueryPurposeModeStatusCONF / FP / COSTLookbackResult focus
Q1Known AI agent and coding-assistant executablesInventoryReviewedMEDIUM / MEDIUM / LOW30dSystem / user / EXE / full path / latest command
Q2Local model runtimes and inference serversInventoryReviewedMEDIUM / MEDIUM / LOW30dSystem / user / runtime EXE / full path / latest command
Q3MCP server launch through npxInventoryReviewedHIGH / MEDIUM / MEDIUM30dSystem / user / executable or artifact
Q4MCP server launch through uvx or PythonInventoryReviewedHIGH / MEDIUM / MEDIUM30dSystem / user / executable or artifact
Q5Codex or Claude MCP operations and server modeInventoryReviewedHIGH / LOW / LOW30dSystem / user / executable or artifact
Q6AI agent spawning command shellsBehavior huntReviewedHIGH / MEDIUM / MEDIUM14dSystem / user / process / command line
Q7AI agent spawning tunneling softwareBehavior huntReviewedHIGH / LOW / MEDIUM14dSystem / user / process / command line
Q8Agent command lines targeting credential and secret pathsBehavior huntReviewedHIGH / MEDIUM / MEDIUM14dSystem / user / process / command line
Q9AI agent creating Windows scheduled tasksPersistence huntReviewedHIGH / LOW / MEDIUM30dSystem / user / persistence artifact
Q10AI agent creating persistent servicesPersistence huntReviewedHIGH / MEDIUM / MEDIUM30dSystem / user / persistence artifact
Q11Persistence registry values referencing agent runtimesPersistence huntReviewedHIGH / LOW / LOW30dSystem / user / persistence artifact
Q12Ollama or LM Studio listener exposed beyond loopbackExposure huntTenant validationHIGH / LOW / MEDIUM7dSystem / process / address / port
Q13Agent or model runtime receiving non-loopback connectionsExposure huntTenant validationMEDIUM / MEDIUM / HIGH7dSystem / process / address / port
Q14IDE-managed local MCP server subprocessesInventoryReviewedHIGH / MEDIUM / MEDIUM30dSystem / user / executable or artifact
Q15MCP configuration command-line referencesInventoryReviewedHIGH / LOW / LOW30dSystem / user / executable or artifact
Q16WSL launching agents or model runtimesInventoryReviewedHIGH / MEDIUM / MEDIUM30dSystem / user / executable or artifact
Q17Agent-driven host or network discoveryBehavior huntReviewedHIGH / MEDIUM / MEDIUM14dSystem / user / process / command line
Q18Agent-spawned encoded or hidden PowerShellBehavior huntReviewedHIGH / LOW / MEDIUM14dSystem / user / process / command line
Q19Agent-spawned destructive file or repository commandsBehavior huntReviewedHIGH / MEDIUM / MEDIUM14dSystem / user / process / command line
Q20Risky child tools through agent wrapper processesBehavior huntTenant validationMEDIUM / MEDIUM / HIGH14dSystem / user / process / command line
Pick your tenant's cloud first — every "Open in Falcon" button below uses this selection.
Q1 · Known AI agent and coding-assistant executables
InventoryReviewedCONF MEDIUMFP MEDIUMCOST LOW
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / EXE / full path / latest command

Expected result: Returns one readable row per system, user, executable name, and full path, with first/last seen, execution count, and latest command line.

Review caveat: Several names are heuristic and can collide with unrelated software. Treat this as an ownership inventory, not an alert.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude approved software-distribution paths and managed developer workstations.

Next pivot: Start with unowned systems, unexpected users, unusual paths, unsigned hashes, and executions outside developer host groups.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Known AI agent and coding-assistant executables
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — administrative inventory
// CONF: medium
// FP: medium
// COST: low
// TIMEFRAME: 30d — inventory and first-seen review
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude approved software-distribution paths and managed developer workstations.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|gemini|copilot|windsurf|zed|amp)(\.exe)?$/i
| groupBy([ComputerName, UserName, FileName, ImageFileName], function=[count(as=Executions), min(@timestamp, as=FirstSeen), max(@timestamp, as=LastSeen), selectFromMax(field=@timestamp, include=[CommandLine])], limit=10000)
| sort(LastSeen, order=desc, limit=1000)
| table([LastSeen, FirstSeen, ComputerName, UserName, FileName, ImageFileName, Executions, CommandLine])
Q2 · Local model runtimes and inference servers
InventoryReviewedCONF MEDIUMFP MEDIUMCOST LOW
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / runtime EXE / full path / latest command

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude sanctioned AI lab endpoints and approved inference servers.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Local model runtimes and inference servers
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — administrative inventory
// CONF: medium
// FP: medium
// COST: low
// TIMEFRAME: 30d — inventory persistent and intermittent runtimes
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude sanctioned AI lab endpoints and approved inference servers.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(ollama|lms|lm[ _-]?studio|llmster|llama-server|llama-cli|vllm|local-ai|localai|jan|gpt4all|anythingllm|msty|koboldcpp)(\.exe)?$/i
| groupBy([ComputerName, UserName, FileName, ImageFileName], function=[count(as=Executions), min(@timestamp, as=FirstSeen), max(@timestamp, as=LastSeen), selectFromMax(field=@timestamp, include=[CommandLine])], limit=10000)
| sort(LastSeen, order=desc, limit=1000)
| table([LastSeen, FirstSeen, ComputerName, UserName, FileName, ImageFileName, Executions, CommandLine])
Q3 · MCP server launch through npx
InventoryReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Allowlist approved MCP package names and expected parent clients.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: MCP server launch through npx
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: T1059.007
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 30d — MCP servers can be short-lived
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Allowlist approved MCP package names and expected parent clients.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(npx|npm|node)(\.exe)?$/i
| CommandLine = /(@modelcontextprotocol\/|mcp-server-|modelcontextprotocol\/inspector|\bmcp\b.*\bserver\b)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, SHA256HashData, aid])
| sort(@timestamp, order=desc, limit=1000)
Q4 · MCP server launch through uvx or Python
InventoryReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Allowlist approved server modules, virtual environments, and parent AI clients.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: MCP server launch through uvx or Python
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: T1059.006
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 30d — Python MCP servers are often ephemeral
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Allowlist approved server modules, virtual environments, and parent AI clients.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(uvx|uv|python|python3)(\.exe)?$/i
| CommandLine = /(mcp[-_ ]server|fastmcp|modelcontextprotocol|\bmcp\s+run\b)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q5 · Codex or Claude MCP operations and server mode
InventoryReviewedCONF HIGHFP LOWCOST LOW
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: The result may be server execution or configuration activity such as add, list, or get; the card deliberately does not equate all matches with a running server.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: No default exclusion; confirm the owning user and approved integration.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Codex or Claude MCP operations and server mode
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: T1059
// CONF: high
// FP: low
// COST: low
// TIMEFRAME: 30d — explicit server modes are strong inventory signals
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: No default exclusion; confirm the owning user and approved integration.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(codex|claude)(\.exe)?$/i
| CommandLine = /(mcp-server|\bmcp\s+(add|serve|list|get)\b|--mcp-config)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, ImageFileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q6 · AI agent spawning command shells
Behavior huntReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
14d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: A matching command is not proof of malicious intent. Most cards rely on direct-parent lineage and can miss Node, Python, shell, IDE, or WSL wrapper generations.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude documented IDE terminal workflows and signed enterprise automation after parent validation.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: AI agent spawning command shells
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1059.001,T1059.003,T1059.004
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 14d — direct tool execution is higher-signal
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude documented IDE terminal workflows and signed enterprise automation after parent validation.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter|ollama|lm[ _-]?studio)(\.exe)?$/i
| FileName = /^(cmd|powershell|pwsh|bash|sh|zsh|wsl)(\.exe)?$/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, ImageFileName, CommandLine, SHA256HashData, aid])
| sort(@timestamp, order=desc, limit=1000)
Q7 · AI agent spawning tunneling software
Behavior huntReviewedCONF HIGHFP LOWCOST MEDIUM
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
14d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: The revised SSH pattern accepts both spaced and attached -R/-L tunnel arguments, but alternate tools and wrapper generations still require lineage review.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Allowlist sanctioned remote-development gateways and documented support sessions.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: AI agent spawning tunneling software
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1572
// CONF: high
// FP: low
// COST: medium
// TIMEFRAME: 14d — tunnels may expose local services externally
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Allowlist sanctioned remote-development gateways and documented support sessions.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter|ollama|lm[ _-]?studio)(\.exe)?$/i
| FileName = /^(ngrok|cloudflared|frpc|chisel|tailscale|ssh)(\.exe)?$/i
| CommandLine = /(tunnel|--url|--remote|\s-[RL]\s*\S|serve|funnel)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q8 · Agent command lines targeting credential and secret paths
Behavior huntReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
14d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: A matching command is not proof of malicious intent. Most cards rely on direct-parent lineage and can miss Node, Python, shell, IDE, or WSL wrapper generations.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude authorized secrets-scanning jobs and approved developer security tooling.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Agent command lines targeting credential and secret paths
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1552.001
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 14d — secret discovery warrants rapid review
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude authorized secrets-scanning jobs and approved developer security tooling.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter)(\.exe)?$/i
| CommandLine = /(\.ssh[\\\/]|\.aws[\\\/]|\.azure[\\\/]|\.kube[\\\/]|\.env\b|credentials|id_rsa|known_hosts|keychain|login\.json|config\.toml)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q9 · AI agent creating Windows scheduled tasks
Persistence huntReviewedCONF HIGHFP LOWCOST MEDIUM
Mode
Persistence hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
30d
Result focus
System / user / persistence artifact

Expected result: Surfaces an agent-linked scheduled task, service action, or startup registry artifact.

Review caveat: Process queries see direct-parent lineage only; approved installers and automation can create the same artifacts.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude approved endpoint-management task names after verifying the parent chain.

Next pivot: Confirm the complete process tree, artifact owner, executable path, signer, creation time, and change ticket.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: AI agent creating Windows scheduled tasks
// MODE: Persistence hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1053.005
// CONF: high
// FP: low
// COST: medium
// TIMEFRAME: 30d — persistence is uncommon for normal assistants
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude approved endpoint-management task names after verifying the parent chain.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter)(\.exe)?$/i
| FileName = /^(schtasks|powershell|pwsh)(\.exe)?$/i
| CommandLine = /(\/create|Register-ScheduledTask|New-ScheduledTask)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q10 · AI agent creating persistent services
Persistence huntReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Persistence hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
30d
Result focus
System / user / persistence artifact

Expected result: Surfaces an agent-linked scheduled task, service action, or startup registry artifact.

Review caveat: Process queries see direct-parent lineage only; approved installers and automation can create the same artifacts.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude approved software installers only after confirming binary path and service owner.

Next pivot: Confirm the complete process tree, artifact owner, executable path, signer, creation time, and change ticket.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: AI agent creating persistent services
// MODE: Persistence hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1543.002,T1543.003,T1053.003,T1543.001,T1543.004
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 30d — service changes can establish privileged persistence
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude approved software installers only after confirming binary path and service owner.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter)(\.exe)?$/i
| FileName = /^(sc|systemctl|crontab|launchctl)(\.exe)?$/i
| CommandLine = /(\bsc(\.exe)?\s+(create|config)\b|\bsystemctl\s+enable\b|\bcrontab\b|\blaunchctl\s+(load|bootstrap)\b)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q11 · Persistence registry values referencing agent runtimes
Persistence huntReviewedCONF HIGHFP LOWCOST LOW
Mode
Persistence hunt
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / persistence artifact

Expected result: Surfaces an agent-linked scheduled task, service action, or startup registry artifact.

Review caveat: Process queries see direct-parent lineage only; approved installers and automation can create the same artifacts.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude approved per-user startup entries after validating signer, path, and owner.

Next pivot: Confirm the complete process tree, artifact owner, executable path, signer, creation time, and change ticket.

Telemetry: AsepValueUpdate / RegGenericValueUpdate

CQL

// HUNT: Persistence registry values referencing agent runtimes
// MODE: Persistence hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: T1547.001
// CONF: high
// FP: low
// COST: low
// TIMEFRAME: 30d — direct persistence artifact
// REQUIRES: AsepValueUpdate / RegGenericValueUpdate
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude approved per-user startup entries after validating signer, path, and owner.
#event_simpleName = /AsepValueUpdate|RegGenericValueUpdate/
| RegObjectName = /(CurrentVersion\\Run|CurrentVersion\\RunOnce|Policies\\Explorer\\Run)/i
| RegStringValue = /(\b(codex|claude|cursor|aider|goose|opencode|cline|roo|ollama|lm[ _-]?studio)\b|python.*agent|node.*mcp)/i
| table([@timestamp, ComputerName, UserName, RegObjectName, RegValueName, RegStringValue, aid])
| sort(@timestamp, order=desc, limit=1000)
Q12 · Ollama or LM Studio listener exposed beyond loopback
Exposure huntTenant validationCONF HIGHFP LOWCOST MEDIUM
Mode
Exposure hunt
Status
Tenant validation
Lineage
PID join; narrow time pivot
Lookback
7d
Result focus
System / process / address / port

Expected result: Surfaces an IPv4 listener or connection associated with a named agent or model runtime.

Review caveat: IPv4 telemetry does not prove authentication state or external reachability; process-ID joins can multiply rows or misattribute reused PIDs across broad windows.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude explicitly approved, authenticated inference servers after network-owner review.

Next pivot: Narrow to the host and timestamp, verify the process tree, bind address, firewall path, authentication, and approved service owner.

Telemetry: NetworkListenIP4 plus process correlation

CQL

// HUNT: Ollama or LM Studio listener exposed beyond loopback
// MODE: Exposure hunt
// REVIEW STATUS: Tenant validation
// LINEAGE: PID join; narrow time pivot
// TENANT VALIDATION: Narrow to a host and time range; confirm field and event coverage before operational use.
// MITRE: N/A — exposure inventory
// CONF: high
// FP: low
// COST: medium
// TIMEFRAME: 7d — exposed APIs can permit unintended access
// REQUIRES: NetworkListenIP4 plus process correlation
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude explicitly approved, authenticated inference servers after network-owner review.
#event_simpleName = NetworkListenIP4
| LocalPort = /^(11434|1234)$/
| LocalAddressIP4 != "127.0.0.1"
| rename(field=ContextProcessId_decimal, as=TargetProcessId_decimal)
| join(query={#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/ | FileName = /^(ollama|lms|lm[ _-]?studio|llmster)(\.exe)?$/i}, field=[aid, TargetProcessId_decimal], include=[FileName, ImageFileName, CommandLine, UserName], mode=inner)
| table([@timestamp, ComputerName, UserName, FileName, ImageFileName, CommandLine, LocalAddressIP4, LocalPort, aid])
| sort(@timestamp, order=desc, limit=1000)
Q13 · Agent or model runtime receiving non-loopback connections
Exposure huntTenant validationCONF MEDIUMFP MEDIUMCOST HIGH
Mode
Exposure hunt
Status
Tenant validation
Lineage
PID join; narrow time pivot
Lookback
7d
Result focus
System / process / address / port

Expected result: Surfaces an IPv4 listener or connection associated with a named agent or model runtime.

Review caveat: IPv4 telemetry does not prove authentication state or external reachability; process-ID joins can multiply rows or misattribute reused PIDs across broad windows.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude approved server VLANs and authenticated inference services; prioritize workstations.

Next pivot: Narrow to the host and timestamp, verify the process tree, bind address, firewall path, authentication, and approved service owner.

Telemetry: NetworkReceiveAcceptIP4 plus process correlation

CQL

// HUNT: Agent or model runtime receiving non-loopback connections
// MODE: Exposure hunt
// REVIEW STATUS: Tenant validation
// LINEAGE: PID join; narrow time pivot
// TENANT VALIDATION: Narrow to a host and time range; confirm field and event coverage before operational use.
// MITRE: N/A — exposure inventory
// CONF: medium
// FP: medium
// COST: high
// TIMEFRAME: 7d — identifies network-reachable local services
// REQUIRES: NetworkReceiveAcceptIP4 plus process correlation
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude approved server VLANs and authenticated inference services; prioritize workstations.
#event_simpleName = NetworkReceiveAcceptIP4
| RemoteAddressIP4 != "127.0.0.1"
| rename(field=ContextProcessId_decimal, as=TargetProcessId_decimal)
| join(query={#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/ | FileName = /^(codex|claude|ollama|lms|lm[ _-]?studio|llmster|vllm|localai)(\.exe)?$/i}, field=[aid, TargetProcessId_decimal], include=[FileName, ImageFileName, CommandLine, UserName], mode=inner)
| table([@timestamp, ComputerName, UserName, FileName, ImageFileName, CommandLine, LocalAddressIP4, LocalPort, RemoteAddressIP4, RemotePort, aid])
| sort(@timestamp, order=desc, limit=1000)
Q14 · IDE-managed local MCP server subprocesses
InventoryReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: approved MCP extensions and workspace tools

Tuning: Allowlist server command, package, workspace, parent editor, and expected user together.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: IDE-managed local MCP server subprocesses
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: T1059
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 30d — MCP subprocesses may run only during a session
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: approved MCP extensions and workspace tools
// TUNING: Allowlist server command, package, workspace, parent editor, and expected user together.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(code|code-insiders|cursor|windsurf|kiro|vscodium)(\.exe)?$/i
| FileName = /^(npx|node|python|python3|uv|uvx|docker|podman|java|dotnet)(\.exe)?$/i
| CommandLine = /(mcp[-_ ]server|modelcontextprotocol|fastmcp|@modelcontextprotocol|\bmcp\b)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, ImageFileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q15 · MCP configuration command-line references
InventoryReviewedCONF HIGHFP LOWCOST LOW
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: authorized MCP onboarding

Tuning: Confirm the server definition, workspace trust, authentication method, and business owner.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: MCP configuration command-line references
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — administrative inventory
// CONF: high
// FP: low
// COST: low
// TIMEFRAME: 30d — configuration establishes local tool access
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: authorized MCP onboarding
// TUNING: Confirm the server definition, workspace trust, authentication method, and business owner.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| CommandLine = /(--add-mcp|\.vscode[\\\/]mcp\.json|\.cursor[\\\/]mcp\.json|\.mcp\.json|--mcp-config|mcp\s+add)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, ImageFileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q16 · WSL launching agents or model runtimes
InventoryReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: approved development inside WSL

Tuning: Baseline approved WSL distributions, users, repositories, and agent commands.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: WSL launching agents or model runtimes
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: T1059.004
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 30d — Windows wrappers may hide Linux-side execution
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: approved development inside WSL
// TUNING: Baseline approved WSL distributions, users, repositories, and agent commands.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^wsl(\.exe)?$/i
| CommandLine = /\b(codex|claude|gemini|qwen|aider|goose|opencode|cline|roo|continue|openhands|ollama|llama-server|vllm|localai|mcp[-_ ]server)\b/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q17 · Agent-driven host or network discovery
Behavior huntReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
14d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: A matching command is not proof of malicious intent. Most cards rely on direct-parent lineage and can miss Node, Python, shell, IDE, or WSL wrapper generations.

Likely false positives: approved diagnostics and security testing

Tuning: Exclude documented diagnostic playbooks and security-team endpoints; prioritize broad or repeated scans.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Agent-driven host or network discovery
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1046,T1082
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 14d — autonomous discovery may cross the intended workspace
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: approved diagnostics and security testing
// TUNING: Exclude documented diagnostic playbooks and security-team endpoints; prioritize broad or repeated scans.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter)(\.exe)?$/i
| FileName = /^(nmap|masscan|systeminfo|nltest|dsquery|ipconfig|ifconfig|netstat|ss)(\.exe)?$/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q18 · Agent-spawned encoded or hidden PowerShell
Behavior huntReviewedCONF HIGHFP LOWCOST MEDIUM
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
14d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: A matching command is not proof of malicious intent. Most cards rely on direct-parent lineage and can miss Node, Python, shell, IDE, or WSL wrapper generations.

Likely false positives: approved automation frameworks that encode PowerShell payloads

Tuning: Decode and validate the payload; exclude only signed, documented automation after review.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Agent-spawned encoded or hidden PowerShell
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1059.001,T1027
// CONF: high
// FP: low
// COST: medium
// TIMEFRAME: 14d — encoding or hidden execution is unusual for transparent agent work
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: approved automation frameworks that encode PowerShell payloads
// TUNING: Decode and validate the payload; exclude only signed, documented automation after review.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter)(\.exe)?$/i
| FileName = /^(powershell|pwsh)(\.exe)?$/i
| CommandLine = /(-enc(odedcommand)?\s+|-windowstyle\s+hidden|-w\s+hidden|frombase64string)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q19 · Agent-spawned destructive file or repository commands
Behavior huntReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
14d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: The revised expression accepts common force/recursive flag orders, but always inspect the exact target path before escalation.

Likely false positives: approved build cleanup, test teardown, and repository maintenance

Tuning: Exclude narrow known cleanup paths; never globally suppress broad recursive deletion or forced resets.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Agent-spawned destructive file or repository commands
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1070.004,T1485
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 14d — autonomous destructive actions require rapid validation
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: approved build cleanup, test teardown, and repository maintenance
// TUNING: Exclude narrow known cleanup paths; never globally suppress broad recursive deletion or forced resets.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter)(\.exe)?$/i
| CommandLine = /(rm\s+(-[a-z]*r[a-z]*f[a-z]*|-[a-z]*f[a-z]*r[a-z]*|--recursive\s+--force|--force\s+--recursive)|Remove-Item.*(-Recurse.*-Force|-Force.*-Recurse)|(del|rmdir)\s+.*(\/s.*\/q|\/q.*\/s)|git\s+reset\s+--hard|git\s+clean\s+-[a-z]*f[a-z]*)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q20 · Risky child tools through agent wrapper processes
Behavior huntTenant validationCONF MEDIUMFP MEDIUMCOST HIGH
Mode
Behavior hunt
Status
Tenant validation
Lineage
One wrapper generation
Lookback
14d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: This closes only one wrapper generation and remains a high-cost analyst hunt. PID reuse is possible over broad windows; do not promote directly to an alert.

Likely false positives: approved IDE terminals, build systems, package managers, and test automation

Tuning: Require the joined wrapper command to identify an agent package; baseline approved users and workspaces.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2 with PID correlation

CQL

// HUNT: Risky child tools through agent wrapper processes
// MODE: Behavior hunt
// REVIEW STATUS: Tenant validation
// LINEAGE: One wrapper generation
// TENANT VALIDATION: Narrow to a host and time range; confirm field and event coverage before operational use.
// MITRE: T1059,T1105,T1572
// CONF: medium
// FP: medium
// COST: high
// TIMEFRAME: 14d — closes the direct-parent blind spot for one wrapper generation
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2 with PID correlation
// FALSE POSITIVES: approved IDE terminals, build systems, package managers, and test automation
// TUNING: Require the joined wrapper command to identify an agent package; baseline approved users and workspaces.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(cmd|powershell|pwsh|bash|sh|curl|wget|ssh|scp|rclone|ngrok|cloudflared|chisel)(\.exe)?$/i
| rename(field=ParentProcessId_decimal, as=TargetProcessId_decimal)
| join(query={#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/ | FileName = /^(node|python|python3|npx|npm|uv|uvx|code|cursor|wsl)(\.exe)?$/i | CommandLine = /\b(codex|claude-code|gemini-cli|qwen-code|aider|goose|opencode|cline|roo|continue|openhands|mcp[-_ ]server)\b/i | rename(field=FileName, as=AgentWrapper) | rename(field=CommandLine, as=AgentWrapperCommand)}, field=[aid, TargetProcessId_decimal], include=[AgentWrapper, AgentWrapperCommand], mode=inner)
| table([@timestamp, ComputerName, UserName, AgentWrapper, AgentWrapperCommand, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
05

Extended CQL Coverage

Extended coverage: run these for deeper inventory, model and package attribution, file activity, containers, WSL, browser automation, and tenant-specific pivots. High-cost hunts should remain analyst-driven until measured.

Query Review Matrix

QueryPurposeModeStatusCONF / FP / COSTLookbackResult focus
Q21AI agent unrestricted or permission-bypass modesBehavior huntReviewedHIGH / MEDIUM / LOW30dSystem / user / process / command line
Q22CLI package names launched through Node.js or npmInventoryReviewedMEDIUM / MEDIUM / MEDIUM30dSystem / user / executable or artifact
Q23Python-based agent frameworks and assistantsInventoryReviewedMEDIUM / HIGH / MEDIUM30dSystem / user / executable or artifact
Q24Containerized local AI or agent workloadsInventoryReviewedMEDIUM / MEDIUM / MEDIUM30dSystem / user / executable or artifact
Q25AI agent spawning download utilitiesBehavior huntReviewedHIGH / MEDIUM / MEDIUM14dSystem / user / process / command line
Q26AI agent spawning remote-access or transfer toolsBehavior huntReviewedHIGH / MEDIUM / MEDIUM14dSystem / user / process / command line
Q27Agent-driven environment and token discoveryBehavior huntReviewedMEDIUM / HIGH / MEDIUM14dSystem / user / process / command line
Q28Agent-driven archive and data stagingBehavior huntReviewedHIGH / MEDIUM / MEDIUM14dSystem / user / process / command line
Q29Repository or broad-root enumeration by an agentBehavior huntReviewedMEDIUM / HIGH / MEDIUM14dSystem / user / process / command line
Q30Distinctive local AI API port inventoryInventoryReviewedHIGH / MEDIUM / LOW7dSystem / process / bind address / port
Q31Outbound destination baseline from known agent processesExposure huntTenant validationMEDIUM / HIGH / HIGH7dSystem / process / address / port
Q32Executable drops associated with AI and MCP toolingInventoryTenant validationMEDIUM / MEDIUM / MEDIUM30dSystem / user / executable or artifact
Q33AI agent package installation activityInventoryReviewedMEDIUM / MEDIUM / MEDIUM30dSystem / user / executable or artifact
Q34AI agent activity under privileged or service identitiesInventoryReviewedHIGH / MEDIUM / MEDIUM30dSystem / user / executable or artifact
Q35Rare AI agent executable hashes across the fleetInventoryTenant validationLOW / HIGH / MEDIUM30dSystem / user / executable or artifact
Q36Expanded AI coding-agent executable inventoryInventoryReviewedMEDIUM / MEDIUM / LOW30dSystem / user / agent EXE / full path / latest command
Q37Expanded JavaScript agent package wrappersInventoryReviewedMEDIUM / MEDIUM / MEDIUM30dSystem / user / executable or artifact
Q38Product-like paths with unexpected executable namesInventoryReviewedMEDIUM / HIGH / HIGH30dSystem / user / executable or artifact
Q39Expanded AI and model container imagesInventoryReviewedHIGH / MEDIUM / MEDIUM30dSystem / user / executable or artifact
Q40CLI-visible model downloads through Hugging Face toolingInventoryReviewedMEDIUM / MEDIUM / MEDIUM30dSystem / user / executable or artifact
Q41Local model files opened from cachesInventoryTenant validationMEDIUM / HIGH / HIGH7dSystem / user / executable or artifact
Q42Model-family names supplied to local runtimesInventoryReviewedMEDIUM / MEDIUM / MEDIUM30dSystem / user / executable or artifact
Q43Agent-spawned browser automation and remote debuggingBehavior huntReviewedHIGH / MEDIUM / MEDIUM14dSystem / user / process / command line
Q44Processes resolving LLM vendor and model-hub domainsInventoryReviewedHIGH / MEDIUM / LOW30dSystem / process / domain
Q45AI agent extension installs into VS Code-family editorsInventoryReviewedHIGH / LOW / LOW30dSystem / user / extension install
Q46AI agents launched by schedulers or service managersBehavior huntReviewedMEDIUM / MEDIUM / LOW30dSystem / user / parent / command line
Q47Hosts consuming remote local-AI API portsExposure huntReviewedMEDIUM / MEDIUM / MEDIUM7dSystem / process / destination / port
Q48Secret material in agent-spawned command linesBehavior huntReviewedHIGH / LOW / MEDIUM14dSystem / user / process / command line
Q49Model-runtime exposure configuration flagsExposure huntReviewedHIGH / LOW / LOW30dSystem / user / process / command line
Q21 · AI agent unrestricted or permission-bypass modes
Behavior huntReviewedCONF HIGHFP MEDIUMCOST LOW
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: Direct matches cover Codex, Claude, Gemini, Qwen, Copilot, Aider, Goose, Amp, and Amazon Q; generic Node/Python wrappers still require an official agent package token before a bypass flag qualifies.

Likely false positives: isolated test sandboxes and explicitly approved automation

Tuning: Exclude only documented isolated hosts with compensating controls and a named owner.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: AI agent unrestricted or permission-bypass modes
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — policy-risk behavior
// CONF: high
// FP: medium
// COST: low
// TIMEFRAME: 30d — identifies reduced human-control safeguards
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: isolated test sandboxes and explicitly approved automation
// TUNING: Exclude only documented isolated hosts with compensating controls and a named owner.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ((FileName = /^(codex|claude|gemini|qwen|copilot|aider|goose|amp|q)(\.exe)?$/i) or ((FileName = /^(node|npx|python|python3|bun|bunx)(\.exe)?$/i) and (CommandLine = /(@openai\/codex|@anthropic-ai\/claude-code|@google\/gemini-cli|@github\/copilot|@qwen-code\/qwen-code|@sourcegraph\/amp)/i)))
| CommandLine = /(--dangerously-skip-permissions|--permission-mode\s+bypassPermissions|--sandbox\s+danger-full-access|--dangerously-bypass-approvals-and-sandbox|--ask-for-approval\s+never|--approval-policy\s+never|approval_policy\s*=\s*never|--approval-mode\s+yolo|--full-auto|--yolo|--auto-approve|--yes-always|--allow-all-tools|--trust-all-tools|--dangerously-allow-all)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, ImageFileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q22 · CLI package names launched through Node.js or npm
InventoryReviewedCONF MEDIUMFP MEDIUMCOST MEDIUM
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude approved package-manager automation and developer build hosts.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: CLI package names launched through Node.js or npm
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: T1059.007
// CONF: medium
// FP: medium
// COST: medium
// TIMEFRAME: 30d — catches wrapper-based installations
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude approved package-manager automation and developer build hosts.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(node|npm|npx)(\.exe)?$/i
| CommandLine = /(@openai\/codex|@anthropic-ai\/claude-code|@modelcontextprotocol|\baider\b|\bopencode\b|\bgoose\b|\bcline\b)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, ImageFileName, CommandLine, SHA256HashData, aid])
| sort(@timestamp, order=desc, limit=1000)
Q23 · Python-based agent frameworks and assistants
InventoryReviewedCONF MEDIUMFP HIGHCOST MEDIUM
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Baseline approved virtual environments, automation accounts, notebooks, and orchestration servers.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Python-based agent frameworks and assistants
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: T1059.006
// CONF: medium
// FP: high
// COST: medium
// TIMEFRAME: 30d — broad discovery for Python agents
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Baseline approved virtual environments, automation accounts, notebooks, and orchestration servers.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(python|python3|pip|pip3|pipx|uv|uvx)(\.exe)?$/i
| CommandLine = /\b(aider|autogen|crewai|langgraph|langchain|smolagents|open-interpreter|openhands|agent-zero|browser-use|mcp[-_ ]server)\b/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, ImageFileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q24 · Containerized local AI or agent workloads
InventoryReviewedCONF MEDIUMFP MEDIUMCOST MEDIUM
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude approved container hosts, image registries, and ML platform namespaces.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Containerized local AI or agent workloads
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: T1610
// CONF: medium
// FP: medium
// COST: medium
// TIMEFRAME: 30d — containers may hide the host process name
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude approved container hosts, image registries, and ML platform namespaces.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(docker|podman|nerdctl)(\.exe)?$/i
| CommandLine = /(ollama\/ollama|lm[ _-]?studio|localai|vllm|text-generation-webui|open-webui|openhands|agent-zero|langchain|crewai)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q25 · AI agent spawning download utilities
Behavior huntReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
14d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: A matching command is not proof of malicious intent. Most cards rely on direct-parent lineage and can miss Node, Python, shell, IDE, or WSL wrapper generations.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude approved dependency retrieval and known internal artifact repositories.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: AI agent spawning download utilities
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1105
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 14d — tool-driven transfer may introduce code or data
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude approved dependency retrieval and known internal artifact repositories.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter)(\.exe)?$/i
| FileName = /^(curl|wget|certutil|bitsadmin|aria2c)(\.exe)?$/i
| CommandLine != /(localhost|127\.0\.0\.1)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q26 · AI agent spawning remote-access or transfer tools
Behavior huntReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
14d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: A matching command is not proof of malicious intent. Most cards rely on direct-parent lineage and can miss Node, Python, shell, IDE, or WSL wrapper generations.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude approved repository operations and managed deployment workflows.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: AI agent spawning remote-access or transfer tools
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1021.004,T1048
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 14d — remote operations can cross trust boundaries
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude approved repository operations and managed deployment workflows.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter)(\.exe)?$/i
| FileName = /^(ssh|scp|sftp|rsync|rclone|pscp|plink)(\.exe)?$/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q27 · Agent-driven environment and token discovery
Behavior huntReviewedCONF MEDIUMFP HIGHCOST MEDIUM
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
14d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: A matching command is not proof of malicious intent. Most cards rely on direct-parent lineage and can miss Node, Python, shell, IDE, or WSL wrapper generations.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude expected build, CI, and developer bootstrap activity; prioritize unusual users and servers.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Agent-driven environment and token discovery
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1082,T1552.001
// CONF: medium
// FP: high
// COST: medium
// TIMEFRAME: 14d — common but useful when correlated
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude expected build, CI, and developer bootstrap activity; prioritize unusual users and servers.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter)(\.exe)?$/i
| CommandLine = /(set\s*$|printenv|env\s*$|Get-ChildItem\s+Env:|ANTHROPIC_API_KEY|OPENAI_API_KEY|AZURE_CLIENT_SECRET|AWS_SECRET_ACCESS_KEY|GITHUB_TOKEN)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q28 · Agent-driven archive and data staging
Behavior huntReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
14d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: A matching command is not proof of malicious intent. Most cards rely on direct-parent lineage and can miss Node, Python, shell, IDE, or WSL wrapper generations.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude approved release packaging and backup activity; prioritize temp, public, and user-profile outputs.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Agent-driven archive and data staging
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1560.001,T1074.001
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 14d — staging can precede upload or model ingestion
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude approved release packaging and backup activity; prioritize temp, public, and user-profile outputs.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter)(\.exe)?$/i
| FileName = /^(7z|7za|rar|tar|zip|makecab|powershell|pwsh)(\.exe)?$/i
| CommandLine = /(Compress-Archive|\.zip\b|\.7z\b|\btar\s|\brar\s|\bmakecab\b)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q29 · Repository or broad-root enumeration by an agent
Behavior huntReviewedCONF MEDIUMFP HIGHCOST MEDIUM
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
14d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: A hit records repository or broad-root enumeration syntax; one event does not establish that enumeration was broad or unauthorized.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Baseline normal repository roots and exclude approved indexing operations.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Repository or broad-root enumeration by an agent
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1083
// CONF: medium
// FP: high
// COST: medium
// TIMEFRAME: 14d — useful for spotting overly broad workspace access
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Baseline normal repository roots and exclude approved indexing operations.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter)(\.exe)?$/i
| CommandLine = /(Get-ChildItem|find\s+|dir\s+\/s|rg\s+--files|git\s+(status|log|ls-files)).*(C:\\|\/home\/|\/srv\/|\/opt\/)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q30 · Distinctive local AI API port inventory
InventoryReviewedCONF HIGHFP MEDIUMCOST LOW
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
7d
Result focus
System / process / bind address / port

Expected result: Returns one row per system, process name, local IPv4 bind address, and local port.

Review caveat: UserName is intentionally omitted because it is not guaranteed on the network-listen event. Pivot to process telemetry for user attribution.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Confirm LocalAddressIP4 binding; allowlist sanctioned inference endpoints and documented ports.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: NetworkListenIP4

CQL

// HUNT: Distinctive local AI API port inventory
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — administrative inventory
// CONF: high
// FP: medium
// COST: low
// TIMEFRAME: 7d — current service exposure snapshot
// REQUIRES: NetworkListenIP4
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Confirm LocalAddressIP4 binding; allowlist sanctioned inference endpoints and documented ports.
#event_simpleName = NetworkListenIP4
| LocalPort = /^(11434|1234|4891|1337|5001)$/
| groupBy([ComputerName, LocalAddressIP4, LocalPort, ContextBaseFileName], function=count(as=Events), limit=5000)
| sort(Events, order=desc, limit=500)
| table([ComputerName, ContextBaseFileName, LocalAddressIP4, LocalPort, Events])
Q31 · Outbound destination baseline from known agent processes
Exposure huntTenant validationCONF MEDIUMFP HIGHCOST HIGH
Mode
Exposure hunt
Status
Tenant validation
Lineage
PID join; narrow time pivot
Lookback
7d
Result focus
System / process / address / port

Expected result: Surfaces an IPv4 listener or connection associated with a named agent or model runtime.

Review caveat: This is a destination-frequency baseline sorted by connection count. It does not establish that a destination is rare without historical comparison.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Compare with a longer historical baseline; allowlist vendor APIs, source-control, registries, proxies, and internal gateways.

Next pivot: Narrow to the host and timestamp, verify the process tree, bind address, firewall path, authentication, and approved service owner.

Telemetry: NetworkConnectIP4 plus process correlation

CQL

// HUNT: Outbound destination baseline from known agent processes
// MODE: Exposure hunt
// REVIEW STATUS: Tenant validation
// LINEAGE: PID join; narrow time pivot
// TENANT VALIDATION: Narrow to a host and time range; confirm field and event coverage before operational use.
// MITRE: N/A — network baseline
// CONF: medium
// FP: high
// COST: high
// TIMEFRAME: 7d — destination-frequency baseline; this query does not establish rarity
// REQUIRES: NetworkConnectIP4 plus process correlation
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Compare with a longer historical baseline; allowlist vendor APIs, source-control, registries, proxies, and internal gateways.
#event_simpleName = NetworkConnectIP4
| RemoteAddressIP4 != "127.0.0.1"
| rename(field=ContextProcessId_decimal, as=TargetProcessId_decimal)
| join(query={#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/ | FileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter|ollama|lm[ _-]?studio)(\.exe)?$/i}, field=[aid, TargetProcessId_decimal], include=[FileName, ImageFileName, CommandLine, UserName], mode=inner)
| groupBy([ComputerName, UserName, FileName, RemoteAddressIP4, RemotePort], function=[count(as=Connections), min(@timestamp, as=FirstSeen), max(@timestamp, as=LastSeen)], limit=10000)
| sort(Connections, order=desc, limit=1000)
Q32 · Executable drops associated with AI and MCP tooling
InventoryTenant validationCONF MEDIUMFP MEDIUMCOST MEDIUM
Mode
Inventory
Status
Tenant validation
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude signed, approved installers and managed software-cache paths after hash review.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: NewExecutableWritten / PeFileWritten / ELFFileWritten

CQL

// HUNT: Executable drops associated with AI and MCP tooling
// MODE: Inventory
// REVIEW STATUS: Tenant validation
// LINEAGE: Direct event / not applicable
// TENANT VALIDATION: Narrow to a host and time range; confirm field and event coverage before operational use.
// MITRE: N/A — software-introduction inventory
// CONF: medium
// FP: medium
// COST: medium
// TIMEFRAME: 30d — finds newly introduced runtime binaries
// REQUIRES: NewExecutableWritten / PeFileWritten / ELFFileWritten
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude signed, approved installers and managed software-cache paths after hash review.
#event_simpleName = /NewExecutableWritten|PeFileWritten|ELFFileWritten/
| TargetFileName = /\b(codex|claude|cursor|aider|goose|opencode|cline|roo|ollama|lm[ _-]?studio|llmster|mcp[-_ ]server)\b/i
| table([@timestamp, ComputerName, UserName, TargetFileName, SHA256HashData, ContextBaseFileName, aid])
| sort(@timestamp, order=desc, limit=1000)
Q33 · AI agent package installation activity
InventoryReviewedCONF MEDIUMFP MEDIUMCOST MEDIUM
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: The command proves package-install activity, not necessarily global or system-wide installation.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Exclude approved software deployment accounts and documented developer onboarding windows.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: AI agent package installation activity
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — administrative inventory
// CONF: medium
// FP: medium
// COST: medium
// TIMEFRAME: 30d — identifies bootstrap and deployment activity
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Exclude approved software deployment accounts and documented developer onboarding windows.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(npm|npx|pip|pip3|pipx|uv|winget|choco)(\.exe)?$/i
| CommandLine = /(install.*(@openai\/codex|@anthropic-ai\/claude-code|\baider\b|crewai|autogen|openhands|agent-zero|ollama|lm[ _-]?studio)|tool\s+install.*(aider|agent|mcp))/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q34 · AI agent activity under privileged or service identities
InventoryReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Allowlist purpose-built automation identities and approved agent hosts; investigate interactive admin use.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: AI agent activity under privileged or service identities
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — policy-risk inventory
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 30d — service and privileged contexts increase impact
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Allowlist purpose-built automation identities and approved agent hosts; investigate interactive admin use.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter|ollama|lm[ _-]?studio)(\.exe)?$/i
| UserName = /^(SYSTEM|root|Administrator|LOCAL SERVICE|NETWORK SERVICE|.*\$$)$/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, ImageFileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q35 · Rare AI agent executable hashes across the fleet
InventoryTenant validationCONF LOWFP HIGHCOST MEDIUM
Mode
Inventory
Status
Tenant validation
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: The 10,000-group state cap can make large-tenant results partial before the low-host filter is evaluated. Scope by host group or product family first.

Likely false positives: sanctioned developer tools, automation, and approved AI services

Tuning: Suppress hashes confirmed as approved releases; retain unknown paths and single-host prevalence.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Rare AI agent executable hashes across the fleet
// MODE: Inventory
// REVIEW STATUS: Tenant validation
// LINEAGE: Direct event / not applicable
// TENANT VALIDATION: Narrow to a host and time range; confirm field and event coverage before operational use.
// MITRE: N/A — administrative inventory
// CONF: low
// FP: high
// COST: medium
// TIMEFRAME: 30d — highlights targeted or portable binaries
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned developer tools, automation, and approved AI services
// TUNING: Suppress hashes confirmed as approved releases; retain unknown paths and single-host prevalence.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter|ollama|lm[ _-]?studio)(\.exe)?$/i
| SHA256HashData = /^[A-Fa-f0-9]{64}$/
| groupBy([SHA256HashData, FileName], function=[count(as=Executions), count(aid, distinct=true, as=Hosts), collect(ImageFileName, limit=20), collect(ComputerName, limit=20), collect(UserName, limit=20)], limit=10000)
| Hosts <= 3
| sort(Hosts, order=asc, limit=1000)
Q36 · Expanded AI coding-agent executable inventory
InventoryReviewedCONF MEDIUMFP MEDIUMCOST LOW
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / agent EXE / full path / latest command

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: approved developer assistants and evaluation systems

Tuning: Exclude sanctioned tools only after recording owner, version, path, hash, and host group.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Expanded AI coding-agent executable inventory
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — administrative inventory
// CONF: medium
// FP: medium
// COST: low
// TIMEFRAME: 30d — inventory newer and less-common clients
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: approved developer assistants and evaluation systems
// TUNING: Exclude sanctioned tools only after recording owner, version, path, hash, and host group.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(qwen|qwen-code|gemini|kiro|amazon-q|tabby|tabby-agent|tabnine|cody|sourcegraph|openhands|open-interpreter|interpreter|agent-zero|swe-agent|mini-swe-agent|devika|mentat|plandex|pearai|void)(\.exe)?$/i
| groupBy([ComputerName, UserName, FileName, ImageFileName], function=[count(as=Executions), min(@timestamp, as=FirstSeen), max(@timestamp, as=LastSeen), selectFromMax(field=@timestamp, include=[CommandLine])], limit=10000)
| sort(LastSeen, order=desc, limit=1000)
| table([LastSeen, FirstSeen, ComputerName, UserName, FileName, ImageFileName, Executions, CommandLine])
Q37 · Expanded JavaScript agent package wrappers
InventoryReviewedCONF MEDIUMFP MEDIUMCOST MEDIUM
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: approved package testing and developer onboarding

Tuning: Exclude known package versions and managed developer hosts after validating the command line.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Expanded JavaScript agent package wrappers
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: T1059.007
// CONF: medium
// FP: medium
// COST: medium
// TIMEFRAME: 30d — wrappers can hide the product filename
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: approved package testing and developer onboarding
// TUNING: Exclude known package versions and managed developer hosts after validating the command line.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(npm|npx|node|bun|bunx|pnpm|pnpx|yarn)(\.exe)?$/i
| CommandLine = /(@google\/gemini-cli|qwen-code|@github\/copilot|@sourcegraph\/amp|@continuedev|\bcline\b|roo-code|openhands|open-interpreter|plandex|mentat|devika)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, ImageFileName, CommandLine, SHA256HashData, aid])
| sort(@timestamp, order=desc, limit=1000)
Q38 · Product-like paths with unexpected executable names
InventoryReviewedCONF MEDIUMFP HIGHCOST HIGH
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: scripts and folders whose names mention AI products

Tuning: Require corroboration from hash, signer, package metadata, child processes, or network behavior.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Product-like paths with unexpected executable names
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — heuristic inventory
// CONF: medium
// FP: high
// COST: high
// TIMEFRAME: 30d — finds portable and renamed installations
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: scripts and folders whose names mention AI products
// TUNING: Require corroboration from hash, signer, package metadata, child processes, or network behavior.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ImageFileName = /(\.codex|\.claude|\.cursor|\.continue|\.cline|\.roo|\.aider|\.goose|\.opencode|gemini-cli|qwen-code|openhands|agent-zero|open-interpreter)/i
| FileName != /^(codex|claude|cursor|aider|goose|opencode|cline|roo|continue|gemini|qwen|openhands)(\.exe)?$/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, ImageFileName, CommandLine, SHA256HashData, aid])
| sort(@timestamp, order=desc, limit=1000)
Q39 · Expanded AI and model container images
InventoryReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: sanctioned AI labs and approved inference hosts

Tuning: Allowlist approved registries, image digests, host groups, published ports, and volume mounts.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Expanded AI and model container images
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: T1610
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 30d — inventories transient and headless workloads
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: sanctioned AI labs and approved inference hosts
// TUNING: Allowlist approved registries, image digests, host groups, published ports, and volume mounts.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(docker|podman|nerdctl|ctr)(\.exe)?$/i
| CommandLine = /(gemini-cli|qwen-code|openhands|open-interpreter|gpt4all|jan-ai|tabbyml|llama\.cpp|text-generation-inference|localai\/localai|vllm\/vllm-openai)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q40 · CLI-visible model downloads through Hugging Face tooling
InventoryReviewedCONF MEDIUMFP MEDIUMCOST MEDIUM
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: approved ML engineering and model evaluation

Tuning: Exclude sanctioned model repositories, service accounts, and dedicated ML hosts.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: CLI-visible model downloads through Hugging Face tooling
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: T1105
// CONF: medium
// FP: medium
// COST: medium
// TIMEFRAME: 30d — model acquisition reveals local AI use
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: approved ML engineering and model evaluation
// TUNING: Exclude sanctioned model repositories, service accounts, and dedicated ML hosts.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(huggingface-cli|hf|python|python3|git|git-lfs)(\.exe)?$/i
| CommandLine = /(snapshot_download|hf_hub_download|huggingface-cli\s+download|\bhf\s+download|huggingface\.co|git-lfs.*(model|gguf|safetensors))/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q41 · Local model files opened from caches
InventoryTenant validationCONF MEDIUMFP HIGHCOST HIGH
Mode
Inventory
Status
Tenant validation
Lineage
Direct event / not applicable
Lookback
7d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: FileOpenInfo availability and volume are tenant/sensor dependent. Restrict scope and validate known model-file opens before expanding the time window.

Likely false positives: approved ML, analytics, and security research workloads

Tuning: Restrict to developer workstations or servers of interest and shorten the Falcon time picker first.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: FileOpenInfo

CQL

// HUNT: Local model files opened from caches
// MODE: Inventory
// REVIEW STATUS: Tenant validation
// LINEAGE: Direct event / not applicable
// TENANT VALIDATION: Narrow to a host and time range; confirm field and event coverage before operational use.
// MITRE: T1083
// CONF: medium
// FP: high
// COST: high
// TIMEFRAME: 7d — file-open telemetry can be high volume
// REQUIRES: FileOpenInfo
// FALSE POSITIVES: approved ML, analytics, and security research workloads
// TUNING: Restrict to developer workstations or servers of interest and shorten the Falcon time picker first.
#event_simpleName = FileOpenInfo
| TargetFileName = /[\\\/](huggingface|ollama|gpt4all|lm[-_ ]?studio|\.lmstudio|jan)[\\\/].*(models|blobs|cache)/i
| TargetFileName = /(\.gguf|\.safetensors|\.onnx|\.pt|\.pth|\.bin)$/i
| groupBy([ComputerName, ContextBaseFileName, TargetFileName], function=[count(as=Opens), collect(UserName, limit=20)], limit=10000)
| sort(Opens, order=desc, limit=1000)
Q42 · Model-family names supplied to local runtimes
InventoryReviewedCONF MEDIUMFP MEDIUMCOST MEDIUM
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / executable or artifact

Expected result: Confirms that the named executable, package, path, model, or configuration pattern was observed.

Review caveat: Presence is not malicious. Renamed binaries, wrapper-only execution, containers, and tools outside the heuristic name list can evade this view.

Likely false positives: approved research and evaluation workloads

Tuning: Baseline approved model families, licenses, users, and inference hosts.

Next pivot: Validate system, user, full path, hash, signer, owner, parent process, and recent network behavior.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Model-family names supplied to local runtimes
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — administrative inventory
// CONF: medium
// FP: medium
// COST: medium
// TIMEFRAME: 30d — attributes runtimes to model families
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: approved research and evaluation workloads
// TUNING: Baseline approved model families, licenses, users, and inference hosts.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(ollama|lms|lm[ _-]?studio|llama-server|llama-cli|vllm|python|python3|local-ai|localai|gpt4all|jan)(\.exe)?$/i
| CommandLine = /(llama|mistral|mixtral|qwen|deepseek|phi[-_ ]?[234]|gemma|command-r|falcon|vicuna|yi[-_ ]|starcoder|codestral|granite|gpt-oss)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, ImageFileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q43 · Agent-spawned browser automation and remote debugging
Behavior huntReviewedCONF HIGHFP MEDIUMCOST MEDIUM
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
14d
Result focus
System / user / process / command line

Expected result: Confirms the stated high-risk child-process or command-line behavior associated with an AI-agent pattern.

Review caveat: Direct-parent matching misses agent → Node/Playwright → browser chains. Use Q20 and a process-tree pivot for wrapper-mediated automation.

Likely false positives: approved UI testing, Playwright, Selenium, and developer automation

Tuning: Allowlist known test runners, CI hosts, browser profiles, and approved parent agents.

Next pivot: Review the process tree, initiating prompt/task, workspace, command line, file changes, destinations, and user approval context.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Agent-spawned browser automation and remote debugging
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1059
// CONF: high
// FP: medium
// COST: medium
// TIMEFRAME: 14d — browser control expands an agent's accessible surface
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: approved UI testing, Playwright, Selenium, and developer automation
// TUNING: Allowlist known test runners, CI hosts, browser profiles, and approved parent agents.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter)(\.exe)?$/i
| FileName = /^(chrome|google-chrome|google-chrome-stable|msedge|microsoft-edge|microsoft-edge-stable|chromium|chromium-browser|firefox|playwright|selenium-manager)(\.exe)?$/i
| CommandLine = /(--remote-debugging-port|--headless|playwright|selenium|user-data-dir)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q44 · Processes resolving LLM vendor and model-hub domains
InventoryReviewedCONF HIGHFP MEDIUMCOST LOW
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / process / domain

Expected result: Returns one row per system, requesting process, and vendor domain with first/last seen and request counts. This catches wrappers, extensions, scripts, and renamed binaries that every process-name inventory misses, because DNS attribution is independent of what the executable is called.

Review caveat: DNS attribution reflects the requesting process; on some platforms OS resolver services can absorb attribution. Browsers are excluded to isolate agent, CLI, and SDK use.

Likely false positives: sanctioned SDK and telemetry traffic; security tools fetching vendor reputation data

Tuning: Extend the domain list to match the tenant vendor mix; exclude approved hosts only after ownership review.

Next pivot: Pivot the process name into Q1 and Q36–Q38, and the host into Q12 and Q30 for listener state.

Telemetry: DnsRequest

CQL

// HUNT: Processes resolving LLM vendor and model-hub domains
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — administrative inventory
// CONF: high
// FP: medium
// COST: low
// TIMEFRAME: 30d — shadow-AI inventory independent of process naming
// REQUIRES: DnsRequest
// FALSE POSITIVES: sanctioned SDKs, telemetry, and security tooling
// TUNING: Extend the domain list per vendor mix; exclude approved hosts after ownership review.
#event_simpleName = DnsRequest
| DomainName = /^(api\.anthropic\.com|statsig\.anthropic\.com|api\.openai\.com|api\.githubcopilot\.com|generativelanguage\.googleapis\.com|openrouter\.ai|api\.mistral\.ai|api\.deepseek\.com|api\.groq\.com|api\.together\.xyz|api\.x\.ai|api\.cohere\.com|registry\.ollama\.ai|huggingface\.co|cdn-lfs\.huggingface\.co)$/i
| ContextBaseFileName != /^(chrome|msedge|firefox|safari|brave|opera|vivaldi)(\.exe)?$/i
| groupBy([ComputerName, ContextBaseFileName, DomainName], function=[count(as=Requests), min(@timestamp, as=FirstSeen), max(@timestamp, as=LastSeen)], limit=20000)
| sort(LastSeen, order=desc, limit=2000)
Q45 · AI agent extension installs into VS Code-family editors
InventoryReviewedCONF HIGHFP LOWCOST LOW
Mode
Inventory
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / extension install

Expected result: Returns command-line driven installs of agent-capable IDE extensions (Cline, Roo Code, Continue, Copilot, Codeium/Windsurf, Cody, Tabnine, Augment). Extension-hosted agents never appear as standalone executables, so this is the primary presence signal for them.

Review caveat: Only CLI and scripted installs surface here; marketplace-UI installs inside the editor do not spawn a distinct command line. Treat as partial presence inventory — at runtime, extension-hosted agents parent to the IDE and remain a lineage gap.

Likely false positives: approved developer extension installs and managed IDE provisioning

Tuning: Record owner and workspace; alert only on unapproved publisher IDs.

Next pivot: Inventory the host’s editors with Q1 and Q14, and review MCP configuration with Q15.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: AI agent extension installs into VS Code-family editors
// MODE: Inventory
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — administrative inventory
// CONF: high
// FP: low
// COST: low
// TIMEFRAME: 30d — extension-hosted agents never appear as standalone executables
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: approved developer extension installs
// TUNING: Record owner and workspace; alert only on unapproved publisher IDs.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| CommandLine = /--install-extension[\s=]+\S*(claude-code|claude-dev|roo-cline|roo-code|continue\.continue|github\.copilot|copilot-chat|codeium|windsurf|\bcline\b|sourcegraph|tabnine|cody-ai|augment)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q46 · AI agents launched by schedulers or service managers
Behavior huntReviewedCONF MEDIUMFP MEDIUMCOST LOW
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
30d
Result focus
System / user / parent / command line

Expected result: Surfaces agent or runtime processes whose direct parent is a task scheduler, init system, or service manager — either persistence from Q9–Q11 actually firing, or unattended agent autonomy that no interactive user is supervising.

Review caveat: Ollama installed as a service legitimately parents to systemd — that pairing is expected. The signal is interactive coding agents (codex, claude, aider, goose) running with no interactive session.

Likely false positives: ollama under systemd; approved unattended automation with a named owner

Tuning: Baseline approved unattended automation; investigate interactive coding agents under schedulers first.

Next pivot: Establish who created the scheduled task or service with Q9–Q10, then review behavior with Q6–Q8 and Q17–Q19.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: AI agents launched by schedulers or service managers
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1053.005,T1053.003,T1543
// CONF: medium
// FP: medium
// COST: low
// TIMEFRAME: 30d — unattended agent execution implies installed persistence or automation
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: ollama under systemd; approved unattended automation
// TUNING: Baseline approved unattended automation; investigate interactive agents under schedulers first.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(codex|claude|cursor-agent|aider|goose|opencode|gemini|qwen|openhands|interpreter|ollama|lms|lm[ _-]?studio)(\.exe)?$/i
| ParentBaseFileName = /^(svchost|taskeng|taskhostw|services|cron|crond|anacron|atd|systemd|launchd)(\.exe)?$/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q47 · Hosts consuming remote local-AI API ports
Exposure huntReviewedCONF MEDIUMFP MEDIUMCOST MEDIUM
Mode
Exposure hunt
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
7d
Result focus
System / process / destination / port

Expected result: Returns one row per source system, consuming process, destination address, and model-API port. This finds exposed model servers from the consumer side without a join, and surfaces lateral use of another host’s model API — both sides of the exposure Q12 measures from the listener side.

Review caveat: A destination port match does not prove the destination is a model API — 1234 and 5001 collide with other software. Validate the destination service before treating a row as exposure.

Likely false positives: approved shared inference servers; unrelated services on colliding ports

Tuning: Validate the destination actually serves a model API; allowlist sanctioned shared endpoints.

Next pivot: Pivot the destination host into Q12 and Q30 to confirm the listener, and the source process into Q1–Q2.

Telemetry: NetworkConnectIP4

CQL

// HUNT: Hosts consuming remote local-AI API ports
// MODE: Exposure hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — exposure inventory
// CONF: medium
// FP: medium
// COST: medium
// TIMEFRAME: 7d — finds exposed model APIs from the consumer side without a join
// REQUIRES: NetworkConnectIP4
// FALSE POSITIVES: approved shared inference servers and port-collision traffic
// TUNING: Validate the destination actually serves a model API; allowlist sanctioned shared endpoints.
#event_simpleName = NetworkConnectIP4
| RemotePort = /^(11434|1234|4891|1337|5001)$/
| RemoteAddressIP4 != "127.0.0.1"
| groupBy([ComputerName, ContextBaseFileName, RemoteAddressIP4, RemotePort], function=[count(as=Connections), max(@timestamp, as=LastSeen)], limit=10000)
| sort(Connections, order=desc, limit=1000)
Q48 · Secret material in agent-spawned command lines
Behavior huntReviewedCONF HIGHFP LOWCOST MEDIUM
Mode
Behavior hunt
Status
Reviewed
Lineage
Direct parent only
Lookback
14d
Result focus
System / user / process / command line

Expected result: Surfaces live credential prefixes (Anthropic, OpenAI, GitHub, AWS, Slack, Google API keys) appearing in command lines under an agent parent. Q27 matches environment-variable names; this matches actual key material — a hit is a credential already exposed to process telemetry regardless of intent.

Review caveat: A matching prefix with placeholder content (documentation examples, test fixtures) is possible but rare at these lengths. Treat every hit as an exposed credential until proven placeholder.

Likely false positives: placeholder or documentation keys in test commands

Tuning: Rotate on confirmation; do not suppress by user or host — exposure is exposure.

Next pivot: Identify the credential owner, rotate the key, then review the agent session with Q8 and Q27 for the access path.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Secret material in agent-spawned command lines
// MODE: Behavior hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct parent only
// MITRE: T1552.001
// CONF: high
// FP: low
// COST: medium
// TIMEFRAME: 14d — a live credential in process telemetry is already exposed
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: placeholder or documentation keys in test commands
// TUNING: Treat every hit as an exposed credential until proven placeholder; rotate on confirmation.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| ParentBaseFileName = /^(codex|claude|cursor|cursor-agent|aider|goose|opencode|cline|roo|continue|windsurf|gemini|qwen|openhands|interpreter)(\.exe)?$/i
| CommandLine = /(sk-ant-[A-Za-z0-9_-]{20,}|sk-proj-[A-Za-z0-9_-]{20,}|ghp_[A-Za-z0-9]{30,}|github_pat_[A-Za-z0-9_]{30,}|AKIA[0-9A-Z]{16}|xox[bp]-[0-9A-Za-z-]{10,}|AIzaSy[A-Za-z0-9_-]{30,})/
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
Q49 · Model-runtime exposure configuration flags
Exposure huntReviewedCONF HIGHFP LOWCOST LOW
Mode
Exposure hunt
Status
Reviewed
Lineage
Direct event / not applicable
Lookback
30d
Result focus
System / user / process / command line

Expected result: Surfaces the configuration that creates network exposure before the listener exists: OLLAMA_HOST or --host/--listen bound to 0.0.0.0, and LM Studio’s CLI server start. A leading indicator for the exposed listeners Q12 and Q30 observe after the fact.

Review caveat: A bind-all flag on the command line does not guarantee the bind succeeded or persists — confirm with Q12/Q30 listener state before escalating.

Likely false positives: approved shared inference servers on isolated networks

Tuning: Confirm the bind takes effect via Q12 and Q30; allowlist approved shared endpoints.

Next pivot: Confirm the listener with Q12 and Q30, then check who reaches it with Q13 and Q47.

Telemetry: ProcessRollup2 / SyntheticProcessRollup2

CQL

// HUNT: Model-runtime exposure configuration flags
// MODE: Exposure hunt
// REVIEW STATUS: Reviewed
// LINEAGE: Direct event / not applicable
// MITRE: N/A — exposure inventory
// CONF: high
// FP: low
// COST: low
// TIMEFRAME: 30d — leading indicator for the listener exposure in Q12
// REQUIRES: ProcessRollup2 / SyntheticProcessRollup2
// FALSE POSITIVES: approved shared inference servers on isolated networks
// TUNING: Confirm the bind takes effect (pivot to Q12/Q30); allowlist approved shared endpoints.
#event_simpleName = /ProcessRollup2|SyntheticProcessRollup2/
| FileName = /^(ollama|lms|lm[ _-]?studio|llama-server|vllm|localai|local-ai|jan|python|python3|bash|sh|zsh|cmd|powershell|pwsh)(\.exe)?$/i
| CommandLine = /(OLLAMA_HOST\s*=\s*["']?0\.0\.0\.0|--host[\s=]+["']?0\.0\.0\.0|--listen[\s=]+["']?0\.0\.0\.0|lms\s+server\s+start)/i
| table([@timestamp, ComputerName, UserName, ParentBaseFileName, FileName, CommandLine, aid])
| sort(@timestamp, order=desc, limit=1000)
06

Investigation and Validation

Native Audit-Log Hunts

  • Falcon Discover: inventory installed packages, unsigned/portable binaries, software owners, and host groups.
  • Falcon Data Protection: review access to source, secrets, regulated data, and uploads from developer endpoints.
  • Windows: audit PowerShell, scheduled-task, service, WSL, firewall, and package-manager logs.
  • Linux: review systemd units, shell history, package logs, containers, listening sockets, and user crontabs.
  • Proxy/DNS: baseline vendor APIs, model registries, code hosts, and unexpected external tunnels.

Custom IOA Candidates

CandidateDetect logicRollout
Agent launches tunnelKnown agent parent; ngrok/cloudflared/chisel/ssh child with tunnel flagsDetect only; canary; exclude approved remote development
Agent creates persistenceKnown agent parent; schtasks/sc/systemctl with create or enable argumentsDetect only; peer review
Agent discovers secretsKnown agent parent; shell command targets credential/config pathsDetect only; tune authorized scanning
AI API exposedOllama/LM Studio runtime listening beyond loopbackPrefer network policy; IOA applicability tenant-dependent

Behavioral Quick-Copy Pivots

No atomic malicious IOCs are claimed. These are discovery pivots and behavior chains, not block indicators.

Behavioral signaturestriage pivots
agent -> shell / downloader / remote tool
MCP client -> npx, uvx, node, or python subprocess
local model service -> non-loopback listener
agent -> persistence / secret path / archive / tunnel
Discovery termsinventory pivots only
codex, claude, cursor, aider, goose, opencode, cline, roo, continue, windsurf
ollama, lmstudio, llmster, vllm, localai, MCP

Detection Validation Gates

  1. Confirm each event type and field is populated in a one-hour tenant sample.
  2. Run inventory queries for 30 days and document approved users, hosts, hashes, paths, and parent processes.
  3. Test alertable behavior with benign commands in an isolated canary endpoint.
  4. Keep IOAs in Detect for at least 14 days; require measured false-positive rate below 5% before prevention consideration.
  5. Review Linux and Windows separately; wrappers may obscure the true executable.

Deployable Playbooks

INVENTORY / BASELINE — NO PAGE
Scope: Q1–Q5, Q14–Q16, Q22–Q24, Q30–Q45, Q47, Q49
Cadence: daily or weekly; use each query header lookback
Disposition: record owner, approved host group, version, hash, path, listener, model and MCP server.

SCHEDULED SEARCH — HIGH-RISK AGENT BEHAVIOR
Name: HUNT: Local AI Agents - High-Risk Tool Execution
Scope: Q7–Q11, Q18–Q21, Q46, Q48 after tenant validation
Cadence: 15 minutes with 20-minute query window and 5-minute overlap
Dedup: aid + UserName + FileName + CommandLine hash for 24 hours
Suppress: approved canary/test hosts only; never suppress destructive or permission-bypass modes globally
Priority: HIGH when persistence, credential targeting, tunneling, encoded execution, or destruction is confirmed

ALERT BODY
An AI-agent or identified wrapper launched behavior outside the approved baseline. Confirm execution, parent/lineage, user, workspace and command line; then review prompts/tool logs, MCP configuration, network destinations, changed files and exposed credentials.

TRIAGE
1. Confirm ProcessRollup2 execution and record aid, ComputerName, UserName and timestamp.
2. Establish lineage with Q20 and identify the owning agent/wrapper.
3. Preserve command line, hash, signer, prompts/tool logs, MCP config and workspace diff.
4. Pivot to Q13, Q31, and Q47 for network activity and Q9–Q11, Q46 for persistence.
5. Isolate and revoke tokens when sensitive access, external exposure or destructive execution is plausible.
07

Governance, Hardening and Containment

Immediate — owner: Endpoint + SOC
Inventory agent/runtime owner, version, hash, path, account, workspace, MCP servers, listeners, and unrestricted flags. Block unauthenticated non-loopback model APIs at the host firewall; remove unapproved tunnels; rotate exposed tokens. Verify with Q12–Q13, Q30–Q31 and Q21. Roll back only through an approved exception.
Near term — owner: Platform Engineering
Publish approved agent and MCP catalogs; require least-privilege accounts, workspace boundaries, tool allowlists, secrets brokers, authenticated inference APIs, egress allowlists, Data Protection policy, and dedicated endpoint groups. Pilot on a canary group before broad enforcement.
Strategic — owner: Security Architecture
Centrally manage agent configuration, retain prompt/tool/MCP audit evidence, validate model provenance and licensing, govern WSL and containers, and test permission boundaries quarterly. Map controls to NIST AI RMF Govern/Map/Measure/Manage and applicable CIS endpoint safeguards.

Containment Runbook

PhaseOwnerActionEvidence
ValidateSOCIdentify agent, wrapper lineage, owner, task, sensitive resource and destination.Process tree, command lines, hashes, network rows
PreserveIRCapture prompt/tool logs, MCP JSON, agent config, model manifest, container state, listeners and workspace changes before stopping processes.Exported logs, config copies, diffs, container metadata
ContainIR + EndpointStop agent/runtime, isolate host when warranted, block tunnel and restrict listener.Containment timestamps and policy changes
CredentialsIAMRotate tokens or keys exposed in command lines, environment, configs or accessed paths; invalidate sessions.Revocation and rotation records
EradicateEndpointRemove unauthorized packages, MCP configs, persistence, containers and downloaded tools.Removal logs and post-action inventory
RecoverService ownerRestore approved configuration, validate controls and re-hunt for 30 days.Validation results and closure approval
08

Coverage Gaps

BehaviorCQLIOACoverage
Agent/runtime/model inventoryQ1–Q5, Q12–Q16, Q22–Q24, Q30–Q36, Q38–Q42, Q44–Q45Partial — several product names remain heuristic
Direct child tool executionQ6–Q8, Q17–Q19, Q25–Q29, Q43, Q48CandidatesPartial — direct-parent dependency
Wrapper lineageQ20Partial — one wrapper generation
PersistenceQ9–Q11, Q46CandidatesGood Windows / partial Linux
Local API exposureQ12–Q13, Q30–Q31, Q47, Q49LimitedPartial — IPv4 and authentication state gaps
Unrestricted agent modesQ21CandidatePartial — source-verified flags only
Extension-hosted agents (Cline / Roo / Continue / Copilot agent mode)Q45 install-time inventoryGap — runtime children parent to the IDE and are indistinguishable from IDE terminal use
Prompt/tool decision auditProduct logsGap
File-content accessFalcon Data Protection / product telemetryGap pending tenant schema validation

Reviewer caution: clean syntax and field linting do not prove live-tenant semantics. Validate each scheduled candidate on canary endpoints.

09

Hunt Ticket

TITLE: Local AI Agent Discovery and Risk Hunt
SEVERITY: Medium; High when sensitive behavior is confirmed
SCOPE: Windows 10/11, Windows Server, Linux, macOS (partial); Falcon Complete / Insight XDR / NG-SIEM
HYPOTHESIS: Local agents and model runtimes can be inventoried through process and network telemetry; risky use appears in child processes, persistence, secrets, staging, tunnels, or exposed APIs.
QUERIES: 49
DO FIRST: Q1–Q21
FINDINGS: Populate after running queries.
GAPS: Product audit logs, prompt content, file access, IPv6 listener coverage, wrapper/renamed binaries, extension-hosted agent lineage.
OWNER: slapopotamus
VERSION: v0.6 · 2026-08-28
10

Sources, References and Changelog

Source Review

SourceKey observable
OpenAI Codex official repositorycodex, npm package @openai/codex, config.toml, codex mcp-server
Anthropic Claude Code documentationclaude, npm package, tool permissions, claude mcp, project .mcp.json
Model Context Protocol specificationstdio clients launch MCP servers as subprocesses; HTTP is also supported
Ollama documentationdefault local API at localhost:11434
LM Studio documentationlms server start, default local API at localhost:1234, optional non-loopback bind

References

Changelog

v0.62026-08-28Full CQL re-review: added word boundaries to short-name alternations (Q11, Q16, Q20, Q23, Q32, Q33, Q37); matched LM Studio’s real binary names across thirteen queries and added AnythingLLM, Msty, and KoboldCpp to Q2; rebuilt Q21’s scope and flag list (Gemini, Qwen, Copilot, Aider, Goose, Amp, Amazon Q; permission-mode, approval, and bypass flags); normalized parent lists across all behavior hunts; added loopback exclusions (Q25, Q31), distinctive ports (Q30), and cron/launchctl persistence (Q10); added Q44–Q49 — DNS shadow-AI inventory, extension installs, scheduler-launched agents, model-API port consumers, secret material in agent command lines, and exposure-by-configuration; documented the extension-hosted agent lineage gap.
v0.52026-08-21Skeptical 43-query review: corrected tunnel, service, listener, destination-baseline, package-install, destructive-command, and unrestricted-wrapper semantics; changed Q1, Q4, and Q28 to readable system/user/executable rows; and added query matrices, lineage depth, tenant-validation status, expected results, caveats, tuning, and next-pivot guidance.
v0.42026-08-21Special Edition rebuild: moved to a subject-specific ten-section format; split 43 CQL hunts into Core and Extended coverage; reconciled query badges with inline ratings; expanded Linux browser executable coverage; removed the placeholder IOC import row; and retained behavior-only provenance.
v0.32026-08-18Skeptical multi-agent review: corrected query semantics and ATT&CK labels, added wrapper-lineage and unrestricted-mode hunts, split risky behaviors, repaired alert cadence, and strengthened hardening and containment.
v0.22026-08-18Added twelve deeper-coverage queries for agents, package wrappers, renamed binaries, IDE-managed MCP, WSL, containers, model acquisition and caches, browser automation, and risky agent commands.
v0.12026-08-18Initial local-only pack with 27 CQL queries, inventory-to-behavior workflow, IOA candidates, hardening, and response guidance.