Detecting Unknown Encrypted Malicious Traffic in Real Time via Flow Interaction Graph Analysis

Chuanpu Fu, Qi Li, Ke Xu

Abstract

As network traffic increasingly shifts toward end-to-end encryption, traditional security measures like Deep Packet Inspection (DPI) and supervised machine learning models face significant hurdles. Encryption obscures malicious payloads, while supervised models struggle to identify "zero-day" threats absent from training data. This paper presents HyperVision, an unsupervised, real-time detection system that identifies encrypted malicious traffic by analyzing flow interaction graphs. By focusing on the structural patterns of network interactions rather than packet content, HyperVision achieves high-throughput detection (over 80 Gb/s) and successfully identifies stealthy attacks that evade state-of-the-art methods.

Introduction: The Encryption Blind Spot

Encryption is a double-edged sword in network security. While it safeguards privacy, it also provides a cloak for malicious activities. Currently, over 70% of malicious traffic is encrypted, making it indistinguishable from benign traffic through traditional traffic features like packet size. Furthermore, most AI-based detectors are supervised, requiring labeled datasets of known attacks. This leaves networks defenseless against novel, zero-day threats.

The fundamental insight of this work is that while a single encrypted flow may appear innocent, the interaction pattern of multiple flows—such as an attacker probing multiple victims or a botnet communicating with a command-and-control server—remains a distinct indicator of malice.

System Architecture and Methodology

HyperVision employs a novel graph-based approach to identify these patterns without requiring prior labels. The system operates in three primary stages: Graph Construction, Graph Pre-Processing, and Abnormal Interaction Detection.

HyperVision system architecture overview

1. Compact Graph Construction

To handle real-time traffic at scale, HyperVision uses a "divide and conquer" strategy:

  • Short Flows: High-volume, short-lived flows (typical of scanning attacks) are aggregated into single edges to minimize memory overhead.
  • Long Flows: For persistent connections, the system utilizes histogram-based distribution fitting of packet lengths and arrival times, preserving high-fidelity timing information without the need to store exhaustive packet headers.

2. Unsupervised Graph Learning Pipeline

The detection engine follows a four-step unsupervised process:

  • Connectivity Analysis: Traffic is partitioned into connected components, with obviously benign structures filtered out using high-level statistics.
  • Edge Pre-clustering: Similar edges are grouped using DBSCAN to reduce computational complexity.
  • Critical Vertex Detection: The system identifies influential nodes by solving a Vertex Cover problem using the Z3 SMT solver, focusing analysis on the most significant network actors.
  • Outlier Detection: K-Means clustering is applied to the features of edges connected to critical vertices. Edges that deviate significantly from established "normal" clusters are flagged as malicious.

Key Insights: Interaction vs. Payloads

The core innovation of HyperVision is the realization that encryption hides content but cannot hide connectivity. Attackers must interact with victims, and these patterns—characterized by specific connectivity, sparsity, and statistical symmetry—differ fundamentally from benign human or automated behavior.

Comparison of traditional flow records and flow interaction graphs

Information theory validation confirms this approach. Using a "flow recording entropy model," the authors demonstrated that graph-based storage captures near-optimal information density, retaining more detection-relevant data per byte than standard tools like NetFlow or Zeek.

Experimental Results

HyperVision was evaluated using real-world backbone traffic from the WIDE MAWI project and 80 new datasets featuring 48 types of encrypted attacks (e.g., HTTPS-based DDoS, SQL injection over HTTPS, and C&C traffic).

  • Detection Accuracy: HyperVision achieved an AUC of at least 0.92 and an F1-score of 0.86, significantly outperforming baselines such as Kitsune and FlowLens.
  • Zero-Day Detection: The system successfully identified 44 real-world stealthy attacks that were missed by all other baseline methods.
  • High-Speed Performance: Throughput reached between 80.6 Gb/s and 148.9 Gb/s with an average latency of 0.83 seconds, making it suitable for ISP-level deployment.
  • Storage Efficiency: The system achieved a 98.1% reduction in storage requirements compared to raw packet headers.

Conclusion

HyperVision represents a significant advancement in "plug-and-play" network security. By leveraging the structural properties of flow interactions, it provides a robust defense against unknown encrypted attacks without the need for constant manual updates or labeled training data. While it is primarily focused on active attacks rather than passive eavesdropping, its efficiency and accuracy set a new benchmark for real-time network monitoring.

Summary updated

BibTeX
@inproceedings{fu2023detecting,
  author = {Chuanpu Fu and Qi Li and Ke Xu},
  title = {{Detecting Unknown Encrypted Malicious Traffic in Real Time via Flow Interaction Graph Analysis}},
  booktitle = {NDSS},
  year = {2023},
}
Figure