Over the past year, a new class of alert has appeared in enterprise security operations centers — and it is growing faster than anything else in the stream. According to recent reporting, these alerts are not attacks against AI systems. They are the ordinary, everyday footprint of an organization using AI: developers running autonomous coding agents, non-technical staff signing consumer AI tools into corporate accounts, browser extensions piping internal data to third-party LLM endpoints, and AI agents holding OAuth tokens with scopes nobody in security ever reviewed.
This is the defining SOC problem of 2026. Your detection engineering was built for human-paced activity. AI agents operate at machine pace — spawning subprocesses, reading repositories, calling APIs, and generating telemetry volumes that make a power user look idle. Meanwhile, every one of those agents is also a new attack surface: a prompt-injection vector, a token to steal, a data exfiltration channel dressed up as productivity.
If you are a SOC analyst, detection engineer, or CISO, the question is no longer whether your organization uses AI. It is whether your SOC can tell sanctioned AI from shadow AI — and malicious use of either — before the alert queue buries you.
Technical Analysis
What is actually generating these alerts
From the field, the AI-driven alert growth clusters into a few distinct buckets:
- AI coding agents and CLI tools. Tools such as Claude Code, GitHub Copilot agent mode, Cursor, Windsurf, Aider, and OpenAI's Codex CLI execute as local processes with broad developer credentials. They spawn shells, run
git,npm,pip, andcurl, read large swaths of the filesystem (including, frequently,.ssh/,.aws/credentials, and.envfiles), and open outbound HTTPS connections to API endpoints. Every one of those behaviors individually looks like reconnaissance or staging in a traditional detection stack. - Consumer AI tools bound to corporate identities. Staff signing ChatGPT, Gemini, Claude.ai, or Perplexity into corporate Google/Microsoft identities — often granting OAuth scopes like
mail.readordrive.readin the process. CASB and IdP logs light up, and historically these alerts were handled as one-off policy violations rather than a governed class. - MCP servers and agent-to-tool integrations. The Model Context Protocol has become the de facto standard for wiring agents into internal systems — file servers, ticketing systems, databases, even EDR consoles. MCP servers run locally with the agent's privileges, frequently launch via
npx/uvx/dockerwith configs in user-writable JSON files, and hold API keys in plaintext. - Browser-based AI extensions summarizing, translating, or "assisting" on internal pages — silently shipping page content, including ticket queues, customer records, and source code, to external endpoints.
- AI agents acting on behalf of users with service accounts and delegated tokens. When an agent pulls 400 Jira tickets at 3 AM because a developer left a task running, anomaly-based detections (impossible travel, impossible volume, impossible hours) fire exactly as designed — on legitimate activity.
Why traditional detections break
AI agents violate nearly every assumption baked into behavioral analytics:
- Pacing: A coding agent can execute hundreds of tool calls per hour. Rate-based detections tuned for humans drown.
- Credential scope: Agents run with the developer's full token set. File access detections (bulk read of credential stores, SSH keys) fire constantly.
- Attribution ambiguity: When an agent acts, the identity in the log is the user's. Distinguishing "user clicked" from "agent decided" requires telemetry most organizations do not collect.
- Novel process trees:
node.exe→claude→powershell.exe→git.exeis a legitimate agent chain on one developer's box and a classic malware chain on a finance workstation. Parent/child process rules tuned pre-2024 need an "AI context" dimension they never had.
The adversary's angle
None of this is hypothetical risk. The same channels employees use are the channels attackers target:
- Token theft: AI agent credential stores (MCP configs,
.claude/,.codex/, extension storage) are now high-value targets for infostealers. A stolen agent token with repository and cloud scopes is a supply-chain foothold. - Prompt injection as initial access: Malicious instructions embedded in a repo README, a Jira ticket, a web page, or a document the agent ingests can drive the agent to exfiltrate data or execute commands — using legitimate credentials, over legitimate channels, from a managed device.
- Shadow AI as exfiltration: An employee pasting a customer table into a consumer LLM is a DLP event with no malware involved. If your DLP only watches email and USB, you will never see it.
There is no single CVE to patch here — this is an architectural detection and governance problem. The exploitation status is structural: the attack surface exists by default the moment your organization adopts AI without guardrails.
Detection & Response
The detections below are tuned for the behaviors described above. Deploy them in audit/monitor mode first, build your sanctioned-AI inventory, and then move to alerting with suppression lists per tool and per user role. A blanket "alert on all AI traffic" rule will be disabled within a week — scope deliberately.
Sigma Rules
---
title: AI Coding Agent CLI Execution Detected
id: 3f8a1c92-7d4e-4b5a-9c31-2e6f8a1b4d57
status: experimental
description: Detects execution of common AI coding agent CLIs (Claude Code, Cursor, Aider, Codex, Copilot CLI). Baseline against sanctioned tool inventory; unsanctioned executions on non-developer endpoints warrant investigation.
references:
- https://attack.mitre.org/techniques/T1059/
- https://attack.mitre.org/techniques/T1105/
author: Security Arsenal
date: 2026/09/15
tags:
- attack.execution
- attack.t1059
logsource:
category: process_creation
product: windows
detection:
selection_img:
Image|endswith:
- '\claude.exe'
- '\codex.exe'
- '\aider.exe'
- '\cursor.exe'
- '\windsurf.exe'
- '\copilot.exe'
selection_cmd:
CommandLine|contains:
- 'claude --'
- 'codex exec'
- 'aider --'
- 'cursor agent'
condition: selection_img or selection_cmd
falsepositives:
- Sanctioned developer AI tooling — suppress per approved tool list and developer OU
level: medium
---
title: AI Agent or Shell Process Reading Credential Stores
id: 9b2e4d71-3c6a-4f18-8d52-1a7c9e3b5f02
status: experimental
description: Detects processes associated with AI agents or agent-spawned shells accessing SSH keys, cloud credential files, or .env secrets. High-fidelity when the reading process is a node/python agent runtime or its child.
references:
- https://attack.mitre.org/techniques/T1552/
- https://attack.mitre.org/techniques/T1078/
author: Security Arsenal
date: 2026/09/15
tags:
- attack.credential_access
- attack.t1552.001
logsource:
category: file_event
product: windows
detection:
selection_path:
TargetFilename|contains:
- '\.ssh\id_'
- '\.aws\credentials'
- '\.azure\accessTokens.json'
- '\.config\gcloud\'
- '\.kube\config'
selection_env:
TargetFilename|endswith:
- '\.env'
- '\.env.production'
- '\.env.local'
selection_reader:
Image|endswith:
- '\node.exe'
- '\python.exe'
- '\python3.exe'
- '\uv.exe'
- '\claude.exe'
- '\codex.exe'
condition: (selection_path or selection_env) and selection_reader
falsepositives:
- Legitimate agent workflows reading project .env files — suppress per approved agent + project path pairing
level: high
---
title: MCP Server Configuration Written in User Profile
id: 5c1d8f36-2b47-4e93-a764-8f2c6d1e9a83
status: experimental
description: Detects creation or modification of Model Context Protocol server configuration files. MCP configs define which local tools and API keys an agent can invoke; unexpected changes may indicate shadow AI setup or tampering by injected instructions.
references:
- https://attack.mitre.org/techniques/T1546/
- https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/09/15
tags:
- attack.persistence
- attack.t1546
logsource:
category: file_event
product: windows
detection:
selection:
TargetFilename|contains:
- '\.claude.json'
- '\claude_desktop_config.json'
- '\.cursor\mcp.json'
- '\mcp_settings.json'
- '\.codeium\windsurf\mcp_config.json'
falsepositives:
- Sanctioned agent installation and updates — alert on non-developer endpoints and off-hours modifications
level: medium
KQL Hunt (Microsoft Sentinel / Defender)
// Hunt: AI agent process trees and consumer AI network footprint
// Part 1: Identify endpoints running AI agent CLIs and what they spawn
let AITools = dynamic(["claude.exe","codex.exe","aider.exe","cursor.exe","windsurf.exe"]);
DeviceProcessEvents
| where TimeGenerated > ago(7d)
| where FileName has_any (AITools)
or ProcessCommandLine has_any ("claude --", "codex exec", "aider --")
| summarize FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated),
ChildProcesses=make_set(FileName, 20), CmdLines=make_set(ProcessCommandLine, 10)
by DeviceName, AccountName
| order by FirstSeen asc;
// Part 2: Outbound connections to consumer AI SaaS endpoints from corporate devices
// Tune the domain list to your policy; flag devices NOT in your sanctioned-AI group
let AIDomains = dynamic(["chatgpt.com","api.openai.com","claude.ai","api.anthropic.com",
"gemini.google.com","perplexity.ai","copilot.microsoft.com","huggingface.co"]);
DeviceNetworkEvents
| where TimeGenerated > ago(7d)
| where RemoteUrl has_any (AIDomains)
| summarize Connections=count(), DistinctRemoteIPs=dcount(RemoteIP),
Apps=make_set(InitiatingProcessFileName, 15)
by DeviceName, InitiatingProcessAccountName
| order by Connections desc;
// Part 3: Agent runtimes (node/python/uv) touching credential stores — possible token theft or overbroad agent
DeviceFileEvents
| where TimeGenerated > ago(7d)
| where FolderPath has_any ("\\.ssh\\", "\\.aws\\credentials", "accessTokens.json", "\\.kube\\config")
or FileName startswith ".env"
| where InitiatingProcessFileName in~ ("node.exe","python.exe","python3.exe","uv.exe","claude.exe","codex.exe")
| project TimeGenerated, DeviceName, InitiatingProcessAccountName,
InitiatingProcessFileName, InitiatingProcessCommandLine, FolderPath, FileName
| order by TimeGenerated desc;
Velociraptor VQL
-- Hunt: AI agent processes, MCP configs, and agent runtime network connections
-- Collect running AI agents and their parent/child context
SELECT Pid, Ppid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE Name =~ '(?i)claude|codex|aider|cursor|windsurf|copilot'
OR CommandLine =~ '(?i)claude --|codex exec|aider --|mcp'
-- Enumerate MCP and agent configuration files (plaintext API keys often live here)
SELECT FullPath, Size, Mtime, Btime
FROM glob(globs=[
'C:/Users/*/.claude.json',
'C:/Users/*/.claude/**',
'C:/Users/*/AppData/Roaming/Claude/claude_desktop_config.json',
'C:/Users/*/.cursor/mcp.json',
'C:/Users/*/.codex/**',
'C:/Users/*/.codeium/windsurf/mcp_config.json'
])
-- Network connections held by agent runtimes — check RemoteAddr against sanctioned AI API ranges
SELECT Pid, Name, LocalAddr, RemoteAddr, Status
FROM netstat()
WHERE Name =~ '(?i)node|python|uv|claude|codex|cursor'
AND Status =~ 'ESTAB'
Inventory & Hardening Script
# AI Tooling Inventory & Baseline Hardening — run via Intune/SCCM or EDR Live Response
# Outputs: CSV of installed AI tools, MCP configs, and plaintext secrets in agent configs
$report = @()
# 1. Enumerate installed AI tooling per user profile
$aiPaths = @("$env:USERPROFILE\.claude","$env:USERPROFILE\.codex","$env:USERPROFILE\.cursor",
"$env:USERPROFILE\.codeium","$env:APPDATA\Claude","$env:LOCALAPPDATA\Programs\cursor")
foreach ($p in $aiPaths) {
if (Test-Path $p) {
$report += [pscustomobject]@{Type='AIToolInstall'; Path=$p; Modified=(Get-Item $p).LastWriteTime}
}
}
# 2. Scan MCP configs for plaintext API keys (report presence only — do NOT log key values)
$mcpConfigs = Get-ChildItem "$env:USERPROFILE" -Recurse -Depth 3 -ErrorAction SilentlyContinue |
Where-Object { $_.Name -match 'mcp.*\.json$|claude_desktop_config\.json|\.claude\.json' }
foreach ($cfg in $mcpConfigs) {
$raw = Get-Content $cfg.FullName -Raw -ErrorAction SilentlyContinue
$hasSecret = $raw -match 'sk-[A-Za-z0-9]|api_key|API_KEY|token'
$report += [pscustomobject]@{Type='MCPConfig'; Path=$cfg.FullName; Modified=$cfg.LastWriteTime;
ContainsPlaintextSecret=$hasSecret}
}
# 3. Check OAuth grants to consumer AI apps in Entra ID (requires Microsoft.Graph, run by admin)
# Connect-MgGraph -Scopes "Application.Read.All"
# Get-MgOauth2PermissionGrant -All | Where-Object {
# (Get-MgServicePrincipal -ServicePrincipalId $_.ClientId).DisplayName -match 'OpenAI|Anthropic|Perplexity'
# } | Select-Object ClientId, Scope, ConsentType
# 4. Export findings for SIEM ingestion
$report | Export-Csv -Path "C:\ProgramData\AIInventory_$(Get-Date -Format yyyyMMdd).csv" -NoTypeInformation
Write-Host "AI inventory complete: $($report.Count) artifacts found. Ingest CSV into Sentinel for correlation."
Remediation & Governance
There is no patch for this — the fix is architectural. Priority actions:
- Build the sanctioned AI inventory first. You cannot detect shadow AI until you know what sanctioned AI looks like. Catalog approved tools, approved versions, approved users/OUs, and approved OAuth scopes. Feed this into your SIEM as a suppression/allowlist reference table — every detection above assumes it exists.
- Stand up an AI-specific alert triage lane. Do not let AI-tool alerts compete with malware alerts in the same queue with the same SLAs. Create a dedicated incident type with its own runbook: Is the tool sanctioned? Is the user in an approved role? Did data leave the perimeter? Route accordingly.
- Constrain agent credentials. Move agents off user-delegated tokens and onto scoped, short-lived service identities (Entra workload identities, AWS IAM roles with session policies). An agent token with
repo:*andcloud:*is a supply-chain breach waiting for a prompt injection. - Kill plaintext secrets in MCP configs. Enforce OS keychain / secrets-manager-backed credential injection for MCP servers. The PowerShell script above finds configs holding raw API keys — remediate every hit.
- Gate OAuth consent. In Entra ID, disable user consent for third-party apps and route AI tool requests through admin consent workflow with scope review. In Google Workspace, use the API access control policy to block unvetted AI apps from
drive.readandmail.read. - Extend DLP to AI channels. Add consumer AI domains and API endpoints to your CASB/proxy policy categories. Alert (and coach) on paste/upload events to unsanctioned endpoints; block sanctioned-corp-data patterns outright.
- Update your IR runbooks for agent-driven incidents. When an agent "does something bad," traditional scoping questions change: what did the agent read (prompt injection source), what tokens did it hold (revocation scope), and what did it send where (exfil assessment). Practice this tabletop before you need it.
The organizations getting this right in 2026 treat AI tooling like they treated BYOD a decade ago: inevitable, valuable, and completely unmanageable without deliberate inventory, identity controls, and detection engineering built for the new normal.
Related Resources
Security Arsenal Managed SOC Services AlertMonitor Platform Book a SOC Assessment soc-mdr Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.