Skip to main content
QUICK 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 Science被引用 6
一句话总结

ASB 是一个全面的基准,用于在多场景、多骨干模型以及工具/记忆配置下对基于 LLM 的智能体的攻击与防御进行形式化、基准化和评估,揭示对对抗性攻击的高脆弱性及防御效果的有限性。

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.

研究动机与目标

  • 形式化针对基于 LLM 的智能体的广泛对抗性威胁(系统提示、用户提示、记忆和工具)。
  • 提供一个统一的基准框架,用于在多样化场景和骨干模型下评估攻击与防御。
  • 量化攻击效果和防御漏洞,以指导未来对 LLM 智能体的安全研究。
  • 展示一种新颖的 Plan-of-Thought(PoT)后门攻击,并在黑箱记忆与工具访问条件下评估其影响。

提出的方法

  • 在一个 LLM-代理框架中定义直接和观察性提示注入攻击(DPI/OPI)以及记忆污染。
  • 引入一种新颖的 Plan-of-Thought(PoT)后门攻击,该攻击在系统提示中嵌入带有后门的规划步骤和触发条件。
  • 形式化混合攻击,跨越代理阶段将 DPI、OPI、记忆污染和 PoT 后门结合起来。
  • 在 10 个任务场景、10 个智能体和 400 种工具中,对 13 种 LLM 骨干模型进行 23 种攻击/防御类型的基准测试。
  • 提供评估指标(ASR、RR、PNA、BP、FPR/FNR)以量化攻击成功率与防御有效性。
  • 发布配套代码和基准,以实现对基于 LLM 的智能体的可重复安全测试。

实验结果

研究问题

  • RQ1各种攻击面(系统提示、用户提示、记忆提取、工具使用)如何影响基于 LLM 的智能体的安全性?
  • RQ2在多个骨干模型和场景中,针对广泛的对抗性技术,多样化防御的有效性如何?
  • RQ3统一基准(ASB)是否能暴露当前对 LLM 智能体的防御中的漏洞与空白?
  • RQ4所提出的 PoT 背后门攻击在黑箱记忆和工具访问下是否能实现高攻击成功率?

主要发现

  • 在 13 种 LLM 骨干模型中,混合攻击的最高平均攻击成功率(ASR)达到 84.30%,表明总体脆弱性较强。
  • 提示注入攻击(DPI/OPI)显示出显著影响,平均 ASR 为 72.68%(DPI),OPI 也有显著结果。
  • 记忆污染和 PoT 后门攻击在某些骨干模型上导致较高的 ASR,凸显多个脆弱点(系统提示、记忆、工具使用)。
  • 当前的防御显示出有限的有效性,防御未能充分缓解混合攻击下观察到的高 ASR。
  • ASB 提供近 90,000 个测试用例、10 种场景和 400 种工具,使对基于 LLM 的智能体的安全风险进行广泛、现实的评估成为可能。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。