为本地AI助手设计双视图防护,防止隐藏攻击回传
DualView: Preventing Indirect Prompt Injection in Personal AI Agents

- 用双视图机制在用户环境全程追踪恶意数据,保持符号化
- 实测100%拦截间接提示注入攻击,包括存储型攻击
- 无需修改工具逻辑,适合安全敏感的个人智能代理
运行在本地的个人AI代理(如OpenClaw)可自动化完成网页搜索、邮件处理和文件管理等任务。其对网络、文件系统和终端的访问使其易受间接提示注入(IPI)攻击。现有双重大模型防御仅在代理上下文中追踪未受信任数据,当代理保存并重新读取这些数据时,攻击者指令可能被当作可信内容返回,形成存储型IPI。由于这类代理需与人类共享真实环境,忽略此问题的防御不完整。本文提出DualView,将未受信任数据的追踪扩展至用户环境(文件系统、终端、网络及其他代理),通过为每个通道提供双视图实现:AgentView中代理始终看到符号化数据,阻断存储型攻击;HumanView保留原始数据供人和工具使用。DualView通过工具调用路由和视图同步实现跨视图数据一致性,部署为OpenClaw插件,仅依赖工具钩子,无需修改工具逻辑或实现。因设计上隔离未受信任数据,其防护不限于已知攻击模板。在IPI基准测试和PinchBench上的评估显示,DualView成功拦截所有攻击,同时保持接近无保护基线的可用性。
原文摘要 · Abstract (English)
Personal AI agents that run on the user's local machine, such as OpenClaw, automate daily tasks including web search, email, and file management. Their access to computer resources, including the network, file system, and shell, exposes them to indirect prompt injection (IPI) attacks. Prior Dual LLM defenses block IPI by replacing untrusted data with symbols that the agent can reference but not read. However, they track untrusted data only inside the agent's context, so when the agent saves and later rereads untrusted data, that data, possibly an attacker's prompt, can return as trusted data rather than as a symbol, which we call stored IPI. Operating on the user's real environment, which humans and programs share, is what makes agents like OpenClaw practical, and is exactly why a defense that ignores it is incomplete. Preserving symbols in such an environment is hard, because humans and programs need original data. We present DualView, which extends untrusted data tracking from the agent's context to the user's environment, including the file system, shell, network, and other agents, by giving each channel two views. In AgentView, the agent sees untrusted data as symbols even after writing it out and reading it back, blocking stored IPI, while HumanView preserves original data for humans and tools. DualView routes each tool call to the right view and synchronizes data across the two views. DualView deploys as an OpenClaw plugin using only tool hooks, without changing the agent's tool-call logic or tool implementations. Since DualView isolates untrusted data by design, its protection is not limited to known attack templates. In our evaluation on an IPI benchmark and PinchBench, DualView blocked every IPI attack, including stored IPI, while keeping utility close to the unprotected baseline.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。