Spill The Beans: Exploiting CPU Cache Side-Channels to Leak Tokens from Large Language Models
Side-channel attacks on shared hardware resources increasingly threaten confidentiality, especially with the rise of Large Language Models (LLMs). In this work, we introduce Spill The Beans, a novel application of cache side-channels to leak tokens generated by an LLM. By co-locating an attack process on the same hardware as the victim model, we flush and reload embedding vectors from the embedding layer, where each token corresponds to a unique embedding vector. When accessed during token generation, it results in a cache hit detectable by our attack on shared lower-level caches. A significant challenge is the massive size of LLMs, which, by nature of their compute intensive operation, quickly evicts embedding vectors from the cache. We address this by balancing the number of tokens monitored against the amount of information leaked. Monitoring more tokens increases potential vocabulary leakage but raises the chance of missing cache hits due to eviction; monitoring fewer tokens improves detection reliability but limits vocabulary coverage. Through extensive experimentation, we demonstrate the feasibility of leaking tokens from LLMs via cache side-channels. Our findings reveal a new vulnerability in LLM deployments, highlighting that even sophisticated models are susceptible to traditional side-channel attacks. We discuss the implications for privacy and security in LLM-serving infrastructures and suggest considerations for mitigating such threats. For proof of concept we consider two concrete attack scenarios: Our experiments show that an attacker can recover as much as 80%-90% of a high entropy API key with single shot monitoring. As for English text we can reach a 40% recovery rate with a single shot. We should note that the rate highly depends on the monitored token set and these rates can be improved by targeting more specialized output domains.
Code (0)
등록된 구현이 없습니다.
Tasks
CPUMethods 이 논문이 사용한 방법론
Similar Papers 제목 키워드 기반
The Impact of Brazil on Global Grain Dynamics: A Study on Cross-Market Volatility Spillovers
Brazil rose as a global powerhouse producer of soybeans and corn over the past 15 years has fundamentally changed global markets in these commodities. This is arguably due to the development of varieties of soybean and c…
Tail dependence structure and extreme risk spillover effects between the international agricultural futures and spot markets
This paper combines the Copula-CoVaR approach with the ARMA-GARCH-skewed Student-t model to investigate the tail dependence structure and extreme risk spillover effects between the international agricultural futures and …
ManagementPortfolio OptimizationRisk spillovers between the BRICS and the U.S. staple grain futures markets
This study examines contemporaneous and lagged spillover effects in BRICS staple grain futures markets and their linkages with U.S. markets. The results show that contemporaneous spillovers dominate, while net spillovers…
Site-Specific Color Features of Green Coffee Beans
Coffee is one of the most valuable primary commodities. Despite this, the common selection technique of green coffee beans relies on personnel visual inspection, which is labor-intensive and subjective. Therefore, an eff…
The spillover effect of neighboring port on regional industrial diversification and regional economic resilience
We examine the spillover effect of neighboring ports on regional industrial diversification and their economic resilience using the export data of South Korea from 2006 to 2020. First, we build two distinct product space…