Living-off-the-Agent: Enforcing MCP-to-Kernel Capability Boundaries
Abstract
Autonomous coding agents connected via the Model Context Protocol (MCP) routinely spawn shells, run test suites, edit configuration files, and open network sockets, making normal software engineering look like post-exploitation activity to Endpoint Detection and Response (EDR) tools. We formalize Living-off-the-Agent (LotA) compromises and establish a clear boundary between Class-I cross-boundary attacks (ungrounded secret reads, persistence writes, asynchronous child or IPC escapes, and dormant rule triggers observable at the OS and protocol layers) and Class-II in-envelope semantic attacks (logic bugs in authorized files and data piggybacking over approved endpoints). We present LotAGuard, a sub-millisecond cross-layer runtime monitor for Linux eBPF and Windows Sysmon/ETW built around three mechanisms: (1) incarnation-safe, memory-bounded causal attribution linking MCP tool calls to OS process trees across post-response escapes, rapid PID recycling, deferred server tasks, and multi-week uptime, paired with rarity-weighted contracts and three-tier dispositions; (2) hunk-blame differential lineage tracking persistent rule files (CLAUDE.md, .cursorrules) without taint explosion; and (3) task-level evaluation avoiding paired-OS pseudo-replication. Across verbatim AgentDojo and InjecAgent benchmarks, LotAGuard detects all Class-I attacks (16/16) with zero false positives while leaving Class-II semantic edits (0/4) outside its OS envelope by design. Across 100 SWE-bench Verified engineering tasks, LotAGuard incurs zero blocking false positives and 1% step-up prompts, keeps resident state under 15 KB over a 14-day soak, and substantially outperforms signature EDR, whole-graph provenance, and argument-only guards on real open-source repositories, while delineating where cross-session flow gates and code-diff review are required for adaptive semantic evasions.
Create a lesson
Metadata
- Categories
- cs.CR, cs.AI
- Comments
- 51 pages, 16 figures, 25 tables, 5 listings. Evaluated on Linux eBPF and Windows Sysmon/ETW across SWE-bench Verified, AgentDojo, InjecAgent, real open-source repositories, PID-recycling, and 14-day soak suites. Code and artifacts: https://github.com/jeremy1392/LotAGuard , USENIX Security 2027 target
Related papers
Forensic Visibility of Malicious Model Context Protocol (MCP) Servers: An Empirical Study Across Agent and Kernel Trust Boundaries
Shared title terminologycs.CRCesar R. Beltrán-Hernández
A General-Purpose Policy and Enforcement Layer for Secure Agent Tool Calls
Shared title terminologycs.CRShincheol Lee, Chansu Han, Takeshi Takahashi
SoK: Trust Boundaries Between Agent Commerce Protocols and Crypto Wallets
Shared title terminologycs.CRShengwei You, Aditya Joshi, Andrey Kuehlkamp et al.
From Vendor-Neutral Request to Paid Backend: Procurement Integrity at the Commitment Boundary of AI Coding Agents
Shared title terminologycs.CRJinqian Zhang, Haojun Xia, Shujiang Wu et al.
The Refusal Loop: When Enforcement Undermines Authorization in LLM Agent
Shared title terminologycs.CRDuo Zhou
Refusal Steering Creates Capable and Dangerous Agents
Shared title terminologycs.CRVincent Siu, Vlad Pavlovich, Glenn Grant-Richards et al.