# New AI Attack Path: Agent Instructions Used to Hijack AI Agents via Poisoned MCP Servers and Agent Skills (OX Security 'Plug and Pray' research)

> OX Security analyzed 542,207 open-source components (npm, PyPI, MCP servers, Agent Skills) between July and October 2026 and found attackers can hijack AI agents through instructions (prompt injection and tool poisoning) rather than executable malware. Prompt injection and tool poisoning appeared in 22% of flagged MCP servers versus 16% for install- or import-time execution.

- **Published:** 2026-11-24T09:50:42Z
- **Last reviewed:** 2026-11-24T09:50:42Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-6776
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-6776.png
- **ID:** TL-2026-6776
- **Severity:** MEDIUM
- **Category:** THREAT_INTEL
- **Status:** MONITORING
- **Detections:** 9 (1 shown free below) · **IOCs:** 6

## Description

OX Security's 'Plug and Pray' research, published 2026-11-23, tracked 542,207 open-source and AI components between July and October 2026 using its OX.Radar early-warning system across four ecosystems: npm, PyPI, MCP servers and Agent Skills. Researchers then investigated the flagged components. The central finding is that an AI agent already holds the permissions an attacker needs; the attacker only has to convince the agent to use them, which can be done with natural-language instructions embedded in tool descriptions, tool responses or Skill files instead of malicious code.

Ecosystem differences were observed. Among flagged MCP servers, prompt injection and tool poisoning appeared in 22% of cases versus 16% for install- or import-time execution. Among flagged npm packages the pattern reverses: execution techniques were six times more common than prompt injection and tool poisoning. None of the 179 flagged Agent Skills executed code at install time, yet 44% contained instructions directing agents to send data out (the sample is small).

Trust and verification gaps compound the risk. A source owner could be identified for 69.8% of MCP servers versus 92.8% of npm packages. Of 834 flagged MCP servers, 67% ran on publisher-controlled infrastructure whose deployed code researchers could not verify, and another 16% served files that differed from what publishers declared (more than 80% had a code-verification problem). 82% of researcher-confirmed malicious components were malicious in their first observed version, and two publisher accounts were responsible for 44% of flagged MCP servers, one of them publishing 2,364 servers in 17 days. OX states the sample is small, the ecosystem young, and the figures directional; flagged components are not necessarily malicious and the findings do not establish that every weakness has been exploited.

The mechanism aligns with OWASP's description of MCP Tool Poisoning, an indirect prompt injection attack rooted in a trust gap between connect-time review of tool descriptions and runtime tool responses entering the LLM context unchecked. Microsoft's June 2026 guidance describes the same class as tool description poisoning: a silent metadata change that the agent reads as instructions, can be re-trusted without re-approval, and results in data exfiltration to an attacker-controlled endpoint while default configurations may raise no alert. Technique was first disclosed by Invariant Labs in April 2025 per Microsoft. No CVEs, CVSS scores, named threat actors, or concrete network/file IOCs were published in the OX materials.

## MITRE ATT&CK

- T1608.001 Upload Malware
- T1195 Supply Chain Compromise
- T1195.002 Compromise Software Supply Chain
- T1059 Command and Scripting Interpreter
- T1036 Masquerading
- AML.T0010 AI Supply Chain Compromise
- AML.T0051 LLM Prompt Injection
- AML.T0051.001 LLM Prompt Injection: Indirect
- AML.T0053 AI Agent Tool Invocation

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**MCP Server / npm / PyPI Install-Time Execution - Package Manager Spawning Shell or Downloader (TL-2026-6776)** (`TL-2026-6776-SPL-001`)

Detects the install/import-time execution path described in the OX Security 'Plug and Pray' research (TL-2026-6776): a package-manager or runtime process (npm, npx, pip, uv, node, python) that is the parent of a shell or download utility carrying a URL, encoded command or base64/IEX payload. 16% of flagged MCP servers and a six-fold larger share of flagged npm packages used install- or import-time execution; 82% of confirmed-malicious components were malicious in their first observed version. Maps to T1195.002 (compromise software supply chain) and T1059 (command and scripting interpreter).

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1195.002, T1059
- **Data sources:** sysmon, XmlWinEventLog:Microsoft-Windows-Sysmon/Operational, DeviceProcessEvents
- **Severity:** high
- **Confidence:** medium

### Splunk SPL

````spl
index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1 earliest=-24h parent_process_name IN ("npm.exe","npx.exe","node.exe","pnpm.exe","yarn.exe","pip.exe","pip3.exe","python.exe","python3.exe","uv.exe","uvx.exe") process_name IN ("cmd.exe","powershell.exe","pwsh.exe","curl.exe","wget.exe","certutil.exe","bitsadmin.exe","mshta.exe","wscript.exe","cscript.exe") (CommandLine="*http://*" OR CommandLine="*https://*" OR CommandLine="* -enc*" OR CommandLine="*Invoke-WebRequest*" OR CommandLine="*base64*" OR CommandLine="*IEX*") ```Install/import-time execution from npm, PyPI or MCP server packages - TL-2026-6776, T1195.002, T1059``` | stats count min(_time) as first_seen max(_time) as last_seen values(CommandLine) as child_commands values(parent_process) as parent_commands by host user parent_process_name process_name | convert ctime(first_seen) ctime(last_seen) | sort - count
````

