Skip to content

Forensic Visibility of Malicious Model Context Protocol (MCP) Servers: An Empirical Study Across Agent and Kernel Trust Boundaries

Cesar R. Beltrán-Hernández

cs.CR

Abstract

The Model Context Protocol (MCP) lets large language model (LLM) agents invoke external tools, which also exposes them to malicious servers. Previous work has measured whether such attacks are successful. We instead investigate what forensic evidence they leave behind and where it can be found, using a testbed of three virtual machines running document summarization tasks in which we instrumented two victim-side trust boundaries (a user-space agent callback and a kernel-level file/network audit). We tested seven models against two exfiltration mechanisms: server-side credential theft over the network (Build A) and disclosure induced by a compromised tool description (Build B). In Build A, a log on the attacker's machine confirmed every delivery. After 420 attacks and 105 negative controls, neither boundary captured both mechanisms. The agent log recorded file access in only one of the 120 successful Build A executions, and that read came from a different process than the one that sent the data. The kernel audit, however, showed in all 120 executions that the same process opened the file and attempted the connection to the attacker. In Build B, as in Build A, whether any evidence existed depended on the model's behavior. In the 103 successful Build B executions, the agent callback and the kernel recorded the credential read, and the final response contained both credential values, but nothing reached the attacker. We sealed the campaign with a hash chain anchored and signed outside the victim host; tampering tests detected both chain reconstruction and receipt forgery.

Create a lesson

Metadata

Comments
30 pages, 2 figures, 7 tables. Submitted to Forensic Science International: Digital Investigation