arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2410.22832cs.CRcs.AIcs.IR
收藏

HijackRAG:针对检索增强大语言模型的劫持攻击

HijackRAG: Hijacking Attacks against Retrieval-Augmented Large Language Models

Zhejiang University(浙江大学)

Yucheng Zhang, Qinfeng Li, Tianyu Du, Xuhong Zhang, Xinkui Zhao, Zhengwen Feng, Jianwei Yin

AI总结:

本研究提出针对检索增强大语言模型的新型HijackRAG劫持攻击,通过注入恶意文本操纵检索生成预设答案,设计了黑白盒攻击策略,实验证明其成功率高、可跨模型迁移且现有防御不足,凸显RAG系统安全风险与防护紧迫性。

摘要:

检索增强生成(Retrieval-Augmented Generation, RAG)系统通过整合外部知识增强大语言模型(Large Language Models, LLMs)的能力,使其具备适配性且成本效益高,可应用于多种场景。然而,对这类系统日益增长的依赖也带来了潜在安全风险。本研究揭示了一种新型漏洞——检索提示劫持攻击(HijackRAG),攻击者可通过向知识库注入恶意文本,操纵RAG系统的检索机制。当RAG系统遇到目标问题时,会生成攻击者预设的答案而非正确答案,破坏系统的完整性与可信度。我们将HijackRAG形式化为一个优化问题,并针对攻击者掌握的不同知识层级,提出了黑盒与白盒两种攻击策略。在多个基准数据集上开展的大量实验表明,HijackRAG始终能实现较高的攻击成功率,性能优于现有基线攻击方法。此外,我们证明该攻击在不同检索器模型间具有可迁移性,凸显了其对RAG系统构成的广泛风险。最后,我们对多种防御机制的探索显示,这些机制不足以应对HijackRAG攻击,强调了在实际部署中亟需更稳健的安全措施来保护RAG系统。

英文摘要:

Retrieval-Augmented Generation (RAG) systems enhance large language models (LLMs) by integrating external knowledge, making them adaptable and cost-effective for various applications. However, the growing reliance on these systems also introduces potential security risks. In this work, we reveal a novel vulnerability, the retrieval prompt hijack attack (HijackRAG), which enables attackers to manipulate the retrieval mechanisms of RAG systems by injecting malicious texts into the knowledge database. When the RAG system encounters target questions, it generates the attacker's pre-determined answers instead of the correct ones, undermining the integrity and trustworthiness of the system. We formalize HijackRAG as an optimization problem and propose both black-box and white-box attack strategies tailored to different levels of the attacker's knowledge. Extensive experiments on multiple benchmark datasets show that HijackRAG consistently achieves high attack success rates, outperforming existing baseline attacks. Furthermore, we demonstrate that the attack is transferable across different retriever models, underscoring the widespread risk it poses to RAG systems. Lastly, our exploration of various defense mechanisms reveals that they are insufficient to counter HijackRAG, emphasizing the urgent need for more robust security measures to protect RAG systems in real-world deployments.

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

↑