NetEcho: From Real-World Streaming Side-Channels to Full LLM Conversation Recovery

Zheng Zhang, Guanlong Wu, Sen Deng, Shuai Wang, Yinqian ZhangarXiv 2025 · DOI · arXiv

Introduction

Modern Large Language Model (LLM) services, such as ChatGPT and DeepSeek, utilize token-by-token streaming to minimize perceived latency for users. While beneficial for user experience, this mechanism introduces a significant security vulnerability: a network side-channel. Even when traffic is encrypted, the precise timing and size of packets leak metadata about the underlying tokens.

Threat model of an adversary monitoring a medical LLM application side-channel.

NetEcho is a novel framework demonstrating that adversaries can reconstruct entire private conversations—both user prompts and model responses—by observing these encrypted traces. Unlike previous research that focused on topic inference, NetEcho achieves full conversation recovery by exploiting the residual information left by industry-standard "passive" defenses like token batching.

Methodology: The NetEcho Framework

NetEcho treats conversation recovery as a search problem within a high-dimensional semantic space, utilizing a four-stage architecture:

  1. Offline Probing: The attacker builds a reference database by probing the target LLM with known prompts to map text to network traces.
  2. Semantic Retrieval: A dual-tower model maps the victim's observed trace to the most semantically similar examples in the database.
  3. Trace-Constrained Generation: A local LLM generates candidate responses, with its logit processing modified to ensure the output strictly matches the observed packet lengths and token counts.
  4. Iterative Refinement: This is the core innovation. NetEcho uses a reasoning model (e.g., DeepSeek-R1) to analyze the "semantic gradient" between guesses and retrieved examples, iteratively rewriting the reconstructed text to improve accuracy.
The NetEcho iterative refinement loop for mapping network traces back to semantic content.

Key Insights and Results

The research highlights that "passive" defenses—grouping tokens into packets—are insufficient. The total character length of these groups still provides a strong enough signal for reconstruction. Furthermore, the study found that downstream applications often strip away the "active" defenses (like padding) implemented by major providers to facilitate browser interaction, leaving users vulnerable.

In evaluations across medical (DDXPlus) and legal (LEDGAR) datasets, NetEcho achieved:

  • 90% accuracy in topic identification (e.g., distinguishing specific medical conditions).
  • ~70% information recovery on average across conversations.
  • 95% success rate in specific scenarios, defined as achieving over 50% semantic similarity to the original text.

Remarkably, these results were achieved with a minimal budget of approximately $55 in API costs, proving the practicality of such attacks for motivated adversaries.

Conclusion

NetEcho demonstrates that current defenses against LLM side-channel attacks are inadequate. While large vendors may implement padding, the vulnerability often reappears in the frontend applications built on top of them. The authors advocate for system-level integration of robust defenses, such as "oblivious HTTP" or standardized padding, within LLM serving frameworks like vLLM to protect user privacy by default.

Summary updated

BibTeX
@misc{zhang2025netecho,
  author = {Zheng Zhang and Guanlong Wu and Sen Deng and Shuai Wang and Yinqian Zhang},
  title = {{NetEcho: From Real-World Streaming Side-Channels to Full LLM Conversation Recovery}},
  year = {2025},
  eprint = {2510.25472},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.25472},
}
Figure