Spoofing the Toolbox: Optimizing Tool Descriptions to Deceive LLM Agents

A new stealthy attack, TSA, uses LLM‑driven optimization to craft tool descriptions that fool both LLM agents and human reviewers, achieving over 90% success while remaining hard to detect.

Spoofing the Toolbox: Optimizing Tool Descriptions to Deceive LLM Agents

Introduction

Large language model (LLM) agents increasingly rely on external tools—search APIs, calculators, code executors—to extend their capabilities. The agents decide which tool to invoke based on the tool's description, a short natural‑language summary that conveys functionality. This reliance creates a subtle attack surface: if an adversary can manipulate a tool's description, the agent may be coaxed into using a malicious tool that appears benign. The paper Spoofing the Toolbox: Optimizing Tool Descriptions to Deceive LLM Agents presents a novel method, called Tool‑Spoofing Attack (TSA), that automatically generates deceptive yet plausible tool descriptions using an LLM‑powered optimization loop.

How TSA Works

TSA starts from a description of an existing benign tool and iteratively refines it. The core components are:

  1. Surrogate LLM feedback – A copy of the target agent model evaluates candidate descriptions, scoring how likely the agent is to select the malicious tool in a given context.
  2. Contrastive in‑context learning – By presenting pairs of benign and candidate descriptions within the same prompt, the surrogate model learns to distinguish subtle cues that influence tool selection.
  3. Optimization loop – The description is treated as a mutable text string. Gradient‑free techniques (e.g., evolutionary strategies) propose edits; the feedback function ranks them, and the best candidates are kept for the next iteration.

The process converges on a description that maximizes two objectives simultaneously: stealth (human‑readable similarity to benign tools) and effectiveness (high probability the target agent will invoke the malicious tool). The authors emphasize that the method does not require access to the victim’s exact model weights—only the ability to query a comparable surrogate.

Evaluation Highlights

The authors benchmark TSA on several standard tool‑use suites, including single‑tool tasks (e.g., arithmetic, web search) and multi‑tool pipelines (e.g., data extraction followed by visualization). Key findings:

  • Attack success rate reaches 92 % on the hardest benchmarks, outpacing four prior approaches that rely on keyword insertion or static rule‑based spoofing.
  • Stealth metrics—measured by cosine similarity of description embeddings and human subject accuracy—show that participants cannot reliably tell TSA‑generated descriptions from genuine ones.
  • Robustness—TSA remains effective against five existing tool‑malware detectors, indicating that current defensive heuristics are insufficient.

A small user study (n≈30) confirmed that even domain‑knowledgeable participants misidentified TSA descriptions at rates comparable to random guessing, underscoring the practical danger of such attacks.

Defensive Takeaways

While the paper focuses on the offensive technique, it offers several pointers for defenders:

  • Dynamic verification: Instead of trusting static descriptions, agents could query the tool at runtime (e.g., sandboxed test calls) to confirm behavior matches the claimed functionality.
  • Description provenance: Embedding cryptographic signatures or provenance metadata in tool registries can make unauthorized edits detectable.
  • Ensemble detection: Combining semantic similarity checks with behavior‑based anomaly detection (e.g., unexpected network traffic) improves resilience against stealthy spoofing.
  • Adversarial training: Exposing LLM agents to crafted deceptive descriptions during fine‑tuning can teach them to flag suspicious patterns.

Conclusion

TSA demonstrates that tool description spoofing is a realistic and potent threat to LLM‑driven agents. By leveraging an LLM itself to optimize deceptive text, attackers can produce descriptions that both fool the target model and evade human scrutiny. As LLM agents become more embedded in critical workflows, safeguarding the integrity of tool metadata will be as important as securing the models themselves. Implementing runtime verification, provenance tracking, and adversarial awareness are practical steps to mitigate this emerging attack vector.

Source

Read original source

Why we picked this

AI relevance scoring was unavailable; retained a source-matched candidate for manual review.

← Back to all articles