Skip to content

ToolPulse: Side-channel eavesdropping against tool-using LLM agentsToolPulse: Side-Channel Eavesdropping on Tool-Using LLM Agents

arXiv: 其他 AI 安全论文· arXiv:2611.25470· Zihao Dan, Jinyu Zhang, Jinzhao Lian, Yun Chen, Shinan LiuThe University of Hong Kong; Renmin University of China; The Hong Kong University of Science and Technology (Guangzhou)Indexed by this site · 4 days ago· Originally publishedSelected Attacks· Its place in the scan record →SelectedAttention40

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors propose ToolPulse, which monitors local tool calls via the Flush+Reload side channel and reconstructs agent workflows on 11 models, with a minimum F1 above 93%.

Threat modelThe attacker shares the same physical CPU with the victim (two users or a malicious process on the same server); the victim deploys agent tools locally and the model is hosted remotely by a vendor; the attacker shares the same agent tool library with the victim, has only unprivileged user permissions, and cannot obtain model execution information.

Questions
Existing cache side-channel attacks against LLMs require the attacker to be on the same machine as the victim model and to share model files, which does not apply to mainstream agent deployments where the model runs in the vendor's cloud; however, the agent's tools execute locally on the user's machine and depend on shared system libraries, which may expose a new attack surface.
Methods
The authors systematically compare the feasibility of Flush+Reload and Prime+Probe for monitoring tool calls, and choose the former to build ToolPulse: use CLLA to select cache lines, DAA for deduplication, and OSA to infer parameter offsets, while monitoring 100 tools to reconstruct call sequences, then train a BiGRU classifier for task profiling and a unidirectional GRU for sensitive call localization.
Experiments and results
Single-tool monitoring has a minimum F1 of 93.9% on three cloud CPUs; Tool Recovery has a minimum F1 of 93.1% across 11 models; task profiling accuracy on Terminal-Bench 1/2 is 87.77%/91.39%; Trigger Localization recall is 96.49%/98.61%, with overhead reduced to 19.54%/14.21%; under noise from a server shared by about 20 people, accuracy drops by about 4 percentage points.
Limitations and future work
The authors state that attacks on interleaved multi-agent trajectories are left for future work; Web and other non-computer-use agents and VM-hosted agents (Devin, Cursor Cloud Agents, Google Jules) are out of scope; the evaluation is conducted only on the Intel Xeon platform and on two agents, Codex and Claude Code.
Experimental setupgpt-6.1-sol、gpt-6-astra et al. · Terminal-Bench 1、Terminal-Bench 2 et al. · Recall、Precision et al.
Evaluated models
gpt-6.1-solgpt-6-astragpt-5.6-solgpt-5.6-terragpt-5.6-lunaclaude-fable-5claude-opus-5claude-sonnet-5claude-haiku-4.5glm-5.3glm-4.7
Benchmarks
Terminal-Bench 1Terminal-Bench 2自建 Key Extraction 任务集自建 Model Extraction 任务集
Metrics
RecallPrecisionF1AccuracyMacro-F1Weighted-F1Om
AI summaryand selection rationaleResearchers from the University of Hong Kong and other institutions propose the ToolPulse attack framework, which can eavesdrop on an agent's local tool calls via a cache side channel and reconstruct the workflow even when model inference is in the vendor's cloud. The attack exploits the fact that agent tools execute locally and rely on shared system libraries; an attacker sharing the same physical CPU as the victim can use Flush+Reload to monitor tool calls in real time. In evaluations on Codex and Claude Code across 11 models, the minimum F1 for tool workflow reconstruction exceeded 93%, from which the authors infer that user tasks achieved accuracy of 87.77% and 91.39% on Terminal-Bench 1 and 2, and the recall for locating sensitive calls such as encryption/decryption and model training/inference exceeded 96%. The attack maintained high precision under noise from a server shared by about 20 people, and the authors responsibly disclosed it to the OpenAI and Anthropic security teams on September 21.

