Skip to main content
QUICK REVIEW

[Paper Review] Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agents

Hanrong Zhang, Jingyuan Huang|arXiv (Cornell University)|Oct 3, 2024
Digital Rights Management and SecurityComputer Science6 citations
TL;DR

ASB is a comprehensive benchmark for formalizing, benchmarking, and evaluating attacks and defenses on LLM-based agents across multiple scenarios, backbones, and tool/memory configurations, revealing high vulnerability to adversarial attacks and limited defense effectiveness.

ABSTRACT

Although LLM-based agents, powered by Large Language Models (LLMs), can use external tools and memory mechanisms to solve complex real-world tasks, they may also introduce critical security vulnerabilities. However, the existing literature does not comprehensively evaluate attacks and defenses against LLM-based agents. To address this, we introduce Agent Security Bench (ASB), a comprehensive framework designed to formalize, benchmark, and evaluate the attacks and defenses of LLM-based agents, including 10 scenarios (e.g., e-commerce, autonomous driving, finance), 10 agents targeting the scenarios, over 400 tools, 27 different types of attack/defense methods, and 7 evaluation metrics. Based on ASB, we benchmark 10 prompt injection attacks, a memory poisoning attack, a novel Plan-of-Thought backdoor attack, 4 mixed attacks, and 11 corresponding defenses across 13 LLM backbones. Our benchmark results reveal critical vulnerabilities in different stages of agent operation, including system prompt, user prompt handling, tool usage, and memory retrieval, with the highest average attack success rate of 84.30\%, but limited effectiveness shown in current defenses, unveiling important works to be done in terms of agent security for the community. We also introduce a new metric to evaluate the agents' capability to balance utility and security. Our code can be found at https://github.com/agiresearch/ASB.

Motivation & Objective

  • Formalize a wide range of adversarial threats targeting LLM-based agents (system prompts, user prompts, memory, and tools).
  • Provide a unified benchmark framework for evaluating attacks and defenses across diverse scenarios and backbones.
  • Quantify attack effectiveness and defense gaps to guide future security research in LLM agents.
  • Demonstrate a novel Plan-of-Thought backdoor attack and assess its impact under black-box memory and tool access.

Proposed method

  • Define direct and observation prompt injection attacks (DPI/OPI) and memory poisoning within an LLM-agent framework.
  • Introduce a novel Plan-of-Thought (PoT) backdoor attack that embeds backdoored planning steps and triggers in system prompts.
  • Formalize mixed attacks that combine DPI, OPI, memory poisoning, and PoT backdoors across agent stages.
  • Benchmark 23 attack/defense types across 13 LLM backbones on 10 task scenarios with 10 agents and 400 tools.
  • Provide evaluation metrics (ASR, RR, PNA, BP, FPR/FNR) to quantify attack success and defense effectiveness.
  • Release accompanying code and benchmarks to enable reproducible security testing of LLM-based agents.

Experimental results

Research questions

  • RQ1How do various attack surfaces (system prompts, user prompts, memory retrieval, tool usage) affect LLM-based agent security?
  • RQ2What is the effectiveness of diverse defenses against a broad set of adversarial techniques across multiple backbones and scenarios?
  • RQ3Can a unified benchmark (ASB) expose vulnerabilities and gaps in current defenses for LLM agents?
  • RQ4Does the proposed Plan-of-Thought backdoor attack enable high attack success under black-box memory and tool access?

Key findings

  • Across 13 LLM backbones, the highest average attack success rate (ASR) reaches 84.30% for mixed attacks, indicating strong overall vulnerability.
  • Prompt injection attacks (DPI/OPI) show substantial impact with average ASRs of 72.68% (DPI) and notable results for OPI.
  • Memory poisoning and PoT backdoor attacks contribute to high ASR in certain backbones, highlighting multiple vulnerability points (system prompts, memory, tool usage).
  • Current defenses exhibit limited effectiveness, with defenses not fully mitigating high ASR observed under mixed attacks.
  • ASB provides near 90,000 testing cases, 10 scenarios, and 400 tools, enabling broad, realistic evaluation of security risks in LLM-based agents.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.