arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.03704cs.LG
收藏

通过仅查询交互对LLM代理进行内存注入攻击

Memory Injection Attacks on LLM Agents via Query-Only Interaction

Michigan State University(密歇根州立大学);University of Georgia(佐治亚大学);Singapore Management University(新加坡管理大学)

Shen Dong, Shaochen Xu, Pengfei He, Yige Li, Jiliang Tang, Tianming Liu, Hui Liu, Zhen Xiang

AI总结:

本文提出MINJA攻击,通过仅查询交互向LLM代理注入恶意记录,破坏其内存安全,揭示了代理内存安全的潜在风险。

摘要:

由大型语言模型(LLM)驱动的代理在广泛复杂的现实世界应用中展示了强大的能力。然而,当用于演示的过去记录被篡改时,LLM代理可能轻易产生有害输出。在本文中,我们提出了一种新型的内存注入攻击,称为MINJA,不假设攻击者能够直接修改代理的内存银行。攻击者通过仅与代理进行查询和输出观察的交互,将恶意记录注入到内存银行中。这些恶意记录被设计成在代理执行受害者用户查询时,产生对应于不同目标查询的恶意推理步骤。具体而言,我们引入了一系列桥梁步骤,将受害者查询与恶意推理步骤联系起来。在内存注入过程中,我们提出了一种指示提示,引导代理自主生成类似的桥梁步骤,并采用逐步缩短策略,逐渐去除指示提示,使得恶意记录在处理后续受害者查询时容易被检索。我们的广泛实验在多样化的代理上展示了MINJA在破坏代理内存方面的有效性。具有最小的执行要求,MINJA使任何用户都能影响代理内存,突显了风险。

英文摘要:

Agents powered by large language models (LLMs) have demonstrated strong capabilities in a wide range of complex, real-world applications. However, LLM agents with a compromised memory bank may easily produce harmful outputs when the past records retrieved for demonstration are malicious. In this paper, we propose a novel Memory INJection Attack, MINJA, without assuming that the attacker can directly modify the memory bank of the agent. The attacker injects malicious records into the memory bank by only interacting with the agent via queries and output observations. These malicious records are designed to elicit a sequence of malicious reasoning steps corresponding to a different target query during the agent's execution of the victim user's query. Specifically, we introduce a sequence of bridging steps to link victim queries to the malicious reasoning steps. During the memory injection, we propose an indication prompt that guides the agent to autonomously generate similar bridging steps, with a progressive shortening strategy that gradually removes the indication prompt, such that the malicious record will be easily retrieved when processing later victim queries. Our extensive experiments across diverse agents demonstrate the effectiveness of MINJA in compromising agent memory. With minimal requirements for execution, MINJA enables any user to influence agent memory, highlighting the risk.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