TRANSMISSION // 2604.04426v2
A Network Watchdog for Hidden MCP Tool Trojans
Source published
A benchmark study finds that malicious code hidden inside MCP tools can evade checks of tool descriptions and outputs. ShieldNet looks instead at network traffic, with strong results on the authors’ test benchmark—but important limits remain.

AI agents can call third-party tools without changing what those tools appear to do. A new preprint tests whether monitoring network activity during tool use can expose hidden malicious behavior that semantic checks miss.
A tool used by an AI agent can look ordinary while quietly doing something else. Its name, description and answer may all seem legitimate, even as code inside the tool probes a network or sends data elsewhere. The paper calls this kind of hidden behavior an MCP Tool Trojan and asks whether monitoring network traffic can reveal it when checks of tool descriptions and outputs cannot.
MCP, or Model Context Protocol, is a standard through which agents discover and call external tools. The authors distinguish a Tool Trojan from tool poisoning: poisoning places instructions in a tool’s description or response for the language model to follow, whereas a Trojan runs malicious code inside the tool itself. In the latter case, the agent need not be tricked into changing its answer or plan. The tool can return the expected result while producing suspicious network activity in the background.
Building a test bench
To study the problem, the researchers created MCPTrojanBench. They injected code for 29 network-visible attack types, drawn from the MITRE ATT&CK framework, into tools from 139 real-world MCP servers. The benchmark contains 25,980 server–tool–attack combinations, including 24,756 trojaned and 1,224 benign instances. The team reports validating malicious behavior by capturing network traffic; a separate verification step used a temporary network “canary” to confirm that an injection ran, then removed it before benchmark traffic was collected.
The proposed detector, ShieldNet, monitors traffic during tool execution rather than relying on tool descriptions or the agent’s conversation. A local proxy decrypts TLS traffic where possible, while a packet-processing stage turns network activity into a time-ordered sequence of structured events. A small, post-trained language model then classifies the trace as benign or malicious. The system can assess a completed trace or examine a rolling window of events while a tool runs.
The evaluation compared ShieldNet with static MCP scanners, judges that inspect agent inputs and outputs, conventional network intrusion-detection systems, and larger language models given network traces. On the authors’ benchmark, scanners and I/O-based checks performed poorly at detecting the injected Trojans. Larger models caught many attacks in network traces but often mislabeled ordinary tools as malicious. ShieldNet scored 0.995 F1 at the trace level with a 0.8% false-positive rate; at the tool level, the paper reports 0.998 F1 and a 2.2% false-positive rate. F1 combines precision and recall, so it is most informative alongside the false-positive rate and the study’s other measures.
The authors also tested generalization. ShieldNet reported 0.998 F1 on held-out server categories and F1 scores from 0.949 to 0.982 on three attack types excluded from training. In a streaming test, a window of 100 events, updated every 50 events, had a 2.9% false-positive rate and a mean alert time of 5.8 seconds after attack completion. Smaller windows alerted sooner but produced more false alarms. These are results on the constructed test settings, not guarantees about performance in every deployment.
What the results do—and do not—show
The approach depends on being able to observe relevant network behavior. The paper focuses on locally run tools whose malicious actions create network-visible effects; remote servers running elsewhere and purely local actions, such as deleting a file, fall outside its stated scope. Its injected payloads trigger synchronously on each invocation, so conditional, delayed or “low-and-slow” behavior remains untested. TLS decryption also requires a system-level proxy and trusted certificate, and the authors describe restricting traffic to prevent some clients from bypassing interception. Those requirements may complicate deployment and raise practical security and privacy questions.
The benchmark is large, but it is still a constructed evaluation: attacks were selected for feasible, observable network effects, and the servers had to build and run in the study’s Linux environment. ShieldNet also produced false positives on some tools that legitimately exchange data with third-party services. The authors propose expected-service allowlists as a possible way to distinguish such traffic. And although the detector is described as lightweight, its reported test implementation used an RTX A6000 GPU; broader hardware and operational tests would help clarify deployment costs.
The paper is a preprint, so its findings should be treated as research claims awaiting independent scrutiny and replication. Within its tested setting, its central contribution is a different place to look for evidence: not only what an agent reads or says, but what its tools actually do on the network. The authors present ShieldNet as a detection layer, not a complete prevention system; blocking malicious actions and covering local behavior remain open challenges.
- AI agent security
- Model Context Protocol
- MCP Tool Trojans
- network monitoring
- software supply chain
- ShieldNet
Reviewed cross-references
These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.
Testing Dependencies in the Context of Their Apps
Shared method: Both papers execute untrusted tool or dependency code and use runtime behavioral observations rather than relying only on package or tool descriptions: ShieldNet analyzes network traffic generated during MCP tool execution, while Preflight records behavior during sandboxed execution of application-referenced dependency functions. Their telemetry, goals, and evaluations differ, so this is a shared dynamic-analysis approach, not evidence that either system validates the other’s results.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2604.04426v2 — Original paper
Excerpt reference:
static/papers/2604.04426v2.md:64-109
Basis: Paper text
Source file SHA-256:c3da6083bfb151f41ce607bc0f4ec5f2b858828d2a2d832db4598ba61046693a2611.31110v1 — Original paper
Excerpt reference:
static/papers/2611.31110v1.md:74-119
Basis: Paper text
Source file SHA-256:79881bc903803bfd4b48920976e09b46d709a1ec75831d6db78819e423e7123f
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
A Signed AI Tool Can Leak Data Through an Approved Service
Source published
Shared keywords: ai agent security, software supply chain
A small AI model screens agent skills—but unfamiliar sources trip it up
Source published
Shared keywords: ai agent security, software supply chain
When AI agents recover, can they lose their safeguards?
Source published
Shared keywords: ai agent security, model context protocol
Testing Dependencies in the Context of Their Apps
Source published
Shared keywords: software supply chain
A benchmark asks whether an entire changing network is having an unusual moment
Source published
Shared keywords: network monitoring