Researchers from the University of Hong Kong and other institutions propose the ToolPulse attack framework, which can eavesdrop on an agent's local tool calls via a cache side channel and reconstruct the workflow even when model inference is in the vendor's cloud. The attack exploits the fact that agent tools execute locally and rely on shared system libraries; an attacker sharing the same physical CPU as the victim can use Flush+Reload to monitor tool calls in real time. In evaluations on Codex and Claude Code across 11 models, the minimum F1 for tool workflow reconstruction exceeded 93%, from which the authors infer that user tasks achieved accuracy of 87.77% and 91.39% on Terminal-Bench 1 and 2, and the recall for locating sensitive calls such as encryption/decryption and model training/inference exceeded 96%. The attack maintained high precision under noise from a server shared by about 20 people, and the authors responsibly disclosed it to the OpenAI and Anthropic security teams on September 21.

Why it was selectedThe paper shows that local tool execution can still be eavesdropped on via a cache side channel when model inference is in the cloud, so teams running coding agents on shared servers can use this to assess their exposure.

Related events and news

1 events · 1 news mentions

News that mentions this paper

大模型安全周报:单步合规检查挡不住智能体跨步骤组合危害

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors state that the agent's local execution of tools exposes a new side-channel attack surface, allowing eavesdropping on its tool calls while the model runs remotely.

    Core question: when the LLM runs on the vendor's cloud and tools execute locally on the user's machine, can an attacker on the same machine as the victim eavesdrop on the agent's tool calls via a cache side channel and infer user privacy.

    • Scenario and motivation: The authors state that mainstream commercial models (GPT, Gemini, Claude) are hosted on vendor infrastructure and used by users via API; the agent translates user intent into local tool calls (file operations, shell commands, etc.), and these tools depend on operating system shared libraries.
    • Shortcomings of existing attacks: The authors state that existing cache side-channel attacks (MoEcho, [8]) assume the attacker is on the same machine as the victim model's inference process and can access model-related components (e.g., experts, embedding tables), which is unrealistic for cloud-hosted models; KV-cache and network-traffic attacks also have their own same-tenant or limited-effectiveness constraints.
    • Core observation: Tools execute locally and use shared system libraries, naturally satisfying the shared-memory condition of Flush+Reload, so the attacker can eavesdrop without touching the vendor's servers.
    • Paper proposes: A systematic evaluation of the feasibility of Flush+Reload and Prime+Probe for eavesdropping on tool calls, and the ToolPulse framework: the Tool Recovery Attack reconstructs the tool execution workflow, plus two downstream attack scenarios, the Task Profiling Attack and the Trigger Localization Attack.
    • Threat model (Section III):
      • Goal: Reconstruct the victim agent's tool-call trace, then infer the user's task intent and locate sensitive tool calls.
      • Knowledge: The attacker shares the same agent tool library with the victim; cannot obtain model execution information.
      • Capability: Shares the same physical CPU with the victim (two legitimate users or a malicious process on the same server), with only unprivileged user permissions.
      • Victim system: A deployment where agent tools (e.g., Linux commands) are deployed locally and the model is hosted remotely by a vendor, e.g., Claude Code/Codex on an Ubuntu machine.
  2. What related research exists?

    The paper divides side-channel attacks against LLMs into three categories—hardware cache, software cache, and network traffic—and points out their respective same-machine or same-tenant assumptions.

    Hardware cache attacks (closest to this paper)

    • MoEcho (2025) — monitors memory accesses corresponding to different experts in an MoE model to infer user privacy.
    • Gao et al. [8] (USENIX Security 25) — monitors memory accesses of different tokens in the tokenizer to reconstruct the input and output of a locally deployed LLM. The paper notes that these two types of attacks require being on the same machine as the victim LLM server, sharing model files or the relevant memory regions, and that the attack surface varies with the CPU/GPU platform.
    • TDXRay (2026) — attacks LLMs inside Intel TDX, using hash mapping to associate prompts with tokens; the paper notes that it does not require shared libraries, but the attacker must be able to query the victim LLM to locate the physical addresses of tokens.

    Software cache (KV cache) attacks

    • PROMPTPEEK (NDSS 2025) — exploits SGLang's policy of preferentially scheduling inputs with large KV cache overlap to infer other users' privacy.
    • Song et al. [33] (2025) — exploits KV-cache and semantic cache reuse to infer system prompts and user inputs. The paper notes that such attacks require the attacker and victim to share the same LLM serving system (the same API endpoint or the same backend instance), and cites [34] as stating that the required search space makes such attacks impractical.

    Network traffic attacks

    • Weiss et al. [35] (USENIX Security 24) — exploits token length information in encrypted traffic to infer the topic of the user's task and reconstruct responses; Li et al. [36] (2026) extends this to merged-token streaming output. The paper notes that in the topic inference setting closest to this paper, [35] achieves a 53% success rate and [36] 42.5%.

    Foundational cache side-channel techniques

    • Flush+Reload (2014) and its variants Flush+Flush and Evict+Reload; Prime+Probe (2015); as well as supporting techniques such as same-machine placement in public clouds ([37], [38]) and constructing eviction sets under non-inclusive caches ([22]).

    Baselines and benchmarks: This paper does not conduct a numerical comparison baseline against other attack methods; the evaluation uses the task taxonomy of Terminal-Bench 1 and 2 [18], as well as the authors' self-built Key Extraction and Model Extraction task sets.

    Authors' positioning: This paper shifts the attack surface from model inference to the agent's local tool execution; the attacker only needs to be on the same machine as the user and share the tool libraries, without needing to access the model vendor's servers or model files.

  3. How does the paper address this problem?

    ToolPulse uses Flush+Reload to monitor shared library code pages, reconstructs tool traces through cache line filtering and deduplication, and then trains sequence models for task profiling and sensitive call localization.

    Overall approach: first systematically compare the feasibility of Flush+Reload and Prime+Probe for eavesdropping on agent tool calls, choose Flush+Reload to build ToolPulse, reconstruct the tool execution workflow end to end, and then implement two downstream attacks on top of it.

    Flush+Reload monitoring of a single tool (Section IV-A)

    • Basic loop: Repeatedly execute Flush → Wait → Reload on a target address in the shared library's code segment, and judge by latency whether it was loaded by the victim (Figure 2 shows an example of 500 rounds of measurement).
    • Cache Line Localization Algorithm (CLLA): Use angr to recover the tool's CFG, enumerate feasible execution paths, eliminate cache lines that can be bypassed, and among the candidates prefer the cache line with the fewest instructions inside loops and the lowest average access count; an ideal cache line must satisfy three properties (accessed on all paths, instruction not inside a loop, accessed exactly once per path). Table I reports results for 18 tools on 4 OS versions: for most tools, no cache line is found that is accessed exactly once per path.
    • Deduplication Attack Algorithm (DAA): After a cache hit is detected, a call is considered ended only when U consecutive cache misses occur, and hits during that period are merged into the same event; τ is the hit/miss latency threshold, and U must be tuned per deployment environment.
    • Offset Search Algorithm (OSA): Scan the target library at 64-byte granularity, run R rounds of measurement for each candidate address with each of all parameters, score by the difference between the number of hits for the target parameter and the number of hits for other parameters, and find the code offset that can distinguish specific command parameters (e.g., git clone vs. git commit); offsets for the same executable version can be reused across physical machines.

    Prime+Probe comparison (Section IV-B)

    • For non-inclusive cache hierarchies, use the Snoop Filter as the attack surface and construct eviction sets with the method of [22]; use Power Spectral Density to filter 64 victim-related sets out of 65536 SF sets (Appendix B: the attacker is limited to 16 cores, 4 sets per core).
    • Convert hit/miss patterns within 10000-round sampling windows into memorygrams, and train a ResNet-18 classifier to distinguish 10 tools (700 training / 100 validation / 200 test per tool).
    • The authors summarize three limitations: high overhead (monitoring 64 cache sets per call), aliasing of cache footprints across different tools, and inability to recover calls in real time; hence the end-to-end attack uses Flush+Reload.

    Tool Recovery Attack (Section V-A, V-B)

    • Concurrent monitoring: Interleave flush/reload during the wait phase of other monitored tools to monitor multiple tools simultaneously; monitoring too many tools lengthens the wait phase and increases missed detections.
    • Noise modeling: The authors observe that the agent issues tool calls in batches via bash -lc after each reasoning step, with short intra-batch intervals and long inter-batch intervals, and calls outside batches are more likely noise; therefore each observation is represented as (tool identity, timestamp) for downstream models to exploit temporal patterns for denoising.

    Task Profiling Attack (Section V-C, Appendix D1)

    • Goal: From the recovered trace Ti = ((ti,1, ai,1), …, (ti,Li, ai,Li)) (sequence of tools and timestamps), estimate the task category ŷi = argmaxc P(yi = c ∣ Ti), using the 9 categories of Terminal-Bench (Appendix C Table VIII).
    • Model: Tool names are encoded into semantic embeddings by a pretrained sentence encoder [41]; the elapsed time since the first call and the gap since the last call are log(1+x)-transformed and standardized, then encoded into time embeddings by a two-layer MLP; after concatenation, a BiGRU encodes the whole trace, followed by an MLP classifier, trained with cross-entropy.

    Trigger Localization Attack (Section V-D, Appendix D2)

    • Goal: Online identification of sensitive calls (encryption/decryption, model training/inference) as a lightweight switch to trigger expensive fine-grained attacks; the optimization objective is minτ Om(τ) s.t. R(τ) ≥ Rmin, i.e., minimize the proportion of calls labeled sensitive Om (as a proxy for subsequent monitoring overhead) subject to a recall lower bound Rmin.
    • Model: Shares semantic embeddings and time features with task profiling, but uses a unidirectional GRU to ensure causality (using only observations at time t and earlier); the classification head outputs a sensitivity probability at each position; trained with class-weighted cross-entropy (positive-class weight α searched over {1,2,4,8,16}∪{n0/n1}); checkpoints are selected on the validation set under the recall constraint, and the threshold τ is set on a separate calibration set and fixed before testing.
    • Data labeling (Appendix E): An automatic labeler combines task metadata and execution evidence to generate candidate labels, then manually reviews and iterates on traces with no positives, too many positives, or conflicting evidence.
  4. What experiments did the paper conduct?

    Single-tool monitoring F1 is at least 93.9%, end-to-end Tool Recovery has a minimum F1 of 93.1% across 11 models, and the two downstream attacks maintain high accuracy under noise.

    Experimental setup

    • Models evaluated: 11, run on two agents, Codex and Claude Code—gpt-6.1-sol, gpt-6-astra, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, claude-fable-5, claude-opus-5, claude-sonnet-5, claude-haiku-4.5, glm-5.3, glm-4.7.
    • Hardware: Single-tool evaluation on three public cloud instances (Intel Xeon Platinum 8369B, 8269CY, 8163); end-to-end evaluation on a Xeon Platinum 8163 + NVIDIA T4 instance, covering various times of day; each agent's built-in sandbox was enabled during experiments.
    • Datasets: Task Profiling uses Terminal-Bench 1 (80 tasks) and Terminal-Bench 2 (89 tasks), collecting 4000 traces across 11 models; Trigger Localization uses two self-built task sets of 100 tasks each (Key Extraction: 50 encryption + 50 decryption; Model Extraction: 50 inference + 50 training), collecting 3000 traces each.
    • Metrics: Recall/Precision/F1 for single-tool and Tool Recovery; Accuracy/Macro-F1/Weighted-F1 for Task Profiling; recall and Om (proportion of calls labeled sensitive, as a proxy for monitoring overhead) for Trigger Localization.
    • Single-tool protocol: 15 tools in three categories (Linux commands, Git, other applications), 1000 rounds per tool, with 5 random calls per round, intervals of 100 ms–1 s, and randomized parameters.
    • End-to-end protocol: Tool Recovery monitors 100 tools simultaneously (only 79 and 49 monitored in the Key/Model Extraction scenarios respectively); Rmin defaults to 97%.

    Main results

    Single-tool Flush+Reload monitoring (Table III, Xeon 8369B row, F1):

    Tool categoryExample toolsF1 range (per Table III)
    Linux commandsmv/rm/cp/cd/mkdir93.9% (cd)–100% (rm)
    Gitclone/commit/add/diff/status99.4%–100%
    Other applicationspython/R/gzip/openssl/hexdump99.8%–100%
    • On all three platforms, F1 is close to 1 for the vast majority of configurations, with the lowest in the whole table being 93.9% for cd on Xeon 8369B; the authors explain that U for cd is hard to balance between false positives and missed detections, and state that in real scenarios call intervals are longer and accuracy would be higher.

    Tool Recovery Attack (Table IV, 11 models, monitoring 100 tools):

    ModelF1
    gpt-6-astra93.1%
    claude-haiku-4.593.9%
    glm-5.395.6%
    gpt-6.1-sol / gpt-5.6-luna96.3%
    claude-sonnet-596.4%
    gpt-5.6-terra97.2%
    glm-4.797.5%
    claude-opus-598.0%
    claude-fable-598.4%
    gpt-5.6-sol98.8%
    • The authors state that F1 drops slightly compared with the single-tool attack, but the minimum F1 across all models remains above 93%.

    Task Profiling Attack

    • Accuracy: On end-to-end traces monitoring the top-100 tools, overall accuracy is 87.77% on Terminal-Bench 1 and 91.39% on Terminal-Bench 2 (Table V); per-model accuracy ranges from 77.78% (gpt-5.6-terra, TB1) to 97.06% (claude-opus-5, TB2).
    • Class imbalance: The authors state that macro-F1 is lower than weighted-F1 for most models, mainly because Games tasks are few, traces are few, and classification for that class is poor.
    • Number of monitored tools (Figure 8): Accuracy is 89.81% both with all 378 tools and with the top-100, drops to 85.38% with the top-50 and to 74.21% with the top-20; accordingly the end-to-end attack chooses to monitor the top-100 tools.

    Trigger Localization Attack

    • Overall results (Table VI, Rmin=97%): Key Extraction overall recall 96.49%, Om 19.54%; Model Extraction overall recall 98.61%, Om 14.21%. Per model, Key Extraction recall is lowest at 92.96% (gpt-5.6-luna) and Om highest at 39.44% (gpt-6-astra); Model Extraction recall is lowest at 96.58% (glm-4.7).
    • Effect of Rmin (Figure 9): In both cases, raising Rmin increases test-set recall but raises Om; the authors state that raising from 97% to 99% yields limited recall gains while Om rises considerably, so they choose 97%.

    Multi-user noise and other ablations

    • Multi-user noise (Section VI-D, Figure 10): 24 hours of anonymous tool calls were recorded on a server shared by about 20 people and replayed in a controlled environment; Task Profiling average accuracy is 85.61%, about 4 percentage points lower than the background-noise-only baseline; at Rmin=97%, Key/Model Extraction recall is 93.33%/97.22%, 3%/1% lower than the no-additional-noise baseline.
    • CLLA/DAA ablation (Table II, with python as the representative tool): F1 is 24.8% with neither CLLA nor DAA; 29.9% with DAA only; 42.9% with CLLA only; 99.8% with both. The authors interpret this as CLLA mainly reducing missed detections and DAA mainly reducing false positives.
    • Prime+Probe fingerprinting (Figure 4): Memorygrams of 10 tools are classified with ResNet-18; the authors state that fingerprint classification accuracy is high for all tools (the figure is a confusion matrix; the main text gives no overall accuracy number).
    • Multi-agent noise (Section VIII-A): The authors observe that Codex has a fixed sequence of shell snapshot calls at the start of each trace, and Claude Code has 4 consecutive git calls during initialization, which can be used to judge whether multiple agents are running concurrently; directly performing the two attacks on interleaved traces is left as future work.
  5. What are some points that can be further explored?

    The authors leave attacks on interleaved multi-agent traces as future work, and state that Web-based and VM-hosted agents are out of the attack scope.

    Limitations and future directions noted by the authors

    • Interleaved multi-agent trajectories: The authors state that when multiple agents run concurrently, interleaved tool workflows reduce the effectiveness of both attacks; although initialization feature sequences can assist judgment, directly performing Task Profiling and Trigger Localization on interleaved trajectories is left as future work (Section VIII-A).
    • Other types of agents: The authors state that Web agents, Productivity agents, and Business agents are beyond the scope of this paper, and attacking them requires monitoring their respective corresponding tool sets (Section VIII-B).
    • VM-hosted agents: The authors state that agents such as Devin, Cursor Cloud Agents, and Google Jules, which require a VM environment for hosting and do not execute locally, are beyond the attack scope (Section VIII-B).
    • Games-class training data: The authors state that the small number of Games-class tasks leads to poor classification performance for this class, lowering macro-F1, and they expect to mitigate this by collecting more training trajectories of this class (Section VI-B).
    • Cost of countermeasures: The authors discuss two types of potential defenses (prohibiting cross-domain page sharing, and hardware-level cache isolation such as CATalyst/DAWG), noting that the former increases memory consumption and the latter brings varying degrees of cache performance degradation (Section VII).

    Scope of experimental coverage

    • The models tested are 11 models on Codex and Claude Code (5 gpt variants, 4 claude variants, 2 glm variants); the agents are only these two.
    • The hardware is only three types of public cloud instances: Intel Xeon Platinum 8369B/8269CY/8163; end-to-end experiments are conducted only on 8163.
    • The task data are Terminal-Bench 1 (80 tasks), Terminal-Bench 2 (89 tasks), and two self-built sets of 100 tasks each; the trajectory scale is 4000 (task profiling) and 3000 per case (trigger localization).
    • The noise evaluation uses anonymous call replays recorded over 24 hours on a server shared by about 20 people; the paper does not report statistical significance tests of classification results or variance across repeated experiments.
    • The paper focuses on computer-use agent tasks (coding, testing, environment configuration), and explicitly states that agent paradigms relying on different tool implementations, such as Web agents, are out of scope (Section II-B).
  6. Summarize the main content of the paper

    ToolPulse reconstructs agent workflows by monitoring local tool calls via Flush+Reload, and can infer user tasks and locate sensitive operations in real time.

    A study on cache side-channel eavesdropping against tool-using LLM agents. The authors state that existing LLM side-channel attacks require being on the same machine as the victim model and accessing model files, which does not apply to the mainstream deployment where the model is hosted on the vendor's cloud; however, the agent's tools execute locally on the user's machine and depend on shared system libraries, constituting a more practical attack surface.

    • Method: After systematically comparing Flush+Reload and Prime+Probe, they choose the former and design the cache line localization algorithm CLLA, the deduplication algorithm DAA, and the parameter offset search algorithm OSA; the Tool Recovery Attack interleaves monitoring of other tools during the wait phase, enabling simultaneous monitoring of 100 tools and recording (tool, timestamp) traces; downstream, a BiGRU classifier performs task profiling, and a unidirectional GRU minimizes the monitoring overhead Om under a recall constraint to localize sensitive calls.
    • Single-tool monitoring: On three cloud CPUs, F1 for 15 tools is mostly close to 1, with a minimum of 93.9% (cd, Xeon 8369B, Table III).
    • End-to-end reconstruction: Across 11 models, Tool Recovery has a minimum F1 of 93.1% (gpt-6-astra, Table IV).
    • Task profiling: Overall accuracy on Terminal-Bench 1/2 is 87.77%/91.39% (Table V); monitoring only the top-100 frequent tools yields the same accuracy as monitoring all 378 tools (89.81%, Figure 8).
    • Sensitive call localization: Key Extraction recall 96.49%, Om 19.54%; Model Extraction recall 98.61%, Om 14.21% (Table VI, Rmin=97%).
    • Noise robustness: Under tool-level noise from a server shared by about 20 people, task profiling average accuracy is 85.61% (about a 4 percentage point drop), and trigger localization recall drops 1–3% (Figure 10).

    The authors' conclusion: tool execution is a practically usable side-channel attack surface for agents, allowing reconstruction of the workflow and inference of high-level privacy without observing model prompts or computation; the authors discuss two countermeasures, page-sharing isolation and cache isolation, and their costs, and disclosed to the OpenAI and Anthropic security teams on September 21.

Read originalarxiv.org