ToolPulse: Side-Channel Eavesdropping on Tool-Using LLM Agents

Agent Tool Learning AI Safety / AI Ethics RA
2026年11月19日
大型语言模型(LLMs)正日益被部署为智能体(agents),将用户请求转化为一系列本地工具调用序列。尽管此前基于缓存的旁路攻击主要针对本地部署的模型,但这类攻击通常要求攻击者与受害者的推理过程共享模型相关组件或硬件资源。然而,这一假设并不适用于当前主流的智能体应用场景——在该场景中,商用大语言模型运行于服务提供商所控制的基础设施之上。本文指出,智能体式执行暴露了一种更具现实可行性的攻击面:虽然模型推理仍发生在远程服务器上,但工具调用却在用户本地机器上执行,且普遍依赖系统级共享库。 本文首先对“冲刷+重载”(Flush+Reload)和“预热+探测”(Prime+Probe)两种缓存侧信道技术在监控智能体工具调用方面的有效性进行了系统性评估。我们在三种不同硬件平台上开展实验,结果表明:“冲刷+重载”可实现高精度、实时的工具调用监控;而“预热+探测”虽支持跨虚拟机攻击,却带来难以承受的监控开销,并易受缓存组别冲突(cache-set aliasing)问题的严重影响。 为此,我们提出了ToolPulse——一种面向使用工具之智能体的基于缓存的旁路窃听框架。我们首先设计了“工具恢复攻击”(Tool Recovery Attack),用于重建智能体的工具执行工作流。我们在Codex与Claude Code两大系列共11个大语言模型上对该攻击进行了评估,结果表明其始终能高保真地复原工具调用流程,各项实验中最低F1分数均超过93%。 进一步地,我们基于所恢复的工具调用轨迹,演示了两类具体攻击场景:其一是“任务画像攻击”(Task Profiling Attack),可推断用户在Terminal-Bench基准测试中两大任务类别下的真实意图;其二是“触发定位攻击”(Trigger Localization Attack),可在加密/解密以及模型训练/推理等敏感工作负载中精准识别出关键的工具调用。即便在一台由约20名用户共享、系统噪声显著的服务器上运行,上述两类攻击仍能保持极高的准确率。
Large language models (LLMs) are increasingly deployed as agents that translate user requests into sequences of local tool invocations. While prior cache-based side-channel attacks target the locally deployed models, they typically require the adversary to share model-related components or hardware resources with the victim's inference process. These assumptions do not apply to the predominant agentic settings, in which commercial LLMs execute on vendor-controlled infrastructure. We show that agentic execution exposes a more practical attack surface: although inference remains remote, tools are executed on the user's machine and commonly rely on shared system libraries. In this paper, we first systematically evaluate Flush+Reload and Prime+Probe for monitoring agentic tool invocations. Our evaluation across three hardware platforms shows that Flush+Reload enables accurate, real-time tool monitoring, whereas Prime+Probe, despite supporting cross-VM attacks, incurs prohibitive monitoring overhead and suffers from cache-set aliasing. We present ToolPulse, a cache-based side-channel eavesdropping framework against tool-using agents. We first design the Tool Recovery Attack to reconstruct an agent's tool-execution workflow. We evaluate the Tool Recovery Attack on 11 LLMs across Codex and Claude Code. It consistently reconstructs tool workflows, with the lowest F1 score exceeding 93%. We further demonstrate two attack scenarios enabled by the recovered traces. Task Profiling Attack infers user intent across two Terminal-Bench task categories and the Trigger Localization Attack identifies sensitive tool calls in encryption/decryption and model training/inference workloads. Even under substantial system noise on a server shared by approximately 20 users, both Task Profiling Attack and Trigger Localization Attack maintain high accuracy.
许愿