Advanced website fingerprinting for detecting VPN-based censorship evasion: a transformer-based approach
摘要
The widespread use of Virtual Private Networks (VPNs) and encrypted tunnels has enabled users to bypass state-level censorship. However, it has also created significant challenges for legitimate network monitoring and content governance. Website Fingerprinting (WF) offers a privacy-preserving alternative to deep packet inspection by identifying encrypted traffic based on metadata patterns such as packet direction, timing, and burst structure. Nevertheless, existing deep learning models, primarily Convolutional Neural Networks (CNNs) are highly vulnerable to obfuscation techniques such as Website Traffic Fingerprinting Protection with Adaptive Defense (WTF-PAD), Walkie-Talkie, and Front, which disrupt local burst signatures and degrade classification accuracy. To overcome these limitations, we propose Temporal Patch Attention with Self-Supervised Traffic Masking (TPA-SSTM), a novel hybrid CNN-Transformer architecture designed for robust website fingerprinting for traffic that is protected by encryption measures. TPA-SSTM leverages a 1D CNN backbone to extract hierarchical local features, then applies semantic patching to segment the feature sequence into high-level behavioral phases which are initial load, resource fetching, and idle/user interaction treating each as a structured token for sequence modeling. These patches are embedded and processed by a Transformer encoder with multi-head self-attention, enabling the model to capture long-range temporal dependencies across traffic phases. The framework is further enhanced with self-supervised traffic masking as on-the-fly data augmentation, along with class-balanced learning to improve generalization under noisy and imbalanced data conditions. The proposed TPA-SSTM has been evaluated across four datasets: a non-defended Closed World (CW) and three defended scenarios (WTF-PAD, Walkie-Talkie, and Front). Experimental results demonstrate that TPA-SSTM achieves 97.4% accuracy on CW, 91.9% accuracy on WTF-PAD, 95.25% accuracy on Walkie-Talkie, and 85.91% accuracy on Front, significantly outperforming state-of-the-art baselines.