The growing deployment of large language model (LLM) based agents that interact with external environments has created new attack surfaces for adversarial manipulation. One major threat is indirect prompt injection, where attackers embed malicious instructions in external environment output, causing agents to interpret and execute them as if they were legitimate prompts. While previous research has focused primarily on plain-text injection attacks, we find a significant yet underexplored vulnerability: LLMs' dependence on structured chat templates and their susceptibility to contextual manipulation through persuasive multi-turn dialogues. To this end, we introduce ChatInject, an attack that formats malicious payloads to mimic native chat templates, thereby exploiting the model's inherent instruction-following tendencies. Building on this foundation, we develop a persuasion-driven Multi-turn variant that primes the agent across conversational turns to accept and execute otherwise suspicious actions. Through comprehensive experiments across frontier LLMs, we demonstrate three critical findings: (1) ChatInject achieves significantly higher average attack success rates than traditional prompt injection methods, improving from 5.18% to 32.05% on AgentDojo and from 15.13% to 45.90% on InjecAgent, with multi-turn dialogues showing particularly strong performance at average 52.33% success rate on InjecAgent, (2) chat-template-based payloads demonstrate strong transferability across models and remain effective even against closed-source LLMs, despite their unknown template structures, and (3) existing prompt-based defenses are largely ineffective against this attack approach, especially against Multi-turn variants. These findings highlight vulnerabilities in current agent systems.


翻译:基于大型语言模型(LLM)的智能体在与外部环境交互中的日益广泛部署,为对抗性操纵创造了新的攻击面。间接提示注入是主要威胁之一,攻击者将恶意指令嵌入外部环境输出中,导致智能体将其解释并执行为合法提示。尽管先前研究主要集中于纯文本注入攻击,我们发现一个重要但尚未被充分探索的漏洞:LLMs对结构化聊天模板的依赖及其在具有说服力的多轮对话中易受上下文操纵的特性。为此,我们提出ChatInject攻击,该攻击通过格式化恶意载荷以模仿原生聊天模板,从而利用模型固有的指令遵循倾向。在此基础上,我们开发了说服驱动的多轮变体,通过在对话轮次中对智能体进行引导,使其接受并执行原本可疑的操作。通过对前沿LLMs的全面实验,我们证明了三个关键发现:(1)ChatInject的平均攻击成功率显著高于传统提示注入方法,在AgentDojo上从5.18%提升至32.05%,在InjecAgent上从15.13%提升至45.90%,其中多轮对话在InjecAgent上表现出特别强的性能,平均成功率高达52.33%;(2)基于聊天模板的载荷在模型间展现出强大的可迁移性,即使针对模板结构未知的闭源LLMs仍保持有效;(3)现有的基于提示的防御方法对此类攻击基本无效,尤其是针对多轮变体。这些发现揭示了当前智能体系统中的脆弱性。

0
下载
关闭预览

相关内容

大语言模型中的提示隐私保护
专知会员服务
24+阅读 · 2024年7月24日
如何提示?浙大最新《大型语言模型提示框架》综述
专知会员服务
83+阅读 · 2023年11月23日
通信网络中大型语言模型的后门攻击的综述
专知会员服务
30+阅读 · 2023年9月5日
Spooftooph - 用于欺骗或克隆蓝牙设备的自动工具
黑白之道
17+阅读 · 2019年2月27日
原创 | Attention Modeling for Targeted Sentiment
黑龙江大学自然语言处理实验室
25+阅读 · 2017年11月5日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员