名称并非对象:针对受损AI编码智能体的对象绑定约束
Names Are Not Objects: Object-Bound Confinement for Compromised AI Coding Agents
AI总结:
针对编码智能体易受提示注入攻击的问题,提出零信任智能体单元(ZTAC),通过对象绑定约束提升安全性,在74种攻击评估中仅漏2种,延迟增加有限,兼顾安全与效率。
摘要:
编码智能体读取任何人都可编写的代码仓库和网页,然后以用户的权限执行操作。提示注入防御降低了模型被操控的可能性,但无法完全阻止,因此模型周边的系统必须包含一个已受损的智能体。针对已部署编码智能体的诸多漏洞都有一个共同原因:某个检查会批准一个名称,比如路径、参数向量或目录,而后续步骤会将该名称映射到不同的对象,比如符号链接指向的文件、选项选定的行为,或是git自行发现的代码仓库。我们提出零信任智能体单元(Zero-Trust Agent Cells, ZTAC)。该单元将智能体运行在内核沙箱中,其访问文件、程序和网络的唯一途径是通往代理的套接字。代理会将每个请求解析为它将要作用的对象,对该对象做出决策,并在使用时检查是否作用于已授权的对象。代理启动的程序运行在根据同一策略编译的沙箱中,批准操作与已解析的对象绑定,且只能使用一次。我们的macOS原型包含3200行可信Rust代码(不含依赖项)。我们使用带有真值预言机的74种攻击对其进行评估,包括10起公开披露事件的复现。工具允许列表会漏掉其中66种攻击,允许列表结合已部署智能体使用的命令沙箱会漏掉56种攻击,而ZTAC仅漏掉2种,这两种攻击均是将秘密编码到允许端点的流量中,另有14种攻击需人工审核。ZTAC完成了46项良性操作中的43项,仅需8次批准提示,覆盖了7个工作流中的4个。无操作代理请求的中位延迟为4.0毫秒,我们测量到的生成程序的延迟比不使用ZTAC时多8.5毫秒至18.4毫秒。
英文摘要:
Coding agents read repositories and web pages that anyone can write, and then act with their user's authority. Prompt-injection defenses make it less likely that the model is steered but do not prevent it, so the system around the model must contain an agent that is already compromised. Many exploits against deployed coding agents share one cause: a check approves a name, such as a path, an argument vector, or a directory, and a later step maps that name to a different object: the file behind a symlink, the behavior an option selects, or a repository that git discovers on its own. We present Zero-Trust Agent Cells (ZTAC). A cell runs the agent in a kernel sandbox whose only route to files, programs, and the network is a socket to a broker. The broker resolves each request to the object it will act on, decides on that object, and checks at use that it is acting on the object it authorized. Programs that the broker starts run in a sandbox compiled from the same policy, and approvals are bound to the resolved object and can be used once. Our macOS prototype has 3.2k lines of trusted Rust code, excluding dependencies. We evaluate it against 74 attacks with ground-truth oracles, including replays of 10 publicly disclosed incidents. A tool allowlist loses 66 of them, and an allowlist combined with the kind of command sandbox that deployed agents use loses 56. ZTAC loses 2, both of which encode a secret into traffic to an allowed endpoint, and holds 14 for review. It completes 43 of 46 benign operations, with 8 approval prompts, and 4 of 7 workflows. A no-op brokered request has a median latency of 4.0 ms, and the spawned programs we measured take 8.5 ms to 18.4 ms longer than without ZTAC.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。