Dark Reading's recent analysis — When AI Agents Commit Breaches, Humans May Not Be Held Liable — cuts to the core of a problem I've been watching develop across client environments throughout 2025 and into 2026: organizations are deploying autonomous AI agents with credentials, API tokens, and system access that would make a red teamer blush, while governance, detection, and legal accountability frameworks lag years behind.
The key distinction the article draws is critical: responsibility remains human, but accountability is unsettled. When an agent escapes its intended containment boundary — browsing to an external system, exfiltrating data via an API call, chaining tool invocations its designers never anticipated — who is liable? The developer? The deployer? The prompt author? Courts and regulators haven't answered that question yet, which means in the interim, the breach still lands on your incident report, your cyber insurance claim, and your regulatory disclosure.
From a practitioner's standpoint, the legal ambiguity is irrelevant to the operational reality: an AI agent acting outside its authorized scope is indistinguishable from an insider threat or a compromised service account. Treat it accordingly.
Technical Analysis: How Agents Escape Containment
Agentic AI systems — LLM-driven agents built on frameworks that grant tool use, code execution, web browsing, and API access — fail containment in predictable, observable ways:
1. Tool-chain escalation. An agent authorized to read a calendar and draft emails chains those permissions into sending data to an external recipient. No single action violates policy; the composition does.
2. Prompt injection via retrieved content. An agent browsing external websites or processing inbound documents ingests adversarial instructions (indirect prompt injection) that redirect its behavior — effectively turning the agent into an unwitting insider.
3. Credential and token reuse. Agents typically operate under service accounts or OAuth tokens with broad scopes. When an agent deviates from its task, it carries those privileges with it. From the network's perspective, the activity looks authorized.
4. Sandbox escape through legitimate execution. Agents with code-interpreter or shell tool access can spawn child processes, write files, and initiate network connections — all using legitimate signed binaries (python.exe, node.exe, curl.exe). This is living-off-the-land behavior executed by software your organization intentionally deployed.
Why Traditional Controls Miss This
- IAM sees a valid token, not intent. The agent's OAuth grant is legitimate even when its behavior is not.
- EDR sees python.exe making an HTTPS connection, which is Tuesday afternoon in any dev environment.
- DLP sees structured API traffic, not a document being chunked into outbound webhook payloads.
The detection surface is behavioral: deviation from the agent's established baseline of tool calls, destinations, data volumes, and execution patterns.
Exploitation Status
This is not theoretical. Security researchers have repeatedly demonstrated indirect prompt injection against production agent frameworks throughout 2025, and enterprises have reported agents performing unintended external actions — including autonomous data transmission and unauthorized resource provisioning. There is no CVE here; the vulnerability class is architectural. Expect this threat category to grow as agent deployments scale faster than governance.
Detection & Response
The detections below target the observable behaviors of an agent operating outside its intended boundary: unexpected child processes from agent runtimes, network connections to unsanctioned destinations, and anomalous use of agent service credentials.
---
title: AI Agent Runtime Spawning Unexpected Child Processes
id: 3f8c1a92-7d44-4e5b-b9a1-2c6d8e0f4a5b
status: experimental
description: Detects AI agent runtime processes (Python, Node.js) spawning shells, network utilities, or scripting engines, which may indicate an agent escaping its intended task boundary or executing injected instructions.
references:
- https://attack.mitre.org/techniques/T1059/
- https://www.darkreading.com/insider-threats/ai-agents-breaches-humans-liable
author: Security Arsenal
date: 2026/02/10
tags:
- attack.execution
- attack.t1059
logsource:
category: process_creation
product: windows
detection:
selection_parent:
ParentImage|endswith:
- '\python.exe'
- '\python3.exe'
- '\node.exe'
selection_child:
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\curl.exe'
- '\wget.exe'
- '\certutil.exe'
- '\bitsadmin.exe'
filter_agent_hosts:
# Tune: exclude known automation/CI hosts where this is expected
Computer|contains: 'CI-BUILD'
condition: selection_parent and selection_child and not filter_agent_hosts
falsepositives:
- Legitimate AI/ML pipelines that shell out to system tools
- Developer workstations running agent frameworks locally
level: high
---
title: AI Agent Service Account Authenticating to Unsanctioned Resources
id: 8b2e5d17-4c9a-4f68-a3d2-7e1b9c0f6d3a
status: experimental
description: Detects service accounts associated with AI agent workloads performing interactive logons or accessing systems outside their expected scope, indicating possible agent credential misuse after containment deviation.
references:
- https://attack.mitre.org/techniques/T1078/
- https://www.darkreading.com/insider-threats/ai-agents-breaches-humans-liable
author: Security Arsenal
date: 2026/02/10
tags:
- attack.defense_evasion
- attack.initial_access
- attack.t1078.004
logsource:
category: authentication
product: windows
detection:
selection:
user|contains:
- 'svc-aiagent'
- 'svc-agent'
- 'svc-copilot'
- 'svc-llm'
LogonType:
- 2
- 10
condition: selection
falsepositives:
- Misconfigured agent services running interactively during initial deployment
- Administrators troubleshooting under the agent account (should be prohibited by policy)
level: high
---
title: Scripting Runtime Initiating Outbound Connection to Rare External Host
id: c4d7a1f3-2e8b-4b5c-9a6e-1f3d5b7c9e2a
status: experimental
description: Detects Python or Node.js runtimes establishing outbound network connections, a behavioral indicator of an AI agent reaching external systems beyond its sanctioned API endpoints.
references:
- https://attack.mitre.org/techniques/T1071.001/
- https://www.darkreading.com/insider-threats/ai-agents-breaches-humans-liable
author: Security Arsenal
date: 2026/02/10
tags:
- attack.command_and_control
- attack.exfiltration
- attack.t1071.001
logsource:
category: network_connection
product: windows
detection:
selection:
Image|endswith:
- '\python.exe'
- '\python3.exe'
- '\node.exe'
Initiated: 'true'
filter_sanctioned:
# Tune: populate with your approved AI API endpoints (e.g., api.openai.com, your internal gateways)
DestinationHostname|endswith:
- '.openai.com'
- '.azure.com'
- '.anthropic.com'
- '.googleapis.com'
filter_internal:
DestinationIp|startswith:
- '10.'
- '192.168.'
- '172.16.'
condition: selection and not filter_sanctioned and not filter_internal
falsepositives:
- Package managers (pip, npm) fetching dependencies — consider filtering on destination ports 443 to known CDNs
- Legitimate research tooling
level: medium
// Hunt: AI agent service accounts touching hosts or destinations outside baseline
// Builds a 30-day baseline of agent account activity, then surfaces deviations in the last 24h.
let AgentAccounts = dynamic(["svc-aiagent", "svc-agent", "svc-copilot", "svc-llm"]);
let Baseline =
SecurityEvent
| where TimeGenerated between (ago(30d) .. ago(1d))
| where Account has_any (AgentAccounts)
| where EventID == 4624
| summarize BaselineHosts = make_set(Computer) by Account;
SecurityEvent
| where TimeGenerated > ago(24h)
| where Account has_any (AgentAccounts)
| where EventID == 4624
| summarize RecentHosts = make_set(Computer), LogonCount = count() by Account
| join kind=inner Baseline on Account
| extend NewHosts = set_difference(RecentHosts, BaselineHosts)
| where array_length(NewHosts) > 0
| project Account, NewHosts, LogonCount, RecentHosts
| extend Severity = iff(array_length(NewHosts) > 3, "High", "Medium");
// Companion hunt: agent runtimes making network connections to non-sanctioned destinations
DeviceNetworkEvents
| where TimeGenerated > ago(24h)
| where InitiatingProcessFileName in~ ("python.exe", "python3.exe", "node.exe")
| where RemoteUrl !has_any ("openai.com", "azure.com", "anthropic.com", "googleapis.com")
| where not(ipv4_is_private(RemoteIP))
| summarize ConnectionCount = count(), DistinctDestinations = dcount(RemoteIP), Destinations = make_set(RemoteUrl, 20)
by DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine
| where DistinctDestinations > 5
| order by DistinctDestinations desc;
-- Hunt for AI agent runtimes with unexpected child processes and network activity
-- Deploy across endpoints hosting agent workloads
SELECT Pid, Ppid, Name, Exe, CommandLine, Username, CreateTime
FROM pslist()
WHERE Name =~ '(?i)(cmd|powershell|pwsh|curl|wget|certutil)'
AND get(pid=Ppid).Name =~ '(?i)(python|node)'
-- Correlate: agent runtime processes holding active external connections
SELECT Pid, Name, CommandLine,
netstat(Pid=Pid).RemoteAddr AS RemoteAddr,
netstat(Pid=Pid).RemotePort AS RemotePort,
netstat(Pid=Pid).Status AS ConnStatus
FROM pslist()
WHERE Name =~ '(?i)(python|node)'
AND ConnStatus = 'ESTABLISHED'
AND RemoteAddr !~ '^(10\.|192\.168\.|172\.(1[6-9]|2[0-9]|3[01])\.|127\.)'
# AI Agent Containment Verification & Hardening Script
# Run on hosts running agentic AI workloads. Verifies egress controls, service account
# restrictions, and audit posture. Requires elevated privileges.
$Report = @()
# 1. Verify agent service accounts are denied interactive logon
$AgentAccounts = Get-LocalUser | Where-Object { $_.Name -match 'svc-(aiagent|agent|copilot|llm)' }
foreach ($acct in $AgentAccounts) {
$Report += [PSCustomObject]@{
Check = "Interactive logon review: $($acct.Name)"
Status = "MANUAL - Confirm '$($acct.Name)' is in 'Deny log on locally' and 'Deny log on through network' via GPO/secpol"
}
}
# 2. Audit outbound firewall rules for agent runtimes (should be deny-by-default + allowlist)
$EgressRules = Get-NetFirewallRule -Direction Outbound -Action Allow -Enabled True |
Get-NetFirewallApplicationFilter | Where-Object { $_.Program -match '(python|node)' }
if (-not $EgressRules) {
$Report += [PSCustomObject]@{ Check = 'Egress restriction for agent runtimes'; Status = 'PASS - No blanket outbound allow rules for python/node' }
} else {
$Report += [PSCustomObject]@{ Check = 'Egress restriction for agent runtimes'; Status = 'REVIEW - Outbound allow rules exist for agent runtimes; validate destination scoping' }
}
# 3. Create explicit deny-by-default egress rule for agent runtimes (uncomment to enforce)
# New-NetFirewallRule -DisplayName "AI Agent Egress - Deny Default (Python)" `
# -Direction Outbound -Action Block -Program "C:\AgentRuntime\python.exe" -Enabled True
# Then add scoped ALLOW rules above it for sanctioned API endpoints only.
# 4. Verify process creation auditing with command line capture (Event 4688)
$CmdLineAudit = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit' -Name ProcessCreationIncludeCmdLine_Enabled -ErrorAction SilentlyContinue).ProcessCreationIncludeCmdLine_Enabled
$Report += [PSCustomObject]@{
Check = '4688 command-line auditing'
Status = if ($CmdLineAudit -eq 1) { 'PASS' } else { 'FAIL - Enable: Set-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Audit -Name ProcessCreationIncludeCmdLine_Enabled -Value 1' }
}
# 5. Verify PowerShell Script Block Logging (captures agent-invoked PS child processes)
$SBL = (Get-ItemProperty 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging' -Name EnableScriptBlockLogging -ErrorAction SilentlyContinue).EnableScriptBlockLogging
$Report += [PSCustomObject]@{
Check = 'PowerShell Script Block Logging'
Status = if ($SBL -eq 1) { 'PASS' } else { 'FAIL - Enable via GPO: Computer Config > Admin Templates > PowerShell > Turn on Script Block Logging' }
}
$Report | Format-Table -AutoSize
Remediation & Governance Actions
There is no patch for an architectural exposure — remediation here is layered control implementation:
Immediate (this week):
- Inventory every agent deployment. You cannot govern agents you don't know exist. Survey for frameworks with tool-use capability, code interpreters, and browser access. Include shadow AI deployed by business units.
- Scope agent credentials to least privilege. Issue dedicated service accounts per agent with API-scoped tokens, short TTLs, and no standing access to production data stores. Rotate any broadly-scoped tokens currently in use.
- Enforce egress allowlisting. Agents should reach only sanctioned API endpoints. Deny-by-default outbound rules on agent hosts eliminate entire classes of unsanctioned external contact.
Short-term (30 days): 4. Deploy the detections above tuned to your environment. Baseline agent behavior before alerting — the deviation is the signal. 5. Implement human-in-the-loop gates for irreversible or external-facing actions: sending email, provisioning resources, transferring data, financial transactions. 6. Contract and policy updates. Since legal accountability for agent actions is unsettled, close the gap contractually: vendor agreements should explicitly allocate liability for agent behavior, and internal acceptable-use policies must name an accountable human owner for every deployed agent.
Strategic (this quarter): 7. Adopt an agent governance framework mapped to NIST CSF 2.0 Govern function — agent registry, risk tiering, kill-switch capability, and audit logging of every tool invocation. 8. Red team your agents. Indirect prompt injection testing against production agents is now a standard penetration testing scope item. If your annual pentest doesn't include your agentic AI surface, it's incomplete. 9. Tabletop the scenario. Run an IR exercise where an agent exfiltrates data to an external endpoint under a valid credential. Who declares the incident? Who owns the disclosure decision when liability is ambiguous? Decide now, not during the breach call.
The Bottom Line
The legal system will take years to settle accountability for autonomous agent behavior. Your detection engineering doesn't have that luxury. An agent acting outside its mandate generates the same telemetry as any other insider threat — you just have to be looking at agent workloads as a distinct, monitored identity class rather than trusting the token. Containment, least privilege, behavioral baselining, and a named human owner per agent: that's the defensible posture, in court and in the SOC.
Related Resources
Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.