### Microsoft KQL

```kql
DeviceProcessEvents | where Timestamp > ago(24h) | where InitiatingProcessFileName in~ ('npm.exe','npx.exe','node.exe','pnpm.exe','yarn.exe','pip.exe','pip3.exe','python.exe','python3.exe','uv.exe','uvx.exe','npm','node','python','python3','pip','uvx') | where FileName in~ ('cmd.exe','powershell.exe','pwsh.exe','curl.exe','wget.exe','certutil.exe','bitsadmin.exe','mshta.exe','wscript.exe','cscript.exe','sh','bash','curl','wget') | where ProcessCommandLine has_any ('http://','https://',' -enc','Invoke-WebRequest','base64','IEX','| sh','| bash') | project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, SHA256
```

### Sigma

```yaml
title: Package Manager or Runtime Spawning Shell or Downloader (Install-Time Execution)
id: 6f1c2a3e-7b41-4d0a-9a53-1c2e5b7d9f01
status: experimental
description: Detects npm, pip, uv, node or python parent processes spawning a shell or download utility with a URL, encoded command or base64/IEX payload, consistent with install- or import-time execution in malicious npm, PyPI or MCP server packages (TL-2026-6776).
references:
    - https://www.ox.security/blog/plug-and-pray-your-ai-agents-are-taking-orders-from-strangers/
    - https://owasp.org/www-community/attacks/MCP_Tool_Poisoning
author: Threadlinqs Team
date: 2026/11/24
tags:
    - attack.initial-access
    - attack.t1195.002
    - attack.execution
    - attack.t1059
logsource:
    category: process_creation
    product: windows
detection:
    selection_parent:
        ParentImage|endswith:
            - '\npm.exe'
            - '\npx.exe'
            - '\node.exe'
            - '\pnpm.exe'
            - '\yarn.exe'
            - '\pip.exe'
            - '\pip3.exe'
            - '\python.exe'
            - '\uv.exe'
            - '\uvx.exe'
    selection_child:
        Image|endswith:
            - '\cmd.exe'
            - '\powershell.exe'
            - '\pwsh.exe'
            - '\curl.exe'
            - '\wget.exe'
            - '\certutil.exe'
            - '\bitsadmin.exe'
            - '\mshta.exe'
    selection_cli:
        CommandLine|contains:
            - 'http://'
            - 'https://'
            - ' -enc'
            - 'Invoke-WebRequest'
            - 'base64'
            - 'IEX'
    condition: selection_parent and selection_child and selection_cli
falsepositives:
    - Legitimate build scripts and postinstall hooks that download binaries (node-gyp, playwright, puppeteer)
    - Developer workstations running python or node tooling that shells out to curl
level: high
```

**Known false positives:**

- Legitimate npm postinstall / node-gyp / playwright scripts that download binaries via curl or PowerShell
- Developer or CI build scripts where python or node invokes cmd.exe with a download URL

**Tuning notes:** Scope to developer and AI-agent hosts first. Exclude known build agents and signed internal installers by host or user. Adjust the parent list for Linux (node, python3, pip, sh, bash) if Sysmon for Linux is deployed. Raise severity when the child command line contains an IP-literal URL or base64 blob.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- Unpinned Remote MCP Server Launch via npx -y / uvx / pipx run (locked: unlock with TL Creds)
- MCP Tool Description Changed After Approval (Tool Description Poisoning / Rug Pull) (locked: unlock with TL Creds)
- Prompt Injection Directives in MCP Tool Descriptions or Tool Responses (locked: unlock with TL Creds)
- Shell or Download Utility Spawned by MCP Server Process (Agent Tool Invocation Abuse) (locked: unlock with TL Creds)
- MCP Server Runtime Contacting Exfiltration or Out-of-Band Collection Services (locked: unlock with TL Creds)
- Remote MCP Server Registered via CLI (mcp add with HTTP/SSE URL) (locked: unlock with TL Creds)
- MCP Config or Agent Skill File Written by Scripting or Package Process (locked: unlock with TL Creds)
- MCP Server Runtime Process Connecting to New External Destination (Agent Data Exfiltration) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sources

- [Plug and Pray: Your AI Agents Are Taking Orders From Strangers - OX Security](https://www.ox.security/blog/plug-and-pray-your-ai-agents-are-taking-orders-from-strangers/)
- [Plug and Pray: How AI Is Changing Software Supply Chain Attacks - OX Security report](https://www.ox.security/reports/plug-and-pray-how-ai-is-changing-software-supply-chain-attacks/)
- [AI Agents Are Taking Orders From Strangers, OX Security Research Finds - PR Newswire](https://www.prnewswire.com/news-releases/ai-agents-are-taking-orders-from-strangers-ox-security-research-finds-302948335.html)
- [Researchers Find a New AI Attack Path: Agent Instructions - Infosecurity Magazine](https://www.infosecurity-magazine.com/news/researchers-new-ai-attack-path/)
- [MCP Tool Poisoning - OWASP Community](https://owasp.org/www-community/attacks/MCP_Tool_Poisoning)
- [Securing AI agents: When AI tools move from reading to acting - Microsoft Security Blog](https://www.microsoft.com/en-us/security/blog/2026/06/30/securing-ai-agents-ai-tools-move-from-reading-acting/)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-6776
