2025-03-25 · 专家 · 机器学习

Defeating Prompt Injections by Design

该论文提出了一种名为CaMeL的防御机制,通过能力(Capability)和细粒度安全策略来保护大型语言模型(LLM)免受提示注入攻击,并在AgentDojo基准测试中取得了显著成效。

更新于 2025-03-25。作者:Edoardo Debenedetti、Ilia Shumailov、Tianqi Fan、Jamie Hayes、Nicholas Carlini、Daniel Fabian、Christoph Kern、Chongyang Shi、Andreas Terzis、Florian Tramèr。

中文摘要

大型语言模型(LLMs)越来越多地被部署在需要与外部环境交互的智能系统中。然而,当处理不受信任的数据时,LLM智能体容易受到提示注入攻击。在这篇论文中,我们提出了CaMeL,这是一种强大的防御机制,它为LLM构建了一层保护系统,即使在底层模型可能容易受到攻击的情况下也能确保其安全。为了运行,CaMeL明确地从(受信任的)查询中提取控制和数据流;因此,LLM检索到的未受信任数据永远不会影响程序流程。为了进一步提高安全性,CaMeL依赖于一种能力概念,以防止通过未经授权的数据流泄露私有数据。我们通过在AgentDojo [NeurIPS 2024](一个最近的智能体安全基准)中解决67%的任务并证明其安全性,展示了CaMeL的有效性。

英文摘要

Large Language Models (LLMs) are increasingly deployed in agentic systems that interact with an external environment. However, LLM agents are vulnerable to prompt injection attacks when handling untrusted data. In this paper we propose CaMeL, a robust defense that creates a protective system layer around the LLM, securing it even when underlying models may be susceptible to attacks. To operate, CaMeL explicitly extracts the control and data flows from the (trusted) query; therefore, the untrusted data retrieved by the LLM can never impact the program flow. To further improve security, CaMeL relies on a notion of a capability to prevent the exfiltration of private data over unauthorized data flows. We demonstrate effectiveness of CaMeL by solving 67% of tasks with provable security in AgentDojo [NeurIPS 2024], a recent agentic security benchmark.

解读

一句话总结

该论文提出了一种名为CaMeL的防御机制,通过能力(Capability)和细粒度安全策略来保护大型语言模型(LLM)免受提示注入攻击,并在AgentDojo基准测试中取得了显著成效。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt