What Was Your Prompt? A Remote Keylogging Attack on AI Assistants
作者: Roy Weiss, Daniel Ayzenshteyn, Guy Amit, Yisroel Mirsky
分类: cs.CR, cs.AI, cs.CL
发布日期: 2024-03-14
💡 一句话要点
提出一种新型侧信道攻击以破解AI助手的响应内容
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 侧信道攻击 AI助手 大型语言模型 网络安全 隐私保护
📋 核心要点
- 现有方法在推断AI助手响应内容时面临挑战,尤其是仅依赖令牌长度序列难以准确重建完整响应。
- 论文提出通过大型语言模型翻译令牌长度序列,并结合上下文信息和已知明文攻击来克服这一挑战。
- 实验结果显示,研究团队成功重建了29%的响应内容,并推断出55%的主题,验证了攻击的有效性。
📝 摘要(中文)
随着AI助手在社会中扮演越来越重要的角色,用户在个人和机密问题上寻求帮助的频率增加。本文揭示了一种新型的侧信道攻击,即基于令牌长度的侧信道,能够读取AI助手通过网络发送的加密响应。尽管仅凭令牌长度序列推断响应内容具有挑战性,但我们通过利用大型语言模型(LLM)进行翻译、提供句间上下文以缩小搜索范围,以及通过微调模型进行已知明文攻击,成功重建了29%的AI助手响应,并从中推断出55%的主题。我们在OpenAI的ChatGPT-4和微软的Copilot上进行了攻击实验,展示了这一威胁的实际存在。
🔬 方法详解
问题定义:本文旨在解决如何从AI助手的加密响应中提取信息的问题。现有方法在仅依赖令牌长度序列时,难以准确推断出完整的响应内容,尤其是当响应较长时。
核心思路:论文的核心思路是利用大型语言模型(LLM)对令牌长度序列进行翻译,并通过提供句间上下文来缩小可能的响应范围。此外,采用已知明文攻击,通过微调模型来适应目标模型的写作风格,从而提高推断的准确性。
技术框架:整体架构包括三个主要模块:首先是令牌长度序列的收集与分析,其次是利用LLM进行翻译和上下文整合,最后是通过微调模型进行已知明文攻击,最终输出推断的响应内容。
关键创新:最重要的技术创新点在于结合了LLM的强大能力与上下文信息,显著提高了从令牌长度序列推断响应内容的准确性。这一方法与传统的单一令牌分析方法有本质区别。
关键设计:在模型微调过程中,采用了特定的损失函数以优化模型对目标写作风格的适应性,同时在上下文整合时,设计了多层次的上下文信息传递机制,以增强模型的推断能力。
🖼️ 关键图片
📊 实验亮点
实验结果表明,研究团队成功重建了29%的AI助手响应内容,并推断出55%的主题。这一结果显著高于传统方法,展示了新型侧信道攻击的有效性,尤其是在对OpenAI的ChatGPT-4和微软的Copilot进行的测试中。
🎯 应用场景
该研究的潜在应用领域包括网络安全、隐私保护和AI助手的安全性评估。通过揭示AI助手的安全漏洞,能够促使相关企业加强对用户数据的保护措施,提升AI技术的安全性和可靠性,进而影响未来AI助手的设计与应用。
📄 摘要(原文)
AI assistants are becoming an integral part of society, used for asking advice or help in personal and confidential issues. In this paper, we unveil a novel side-channel that can be used to read encrypted responses from AI Assistants over the web: the token-length side-channel. We found that many vendors, including OpenAI and Microsoft, have this side-channel. However, inferring the content of a response from a token-length sequence alone proves challenging. This is because tokens are akin to words, and responses can be several sentences long leading to millions of grammatically correct sentences. In this paper, we show how this can be overcome by (1) utilizing the power of a large language model (LLM) to translate these sequences, (2) providing the LLM with inter-sentence context to narrow the search space and (3) performing a known-plaintext attack by fine-tuning the model on the target model's writing style. Using these methods, we were able to accurately reconstruct 29\% of an AI assistant's responses and successfully infer the topic from 55\% of them. To demonstrate the threat, we performed the attack on OpenAI's ChatGPT-4 and Microsoft's Copilot on both browser and API traffic.