[论文解读] Agent Privilege Separation in OpenClaw: A Structural Defense Against Prompt Injection
论文提出了两种防御机制——带特权分离的代理隔离与 JSON 结构化的代理间通信,以防御提示注入,在联合使用时在 649 次攻击基准测试中实现零 ASR。
Prompt injection remains one of the most practical attack vectors against LLM-integrated applications. We replicate the Microsoft LLMail-Inject benchmark (Greshake et al., 2024) against current generation models running inside OpenClaw, an open source multitool agent platform. Our proposed defense combines two mechanisms: agent isolation, implemented as a privilege separated two-agent pipeline with tool partitioning, and JSON formatting, which produces structured output that strips persuasive framing before the action agent processes it. We run four experiments on the same 649 attacks that succeeded against our single-agent baseline. The full pipeline achieves 0 percent attack success rate (ASR) on the evaluated benchmark. Agent isolation alone achieves 0.31 percent ASR, approximately 323 times lower than the baseline. JSON formatting alone achieves 14.18 percent ASR, about 7.1 times lower. Our ablation study confirms that agent isolation is the dominant mechanism. JSON formatting provides additional hardening but is not sufficient on its own. The defense is structural: the action agent never receives raw injection content regardless of model behavior on any individual input.
研究动机与目标
- 在 LLM 集成代理系统中动机化并形式化提示注入风险。
- 提出两部分防御: (i) 具有分离工具访问的代理隔离,(ii) 通过校验器的 JSON 结构化代理间通信。
- 使用适配 OpenClaw 的 LLMail-Inject 基准测试与单代理基线进行防御评估。
- 通过对 649 个基线成功攻击的消融研究量化各机制的贡献。
提出的方法
- 将代理分为 Reader(无特权工具)与 Actor(具特权工具)以 enforce 最小权限。
- 让 Reader 将原始邮件序列化为经过验证的 JSON 摘要。
- 仅将经清洗的 JSON 输出传递给具有限制工具的 Actor。
- 包含一个轻量级 JSON 校验器,用于在审计模式下标记潜在的注入内容以便测量。
- 比较四种配置:Baseline、JSON 校验器单独使用、Two-Agent(两代理)单独使用,以及 Pipeline(完整防御)。
- 使用在单代理基线中成功的 649 次攻击进行归一化比较。

实验结果
研究问题
- RQ1通过对代理之间的工具级别隔离,可以在多大程度上降低提示注入的成功率?
- RQ2JSON 结构化的代理间通信除了隔离外还能带来哪些额外收益?
- RQ3在多工具的 LLM 代理中,代理隔离是否是对提示注入的主导防御机制?
- RQ4结合防御能否在 OpenClaw 的 LLMail-Inject 基准测试中实现零攻击成功率?
主要发现
- 代理隔离在 649 次基线攻击中实现 0.31% 的 ASR(2 次成功),比基线提升了 323×。
- 全流程(隔离 + JSON 格式化)将 ASR 降至基准中的 0%,相当于无限提升。
- 仅 JSON 格式化将 ASR 降至 14.18%(92 次成功),提升 7.1×,但单独不足以解决所有问题。
- 带隔离的 JSON 校验能消除残留攻击;仅 JSON 无法防止所有注入,突显隔离的优势。
- 在各场景下,数据外泄和 RAG 任务对非隔离防御最具挑战性,但被隔离完全阻止。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。