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

通过伪对话注入对大语言模型进行目标劫持攻击

Goal Hijacking Attack on Large Language Models via Pseudo-Conversation Injection

Zheng Chen, Buhui Yao

AI总结:

本文提出了一种通过伪对话注入实现目标劫持攻击的方法,利用LLM在对话上下文中角色识别的弱点,有效提升攻击效果。

摘要:

目标劫持是一种针对大语言模型(LLMs)的对抗性攻击类型,其目的是使模型产生特定的、预设的输出,无论用户的原始输入如何。在目标劫持中,攻击者通常会在用户的提示后附加一个精心设计的恶意后缀,这会迫使模型忽略用户的原始输入并生成目标响应。在本文中,我们介绍了一种新的目标劫持攻击方法,称为伪对话注入,该方法利用了LLMs在对话上下文中角色识别的弱点。具体来说,我们通过伪造LLM对用户初始提示的响应,然后附加一个恶意新任务的提示来构建后缀。这使模型将初始提示和伪造的响应视为已完成的对话,从而执行新的、伪造的提示。采用这种方法,我们提出了三种伪对话构建策略:针对性伪对话、通用伪对话和鲁棒伪对话。这些策略旨在在各种场景中实现有效的目标劫持。我们的实验在两个主流LLM平台上进行,包括ChatGPT和Qwen,证明了我们提出的方法在攻击有效性方面显著优于现有方法。

英文摘要:

Goal hijacking is a type of adversarial attack on Large Language Models (LLMs) where the objective is to manipulate the model into producing a specific, predetermined output, regardless of the user's original input. In goal hijacking, an attacker typically appends a carefully crafted malicious suffix to the user's prompt, which coerces the model into ignoring the user's original input and generating the target response. In this paper, we introduce a novel goal hijacking attack method called Pseudo-Conversation Injection, which leverages the weaknesses of LLMs in role identification within conversation contexts. Specifically, we construct the suffix by fabricating responses from the LLM to the user's initial prompt, followed by a prompt for a malicious new task. This leads the model to perceive the initial prompt and fabricated response as a completed conversation, thereby executing the new, falsified prompt. Following this approach, we propose three Pseudo-Conversation construction strategies: Targeted Pseudo-Conversation, Universal Pseudo-Conversation, and Robust Pseudo-Conversation. These strategies are designed to achieve effective goal hijacking across various scenarios. Our experiments, conducted on two mainstream LLM platforms including ChatGPT and Qwen, demonstrate that our proposed method significantly outperforms existing approaches in terms of attack effectiveness.

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

↑