Abstract
Website fingerprinting (WF) attacks aim to identify the websites being visited by analyzing their characteristics. Although prior studies have demonstrated that WF can compromise Tor’s anonymity, they largely assume clean browsing environments. In practice, however, users often revisit pages or navigate within the same site, creating reload traffics where cached resources introduce significant traffic variations. These variations pose challenges to traditional WF methods, yet this issue has received limited attention to date.In this paper, we propose MGCL, a novel Multi-Granularity Contrastive Learning approach for Tor website fingerprinting in reload scenarios. MGCL leverages multi-granularity spatiotemporal features to provide a more comprehensive and robust representation of traffic patterns, thereby enabling more accurate traffic characterization. Then, a dual-branch neural network architecture is designed to process them separately to accommodate their unique semantics and eventually fuse these features. Furthermore, MGCL incorporates supervised contrastive learning to tackle the challenge of distinguishing reload traffic from first-time visit traffic, which belong to the same class but exhibit markedly different feature distributions. By refining feature representations in the vector space, MGCL enhances the model’s robustness to such discrepancies. Experimental results show that MGCL outperforms the state-of-the-art, achieving an accuracy of 85.83%, which is over 10% higher than existing methods.