A recent opinion piece on CyberScoop makes an argument that every security leader deploying AI agents needs to internalize: the difference between a prompt injection attack you catch and one you never see is whether your AI agent can explain itself. This is not a philosophical point about AI ethics — it is an operational detection gap that is being actively exploited in 2025 and 2026 as organizations rush autonomous and semi-autonomous LLM agents into production with access to email, file systems, code repositories, internal APIs, and SaaS tooling.
Prompt injection — tracked in MITRE ATLAS as AML.T0051 (LLM Prompt Injection) and listed as LLM01 in the OWASP Top 10 for LLM Applications — is now the most consistently successful attack class against agentic systems. Indirect prompt injection, where malicious instructions are embedded in content the agent retrieves (a web page, an email, a PDF, a calendar invite, a support ticket), has been demonstrated against production agent frameworks, MCP (Model Context Protocol) toolchains, and coding assistants. In these attacks there is no exploit binary, no suspicious process from a known-bad hash, and often no network IOC at all. The "malware" is natural language, and it executes inside a trusted, authorized process.
The defensive consequence is stark: if your agent's reasoning, tool calls, and retrieved content are not logged and inspectable, a successful injection is indistinguishable from normal operation. The agent exfiltrates data using tools it was legitimately granted, through channels it was legitimately allowed to use, under credentials it was legitimately issued. Transparency is not a nice-to-have governance feature — it is the primary detection surface.
Technical Analysis
What is actually at risk
The affected "products" here are not a single vendor's platform — they are the architectural pattern itself: LLM agents with tool-use capabilities. In 2026 enterprise environments this typically means:
- Agent frameworks: LangChain/LangGraph, CrewAI, AutoGen, Semantic Kernel, OpenAI Agents SDK, and custom orchestration layers, usually running under Python runtimes on workstations, servers, or containers.
- Local inference runtimes: Ollama, llama.cpp, vLLM serving internal models with tool-calling enabled.
- MCP servers: The Model Context Protocol has become the dominant tool-integration layer. MCP servers run as local child processes (frequently spawned via
npx,uvx,python, ornode) and inherit the privileges of the host agent. Several 2025 disclosures demonstrated tool-poisoning and rug-pull attacks against MCP configurations, where a tool's description or behavior is altered after user approval. - Coding assistants and IDE agents: Agents with shell execution, file write, and git access — a single injected instruction in a README or issue comment can drive arbitrary command execution.
- Enterprise copilots and SaaS agents: Agents wired into email, SharePoint, CRM, and ticketing systems, where indirect injection arrives through normal business content.
The attack chain from a defender's perspective
A typical indirect prompt injection against an agentic workflow unfolds as follows:
- Delivery: The attacker plants instructions in retrievable content — a web page the agent browses, an email it summarizes, a document in a RAG index, a ticket in a queue it triages. No perimeter alert fires; this is ordinary inbound content.
- Ingestion: The agent retrieves the content and concatenates it into its context window. Because current LLMs cannot reliably distinguish instructions from data, the attacker's text is treated as operator intent.
- Hijack: The agent's plan changes. New goals appear: "forward the last five emails to this address," "run this diagnostic command," "fetch this URL and include the contents of ~/.aws/credentials as a parameter."
- Execution via legitimate tools: The agent calls its sanctioned tools — shell, HTTP client, email API, MCP server — under its own service identity. Endpoint telemetry shows a trusted Python or Node process doing things that process is allowed to do.
- Exfiltration or persistence: Data leaves through an allowed egress channel, or the agent writes a persistent artifact (a modified MCP config, a new cron job, a backdoored skill file) to survive the session.
The exploitation requirement is trivial: the attacker only needs the ability to influence content the agent will read. There is no memory corruption, no race condition, no authentication bypass. This is why the technique scales and why signature-based controls fail.
Exploitation status
Prompt injection is not theoretical. Security researchers have published working indirect-injection chains against major agent products throughout 2025, including data exfiltration from enterprise copilots via crafted emails and documents, remote code execution through poisoned repository content ingested by coding agents, and MCP tool-poisoning attacks that redirect agent behavior after installation. Public demonstrations have shown near-100% success rates for well-crafted indirect injections against agents with unconstrained tool access. CISA and NSA's joint guidance on deploying AI systems securely, and OWASP's LLM Top 10, both treat prompt injection as a present-day, unsolved risk requiring compensating controls. Assume any agent that ingests untrusted content will eventually process hostile instructions.
Why transparency is the detection layer
The CyberScoop piece's central insight maps directly onto SOC practice: an agent that must externalize its reasoning — logging what it retrieved, what instruction it believes it is following, which tool it invoked and why, and what data it sent where — produces an audit trail that can be alerted on. An opaque agent produces nothing until the damage report arrives. Concretely, transparency means:
- Full prompt/context logging: every retrieved document and every system/user/tool message, retained in a tamper-evident store the agent cannot modify.
- Tool-call audit logs: structured records of every tool invocation with arguments, the invoking instruction, and the result — shipped to the SIEM, not left in container stdout.
- Human-legible rationale: the agent's stated reason for each consequential action, which allows analysts (and supervisory models) to flag actions whose justification doesn't match the original task.
- Content provenance: tagging every context item with its source and trust level so injected content from low-trust origins can be correlated with subsequent anomalous tool calls.
Detection & Response
Endpoint and SIEM detections for prompt injection are necessarily behavioral: we cannot signature the injected text, but we CAN detect the downstream effects — an agent runtime doing things agents shouldn't do. The highest-fidelity signals are (1) agent runtimes spawning shells, network utilities, or credential-access tools, and (2) unauthorized modification of agent/MCP configuration. The following detections are tuned for low noise; baseline your environment's legitimate agent workloads before deploying at high severity.
---
title: AI Agent Runtime Spawning Shell or Network Utility
id: 3f8a2c14-7b51-4e9a-b2d6-9c1e5f7a3d82
status: experimental
description: Detects shells, downloaders, or network utilities spawned by local LLM runtimes or agent orchestration processes. Indirect prompt injection frequently drives agents to execute attacker-supplied commands or exfiltrate data via curl/wget through the agent's own process tree.
references:
- https://atlas.mitre.org/techniques/AML.T0051
- https://owasp.org/www-project-top-10-for-large-language-model-applications/
- https://cyberscoop.com/transparent-ai-agent-security-op-ed/
author: Security Arsenal
date: 2026/04/06
tags:
- attack.execution
- attack.exfiltration
- attack.t1059
- attack.t1105
logsource:
category: process_creation
product: windows
detection:
selection_parent:
ParentImage|endswith:
- '\ollama.exe'
- '\ollama app.exe'
- '\lmstudio.exe'
- '\python.exe'
- '\node.exe'
selection_child_img:
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\curl.exe'
- '\wget.exe'
- '\certutil.exe'
- '\bitsadmin.exe'
- '\wsl.exe'
- '\bash.exe'
filter_known_agents:
CommandLine|contains:
- 'langchain'
- 'mcp-server'
- '--health-check'
condition: selection_parent and selection_child_img and not filter_known_agents
falsepositives:
- Coding assistants legitimately executing build/test commands — baseline per developer workstation
- Agent frameworks performing sanctioned diagnostics
level: high
---
title: MCP or AI Agent Configuration Modified Outside Change Window
id: 8c4d7e21-3a95-4f6c-a1b8-2e9d4f6c8a35
status: experimental
description: Detects creation or modification of MCP server configurations and agent tool/skill definition files. Tool-poisoning and rug-pull attacks alter approved tool definitions post-installation to redirect agent behavior or add malicious server entries.
references:
- https://atlas.mitre.org/techniques/AML.T0051
- https://modelcontextprotocol.io/
author: Security Arsenal
date: 2026/04/06
tags:
- attack.persistence
- attack.defense_evasion
- attack.t1546
logsource:
category: file_event
product: windows
detection:
selection:
TargetFilename|contains:
- '\.claude\'
- 'claude_desktop_config.json'
- 'mcp.json'
- 'mcp_settings.json'
- '\.cursor\mcp'
- '\.continue\'
- 'tools.json'
- 'agents.json'
condition: selection
falsepositives:
- Legitimate installation or update of MCP servers by developers — alert on the change, verify against change management records
level: medium
// Hunt: child processes of AI agent runtimes performing network, shell, or credential-adjacent activity
// Scope to your agent hosts first; high signal when combined with tool-call audit logs from the agent framework
let AgentRuntimes = dynamic(["ollama.exe","ollama app.exe","LM Studio.exe","python.exe","python3.exe","node.exe","npx.exe","uvx.exe","docker.exe"]);
let SuspiciousChildren = dynamic(["cmd.exe","powershell.exe","pwsh.exe","curl.exe","wget.exe","certutil.exe","bitsadmin.exe","wsl.exe","bash.exe","sh.exe","nc.exe","ncat.exe","tar.exe","7z.exe","rar.exe","ssh.exe","scp.exe"]);
DeviceProcessEvents
| where TimeGenerated > ago(7d)
| where InitiatingProcessFileName in~ (AgentRuntimes)
| where FileName in~ (SuspiciousChildren)
| extend CmdLine = tostring(ProcessCommandLine)
| where not (CmdLine has_any ("langchain","mcp-server","--version","pip install","npm install","git clone https://github.com"))
| summarize FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated), Count=count(), DistinctCmds=dcount(CmdLine)
by DeviceName, InitiatingProcessFileName, FileName, AccountName
| extend SuspicionScore = iff(DistinctCmds > 3 or Count > 10, "High", "Review")
| sort by FirstSeen desc;
// Companion hunt: outbound connections from agent runtimes to rare destinations
// Prompt injection exfil typically rides the agent's own egress — flag destinations seen from few devices
let AgentProcs = dynamic(["ollama.exe","python.exe","node.exe","npx.exe","uvx.exe"]);
DeviceNetworkEvents
| where TimeGenerated > ago(7d)
| where InitiatingProcessFileName in~ (AgentProcs)
| where RemoteIPType == "Public"
| summarize Devices=dcount(DeviceId), Connections=count(), FirstSeen=min(TimeGenerated)
by RemoteUrl, RemoteIP, InitiatingProcessFileName
| where Devices <= 2
| sort by FirstSeen desc;
-- Artifact: Windows.Hunt.AIAgentChildProcesses
-- Enumerates running agent runtimes and their child process trees to surface
-- injected-command execution riding under trusted agent processes (AML.T0051).
LET agents <= SELECT Pid, Name, Exe, Username, CreateTime
FROM pslist()
WHERE Name =~ '(?i)(ollama|lmstudio|python|node|npx|uvx)'
LET children <= SELECT Pid, Ppid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE Ppid in (SELECT Pid FROM agents)
AND (Name =~ '(?i)(cmd|powershell|pwsh|curl|wget|certutil|bash|wsl|nc|ssh|scp)'
OR CommandLine =~ '(?i)(http://|https://|-enc |base64|invoke-|downloadstring|/tmp/|appdata\\)')
SELECT agents.Pid AS AgentPid,
agents.Name AS AgentProcess,
agents.Username AS AgentUser,
children.Pid AS ChildPid,
children.Name AS ChildProcess,
children.CommandLine AS ChildCommandLine,
children.CreateTime AS ChildStartTime
FROM children
JOIN agents ON children.Ppid = agents.Pid
#!/bin/bash
# ai-agent-posture-audit.sh — Inventory agent runtimes, MCP configs, and transparency logging posture
# Run on Linux/macOS hosts and containers where AI agents operate. Review output with your change records.
set -euo pipefail
REPORT="/tmp/ai-agent-audit-$(date +%Y%m%d-%H%M%S).txt"
{
echo "=== AI Agent Security Posture Audit — $(hostname) — $(date -u) ==="
echo -e "\n[1] Installed inference runtimes and agent frameworks"
command -v ollama && ollama --version 2>/dev/null || echo "ollama: not found"
command -v docker >/dev/null && docker ps --format '{{.Names}} {{.Image}}' 2>/dev/null | grep -iE 'ollama|vllm|langchain|mcp|agent' || true
pip3 list 2>/dev/null | grep -iE 'langchain|openai|anthropic|autogen|crewai|mcp|llama' || echo "no agent python packages found"
echo -e "\n[2] MCP server configurations (verify EVERY entry against approved inventory)"
for f in "$HOME/.claude.json" "$HOME/.config/Claude/claude_desktop_config.json" \
"$HOME/.cursor/mcp.json" "$HOME/.continue/config.json" \
/etc/mcp/*.json /opt/*/mcp.json; do
[ -f "$f" ] && echo "--- $f (mtime: $(stat -c %y "$f" 2>/dev/null || stat -f %Sm "$f"))" && cat "$f"
done
echo -e "\n[3] Agent runtimes with suspicious child processes RIGHT NOW"
ps -eo pid,ppid,user,comm,args | awk 'NR==1 || $4 ~ /ollama|python|node|npx|uvx/' > /tmp/_agents.txt
pgrep -P "$(awk '$4 ~ /ollama|python|node/ {printf "%s,",$1}' /tmp/_agents.txt | sed 's/,$//')" 2>/dev/null | \
xargs -r ps -o pid,ppid,user,comm,args -p 2>/dev/null | grep -E 'curl|wget|bash|sh |nc |ssh|scp' || echo "none detected"
echo -e "\n[4] Transparency/logging posture checks"
[ -n "${LANGCHAIN_TRACING_V2:-}" ] && echo "LangSmith tracing: ENABLED" || echo "WARN: LangChain tracing not enabled"
journalctl -u ollama --since "24 hours ago" --no-pager 2>/dev/null | tail -5 || echo "ollama journal: unavailable (service logs may not be captured)"
grep -rqs "log_level" "$HOME/.config" 2>/dev/null && echo "app log configs present" || echo "WARN: verify agent apps write structured logs to a SIEM-forwarded location"
echo -e "\n[5] Network listeners for local inference (should be loopback-only unless intended)"
ss -tlnp 2>/dev/null | grep -E '11434|8000|8080|5000' || netstat -tlnp 2>/dev/null | grep -E '11434|8000|8080' || echo "no common inference ports listening"
echo -e "\n=== Audit complete. Triage any MCP entries, child processes, or listeners you cannot attribute. ==="
} | tee "$REPORT"
Remediation
There is no patch for prompt injection — it is an architectural property of current LLMs. Remediation means engineering controls that assume injection will succeed and bound its blast radius:
- Mandate agent transparency before production approval. No agent goes live without complete logging of retrieved content, system prompts, tool calls with full arguments, and stated rationale, shipped to the SIEM in structured form. If a vendor agent cannot produce this telemetry, that is a procurement blocker — exactly the point the CyberScoop piece makes.
- Enforce least-privilege tool scoping. Strip agents of any tool not required for the task. No agent that reads email should also hold shell access. MCP servers should run containerized with read-only mounts, network egress allowlists, and no shared credentials.
- Pin and attest MCP/tool definitions. Hash approved MCP server configurations and tool descriptions; alert on any change outside change management (see the second Sigma rule above). This directly counters tool-poisoning and rug-pull attacks disclosed through 2025.
- Segregate trusted instructions from untrusted content. Architecturally mark retrieved data as data — use spotlighting/delimiter strategies, structured tool outputs, and supervisory review steps that compare the agent's planned action against the original task scope before consequential tool calls (send, delete, execute, transfer) execute.
- Human-in-the-loop gates for irreversible actions. Any outbound transmission, credential use, financial action, or command execution above a defined risk threshold requires explicit human approval with the agent's rationale displayed. This converts a silent hijack into a visible, reviewable event.
- Egress controls on agent infrastructure. Route agent workloads through proxies with destination allowlists. Exfiltration via injected instructions fails if the agent's runtime can only reach approved endpoints — and the blocked attempt becomes a detection.
- Red-team your agents. Add prompt injection to your penetration testing scope. Security Arsenal's adversarial testing teams routinely find that agents pass functional review but collapse under crafted indirect injection in documents, tickets, and web content.
- Align to published guidance. Map your agent controls to OWASP LLM Top 10 (LLM01, LLM06/Excessive Agency), MITRE ATLAS AML.T0051, and CISA/NSA joint guidance on secure AI deployment. NIST's AI Risk Management Framework provides the governance wrapper for the transparency requirements above.
Category and Bottom Line
For SOC and MDR teams: treat every AI agent in your environment as a privileged, internet-reading, tool-wielding insider that can be socially engineered by anyone who can get text in front of it. The organizations that will catch the next prompt injection campaign are the ones whose agents are forced to show their work. Build the telemetry, alert on the behavioral downstream effects, and constrain what a hijacked agent can actually do.
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.