为AI代理设计身份绑定授权网关,防止伪造指令执行。
aiAuthZ: Off-Host, Identity-Bound Authorization for AI Agents

- 用HMAC-SHA256签名+一次性随机数+时间窗验证调用者身份。
- 15个模型攻击成功率从38%降至0%,延迟仅0.03毫秒。
- 适合需严格权限控制的金融、医疗等高风险AI应用。
AI代理基于无法验证的文本发出工具调用,任何控制部分上下文的实体都可伪造权威性。我评估了15个主流语言模型在八个源于真实代理事件的数据集攻击场景下的表现,发现拒绝率从100%降至38%;最昂贵的模型在价格相差二十倍的情况下仅拒绝一半攻击。本文提出aiAuthZ,一个将安全决策移出代理主机的授权网关。在工具调用前,网关通过每条消息的HMAC-SHA256签名、单次使用随机数和时间窗口验证调用者身份,并执行代理无法读取或修改的角色与参数级策略。每个决策加入SHA-256哈希链审计日志,每次成功调用生成HMAC认证的QR收据,在八种传输通道中平均验证率达94%,25次错误密钥测试无一伪造通过。部署后,15个模型的残余攻击成功率降至0%,决策延迟不超过0.03毫秒。在AgentDojo银行套件中,aiAuthZ阻断所有七次攻击者引导的工具调用,仅误拦一次首次付款;而基线方法允许两次注入成功。在同源事件数据集中九例案例中,aiAuthZ全部阻断,基线仅阻断四例。该网关不阻止模型被误导,但防止被误导的模型越权执行经其路由的每一项调用。实现与全部实验代码已开源至https://github.com/Sports-Vision-Inc/aiAuthZ。
原文摘要 · Abstract (English)
AI agents issue tool calls on the basis of text they cannot verify, so any party who controls part of the context can forge the appearance of authority. I evaluate 15 contemporary language models against eight attack scenarios derived from a published corpus of real agent incidents and find that refusal varies from 100% down to 38% across fully evaluated models; the most expensive model refused only half of the attacks despite a twentyfold price spread. I present aiAuthZ, an authorization gateway that moves the safety decision off the agent's host. Before a tool call executes, the gateway verifies caller identity with a per-message HMAC-SHA256 signature bound to a single-use nonce and a timestamp window, and it evaluates a role-based and argument-level policy that the agent can neither read nor modify. Every decision joins a SHA-256 hash-chained audit log, and each accepted message yields an HMAC-authenticated QR receipt that achieves 94% mean verification across eight transmission channels, with zero forgeries accepted in 25 wrong-key trials. With the gateway in place, residual attack success falls to 0% for all 15 models at no more than 0.03 ms of added decision latency. On the AgentDojo banking suite, aiAuthZ blocks all seven attacker-directed tool calls the evaluated agents emit, at the cost of one legitimate first-time payment, while a spotlighting baseline allows two injections to succeed. Across nine in-scope case studies from the same incident corpus, aiAuthZ blocks nine of nine, against four of nine for a policy baseline without identity binding. The gateway does not prevent a model from being deceived; it prevents a deceived model from acting beyond the verified user's authority on every call routed through it. The implementation and all experiments are released at https://github.com/Sports-Vision-Inc/aiAuthZ.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。