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

TopicAttack:一种通过话题转换实施的间接提示注入攻击

TopicAttack: An Indirect Prompt Injection Attack via Topic Transition

National University of Singapore(新加坡国立大学);HKUST(香港科技大学)

Yulin Chen, Haoran Li, Yuexin Li, Yue Liu, Yangqiu Song, Bryan Hooi

AI总结:

针对间接提示注入中突兀指令易被察觉的问题,本文提出 TopicAttack,通过生成自然的话题过渡提示平滑引入恶意指令,在多种防御下仍取得超过 90% 的 ASR。

摘要:

大语言模型(LLM)已在一系列 NLP 任务中表现出卓越性能。然而,其强大的指令遵循能力以及无法区分指令与数据内容的缺陷,使其容易受到间接提示注入攻击。在此类攻击中,带有恶意目的的指令被注入到网页文档等外部数据源中。当 LLM 通过搜索引擎等工具检索到这些被注入的数据并执行其中的注入指令时,就会给出被误导的响应。近期的攻击方法已展现出一定潜力,但其突兀的指令注入往往会削弱攻击效果。受现有攻击方法局限性的启发,我们提出了 TopicAttack,该方法促使 LLM 生成一个虚构的对话过渡提示,将话题逐步转向被注入的指令,从而使注入更加平滑,并提升攻击的合理性与成功率。通过全面实验,TopicAttack 取得了最先进的性能,在大多数情况下攻击成功率(ASR)超过 90%,即使在应用多种防御方法时也是如此。我们还通过检查注意力分数进一步分析了其有效性。我们发现,注入内容相对于原始内容的注意力比率越高,成功概率就越大,而我们的方法相比基线方法实现了显著更高的比率。

英文摘要:

Large language models (LLMs) have shown remarkable performance across a range of NLP tasks. However, their strong instruction-following capabilities and inability to distinguish instructions from data content make them vulnerable to indirect prompt injection attacks. In such attacks, instructions with malicious purposes are injected into external data sources, such as web documents. When LLMs retrieve this injected data through tools, such as a search engine and execute the injected instructions, they provide misled responses. Recent attack methods have demonstrated potential, but their abrupt instruction injection often undermines their effectiveness. Motivated by the limitations of existing attack methods, we propose TopicAttack, which prompts the LLM to generate a fabricated conversational transition prompt that gradually shifts the topic toward the injected instruction, making the injection smoother and enhancing the plausibility and success of the attack. Through comprehensive experiments, TopicAttack achieves state-of-the-art performance, with an attack success rate (ASR) over 90\% in most cases, even when various defense methods are applied. We further analyze its effectiveness by examining attention scores. We find that a higher injected-to-original attention ratio leads to a greater success probability, and our method achieves a much higher ratio than the baseline methods.

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

↑