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

InputSnatch:通过计时侧信道攻击窃取大语言模型服务中的输入

InputSnatch: Stealing Input in LLM Services via Timing Side-Channel Attacks

Xinyao Zheng, Husheng Han, Shangyi Shi, Qiyan Fang, Zidong Du, Xing Hu, Qi Guo

AI总结:

针对大语言模型服务中缓存机制导致的输入泄露风险,提出InputSnatch计时侧信道攻击方法,通过输入构造器与时间分析器组件提升攻击成功率,实验验证其有效性,强调性能优化需兼顾隐私安全。

摘要:

大型语言模型(LLMs)拥有广泛的知识和问答能力,已被广泛部署在金融和医疗咨询等隐私敏感领域。在LLM推理过程中,缓存共享方法被普遍用于通过复用相同或相似推理请求的缓存状态或响应来提高效率。然而,我们发现这些缓存机制存在私人输入泄露的风险,因为缓存会导致响应时间出现可观察的变化,使其成为基于计时的攻击提示的有力候选。在本研究中,我们提出了一种新颖的基于计时的侧信道攻击来执行LLM推理中的输入窃取。基于缓存的攻击面临着在大搜索空间中构造候选输入以命中并窃取缓存用户查询的挑战。为了应对这些挑战,我们提出了两个主要组件。输入构造器采用机器学习技术和基于LLM的方法进行词汇相关性学习,同时实现优化的搜索机制以进行通用输入构造。时间分析器实现了带有异常值消除的统计时间拟合,以识别缓存命中模式,持续提供反馈以优化构造器的搜索策略。我们在两种缓存机制上进行了实验,结果表明我们的方法在各种应用中始终获得高攻击成功率。我们的工作突出了与性能优化相关的安全漏洞,强调了在提高LLM推理性能的同时优先考虑隐私和安全的必要性。

英文摘要:

Large language models (LLMs) possess extensive knowledge and question-answering capabilities, having been widely deployed in privacy-sensitive domains like finance and medical consultation. During LLM inferences, cache-sharing methods are commonly employed to enhance efficiency by reusing cached states or responses for the same or similar inference requests. However, we identify that these cache mechanisms pose a risk of private input leakage, as the caching can result in observable variations in response times, making them a strong candidate for a timing-based attack hint. In this study, we propose a novel timing-based side-channel attack to execute input theft in LLMs inference. The cache-based attack faces the challenge of constructing candidate inputs in a large search space to hit and steal cached user queries. To address these challenges, we propose two primary components. The input constructor employs machine learning techniques and LLM-based approaches for vocabulary correlation learning while implementing optimized search mechanisms for generalized input construction. The time analyzer implements statistical time fitting with outlier elimination to identify cache hit patterns, continuously providing feedback to refine the constructor's search strategy. We conduct experiments across two cache mechanisms and the results demonstrate that our approach consistently attains high attack success rates in various applications. Our work highlights the security vulnerabilities associated with performance optimizations, underscoring the necessity of prioritizing privacy and security alongside enhancements in LLM inference.

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

↑