用可信硬件保护LLM API路由,防止中间人攻击
The Proxy Knows Too Much: Sealing LLM API Routers with Attested TEEs
- 将明文处理限制在可信硬件模块中,客户端可验证
- 四类恶意路由攻击均被阻断,本地延迟仅6毫秒
- 适合需高安全性的AI代理和API服务提供商
智能体通过API路由器访问大语言模型(LLMs)。路由器终止客户端传输层安全会话并建立上游独立会话,因此以明文形式持有完整交互内容。这使路由器成为应用层中间人:可篡改工具调用、替换为伪造包、在逃避审计条件下触发攻击,并被动窃取密钥。现有客户端防御易被绕过。我们提出AEGIS,一种无需依赖提供方的可信认证API路由器,其数据路径为客户端可验证的忠实透传。AEGIS将明文处理限制在小型硬件飞地组件内,而认证、调度、计费和管理仍由不可信主机处理。客户端在释放明文前验证飞地。主机既无法读取也无法修改交互内容,明文仅能流向由测量镜像固定的终点。实验显示,四种恶意路由器攻击在明文基线中均成功,但在AEGIS下全部被阻止,包括针对同一边界设计的自适应测试。可信路径仅851行代码,支持三种提供方原生API无转换,且在真实提供方负载与并发下完成所有请求。在种子审计试点中,两个通用编码代理分别发现八处和十处预设的不变性违规。本地中继开销约为每请求六毫秒。
原文摘要 · Abstract (English)
Agents increasingly access large language models (LLMs) through API routers. A router terminates the client's transport-layer security session and opens a separate upstream session, so it holds the full interaction in plaintext. This makes the router an application-layer man-in-the-middle: it can rewrite agent tool calls, swap dependencies for typosquatted packages, trigger attacks only under audit-evading conditions, and passively exfiltrate secrets. Existing client-side defenses are evadable. We propose AEGIS, a provider-transparent attested API router whose data path is a client-verified faithful passthrough. AEGISconfines plaintext handling to a small hardware-enclave component while leaving authentication, scheduling, accounting, and management on the untrusted host. The client verifies the enclave before releasing plaintext. The host can neither read nor alter the interaction, and plaintext leaves only toward destinations fixed by the measured image. We show that all four malicious-router attack classes succeed against a plaintext-access baseline and are blocked by AEGIS, including adaptive tests against the same boundary. The trusted path is $851$ lines, carries three provider-native APIs without conversion, and completes every request under real-provider workload and concurrency. In a seeded audit pilot, two commodity coding agents find eight and ten of ten planted invariant violations. The local relay overhead is about six milliseconds per request.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。