TL;DR
This paper introduces a novel attack strategy called "malfunction amplification" that disrupts LLM agents by inducing repetitive or irrelevant actions, leading to high failure rates. This attack is more subtle and harder to detect than previous methods that focused on overtly harmful outputs, highlighting a new class of vulnerabilities in deployed autonomous AI systems.
What Problem Does This Paper Address?
Large language models (LLMs) are increasingly being integrated into autonomous agents designed to perform real-world tasks. These agents combine LLMs with external tools (like APIs for email, search, or databases) to overcome LLM limitations and enable action-taking. While this expands their capabilities, it also introduces new attack surfaces. Previous research on LLM agent safety primarily focused on "red-teaming" to elicit overtly harmful or policy-violating behaviors. However, these attacks are often easy to detect and may require specific authorization steps. This paper addresses the gap by exploring a more insidious threat: how to compromise LLM agents by subtly disrupting their logical processes, making them unusable without necessarily causing overtly malicious actions. This is crucial because compromised agents can cause damage autonomously, without direct human intervention.
Methods
The authors propose a new attack strategy called "malfunction amplification," which aims to disrupt LLM agents by inducing logic errors. Instead of targeting overtly harmful outputs, this attack focuses on causing agents to enter infinite loops or execute incorrect, but benign, functions.
Key attack methodologies adapted from LLM research include:
- Prompt Injection: Adversarial commands are embedded within user inputs to override normal execution, forcing the agent into repetitive actions or incorrect function calls.
- Adversarial Perturbation: Subtle "noise" is added to inputs to disrupt the agent's reasoning and lead to incorrect action selection. Methods like SCPN, VIPER, and GCG were adapted.
- Adversarial Demonstration: Intentionally incorrect or manipulated examples are provided to the agent to guide it towards faulty behavior.
The authors also explore advanced attack scenarios:
- Viral Attack (Multi-agent): One compromised agent is used to infect other agents in a network by propagating repetitive or incorrect actions.
- Intermediate Outputs & Memory: Attacks are tested by injecting malicious commands into data processed by the agent (e.g., email content, CSV files) or by manipulating the agent's memory component.
To evaluate these attacks, the researchers used an LLM-based agent emulator that simulates various agents and toolkits, allowing for large-scale experimentation. They also implemented two real-world agents (Gmail and CSV agents) for case studies.
Datasets
The paper does not explicitly mention training datasets. For evaluation, they utilized:
- Agent Emulator: A framework that simulates 144 different test cases across 36 toolkits and over 300 tools.
- Case Studies: Two implemented agents: a Gmail agent and a CSV agent.
- Existing Benchmarks: They also used test cases and attack prompts from previous work (Zhan et al., 2024) for defense comparison.
Key Insights and Ideas
- Subtle Disruption is Effective: Causing agents to get stuck in repetitive loops or perform irrelevant tasks is a highly effective way to break them, often more so than trying to make them perform overtly harmful actions.
- Prompt Injection is Potent: This method proved to be the most effective attack, significantly increasing failure rates across various LLM cores.
- Attack Surfaces Matter: Direct manipulation of user input is the most potent attack surface, but intermediate outputs from tools can also be leveraged.
- Multi-agent Systems Amplify Risk: The "viral" nature of these attacks means a single compromised agent can spread malfunctions throughout a network of interacting agents.
- LLM Core Matters, But Not Always: While more advanced LLMs (like GPT-4) show some resilience, prompt injection attacks can still achieve high failure rates.
- Self-Examination is Challenging: Standard LLM self-examination defenses, designed for policy violations, are less effective against these malfunction-inducing attacks. Modified prompts are needed but still struggle to achieve high detection rates.
Key Results
- High Failure Rates: The prompt injection attack achieved failure rates exceeding 80% in multiple scenarios.
- Infinite Loop vs. Incorrect Function: The infinite loop attack, particularly via prompt injection, was generally more effective, inducing failure rates up to 59.4% in basic scenarios and even higher (up to 88.1% on Claude-2) in emulator experiments. Incorrect function attacks were less effective but still significant (26.4% failure rate).
- Toolkit Vulnerabilities: Certain toolkits, like Twilio API, were found to be particularly susceptible to prompt injection attacks, with all agents using them failing.
- Multi-agent Impact: In same-type multi-agent scenarios (e.g., multiple Gmail agents), attacks were effective, comparable to single-agent results. In various-type multi-agent scenarios, a compromised CSV agent could infect a downstream Gmail agent, leading to high failure rates (around 80%).
- Defense Evasion: Policy violation self-examination defenses had low detection rates (0-20%) for these malfunction attacks, while modified malfunction-detection prompts showed improvement but still lagged behind detection rates for overtly harmful attacks.
Limitations and Future Work
- Limited Agent Scope: The study primarily used two implemented agents (Gmail, CSV) and an emulator for broader testing. Future work could expand to more diverse agent types and LLM cores, including open-source models.
- Emulator vs. Real-World: While the emulator is effective for large-scale testing, real-world implementations might exhibit different behaviors.
- Defense Enhancement: While self-examination shows promise, further research is needed to develop more robust defense mechanisms specifically tailored to detect malfunction amplification attacks.
- Broader Attack Vectors: Future work could explore other attack surfaces beyond user input, intermediate outputs, and memory, such as exploring the planning or tool selection components more deeply.
Summary updated