Website fingerprinting attack method, device and equipment

By using bilateral feature representation and multi-scale feature transfer modules, and pre-training with reference browser traffic data and performing few-sample training in Tor browser, the accuracy problem of website fingerprinting in Tor browser is solved, and efficient recognition under incomplete traffic is achieved.

CN121984784BActive Publication Date: 2026-06-02CENT SOUTH UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CENT SOUTH UNIV
Filing Date
2026-04-03
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing deep learning-based website fingerprinting attack methods suffer from incomplete, chaotic, and structurally weak traffic in real-world network environments, resulting in high training data requirements and difficulty in obtaining the necessary data. Consequently, they struggle to achieve accurate website identification in the Tor browser.

Method used

Employing a bilateral feature representation and a multi-scale feature transfer module, a feature matrix is ​​constructed using reference browser traffic data during the pre-training phase. The parameters of the multi-scale feature transfer module are frozen, and training is performed using a small number of Tor traffic samples to achieve cross-domain knowledge transfer, generate feature vectors, and perform website classification.

Benefits of technology

In cases with few samples and incomplete sample trajectories, the analysis and identification performance of anonymous communication traffic is significantly improved, providing methodological support for traffic analysis of the Tor anonymity system in real network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121984784B_ABST
    Figure CN121984784B_ABST
Patent Text Reader

Abstract

The application provides a website fingerprinting attack method, device and equipment, which maps original traffic trajectory to a structured feature matrix through a bilateral feature representation module, divides a standardized timeline into fixed windows, extracts scale-invariant representation through a multi-scale feature migration module to process scale changes across browsers in the traffic trajectory, pre-trains the module using reference traffic data, learns traffic patterns of each website under low delay, obtains a pre-training model, performs few-shot training on the pre-training model using limited and truncated Tor traffic, realizes effective cross-domain knowledge migration, generates a final feature vector, and uses a classifier to classify the feature vector, which significantly improves the analysis and identification performance of anonymous communication traffic under the condition of few samples and incomplete sample trajectories, and provides systematic technical solutions and methodological support for traffic analysis of the Tor anonymous system in actual network environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus and device for website fingerprinting attacks. Background Technology

[0002] Tor, the browser used by Tor, is currently the most widely used anonymous communication system, with millions of daily active users. It provides anonymous browsing through mechanisms such as random relay node selection and multi-layered encryption. However, Tor has significant vulnerabilities in resisting Website Fingerprinting (WF) attacks. WF attacks utilize machine learning techniques to extract unique traffic patterns from target websites, thereby effectively identifying the websites visited by Tor users. Existing deep learning-based WF attack methods have achieved high accuracy rates, exceeding 95% under ideal experimental conditions. However, deep learning-based WF attacks largely rely on collecting complete and pure traffic during page loading for traffic analysis. In practice, due to mixed background traffic, attackers cannot perceive the entire website loading process. Poor network conditions and inadequate WF defenses also prevent attackers from effectively collecting complete pure traffic during page loading, leading to a significant decrease in attack performance on some websites. Furthermore, due to factors such as website content updates, Tor browser version iterations, and random selection of network paths, website traffic characteristics change accordingly. As a result, attackers need to regularly update a large amount of training data to retrain the attack model, and the resulting high costs are unbearable in practical applications.

[0003] For real-world applications, website fingerprinting attacks require training with incomplete traffic trails and a reduction in the number of traces needed for training. However, existing deep learning-based website fingerprinting attacks do not perform well in such situations. Due to advancements in network conditions and defense technologies, the Tor traffic that attackers can obtain is often incomplete, cluttered, and structurally weak, meaning that many features previously exploited by website fingerprinting attacks can no longer be reliably observed. Therefore, training an effective classifier directly on Tor traffic becomes increasingly difficult, especially when only limited traffic data can be collected. Thus, how to extract more effective traffic features and achieve accurate website fingerprinting attacks for incomplete and limited traffic data is a pressing research area.

[0004] In addition, patent document 1 (CN118157963A) proposes a method and system for user website fingerprinting based on distribution calibration, which relates to the field of network monitoring technology. The method involves inputting the traffic trajectory generated during the captured user's website access process into a website fingerprinting model based on distribution calibration. The website fingerprinting model includes a feature extraction module, a distribution calibration module, and a classification module. The feature extraction module extracts features from the input traffic trajectory, and the distribution calibration module performs distribution calibration on the extracted features. That is, it uses the auxiliary traffic trajectory of the user's website access to transfer the feature distribution statistics of the auxiliary traffic trajectory to the features of the input traffic trajectory, thereby generating new features. The new features are then concatenated with the extracted original features and input into the classification module, finally outputting an accurate website identification result.

[0005] The difference between Patent Document 1 and this application is that:

[0006] 1. Patent Document 1 uses the same type of data for training and identification, which means that Patent Document 1 still suffers from the problems mentioned above. During transfer learning or model training, Patent Document 1 relies on a large amount of labeled auxiliary traffic trajectories (i.e., source domain data), and this data is still Tor traffic trajectories. However, the anonymity of the Tor network leads to multiple obstacles in its traffic data collection: restricted node access, high data labeling costs, and narrow sample acquisition channels, which restrict the scalability and practicality of the technology. Furthermore, the technical solution of Patent Document 1 relies on obtaining complete website traffic trajectories as the basis for analysis. This prerequisite is often difficult to meet in real-world network environments. Due to network fluctuations, connection interruptions, privacy protection mechanisms, or limitations of data collection equipment, incomplete traffic trajectory collection often occurs in actual deployments, which directly leads to a significant decrease in the attack accuracy of Patent Document 1 or even its failure.

[0007] 2. The website fingerprint recognition model processing in Patent Document 1 is based on distribution calibration, which includes: statistical basic class feature distribution information, Tukey power transformation, class similarity measurement, distribution calibration and acquisition of new feature vectors, while this application does not involve this content. Summary of the Invention

[0008] This application proposes a website fingerprinting attack method, apparatus, and device, which can solve one of the problems existing in the background art.

[0009] To achieve the above objectives, this application adopts the following technical solution:

[0010] Firstly, a website fingerprinting attack method is provided, including:

[0011] Obtain Tor browser traffic data to be processed;

[0012] The trained website fingerprinting attack model is used to process the Tor browser traffic data to be processed, and the identification result is obtained.

[0013] The website fingerprinting attack model includes: a bilateral feature representation module for constructing a structured feature matrix corresponding to the traffic trajectory based on the representation of data packets in the time sequence obtained by traffic trajectory division; and a multi-scale feature transfer module for multi-scale feature extraction and fusion of the structured feature matrix, wherein the traffic data includes several traffic trajectories, and the data packets are represented by timestamps and key network features.

[0014] The website fingerprinting attack model was obtained through the following training process:

[0015] During the pre-training phase, the website fingerprinting attack model is pre-trained using reference browser traffic data.

[0016] Furthermore, during the few-shot training phase, the website fingerprinting attack model is trained using Tor browser traffic data for training, and the parameters of the multi-scale feature transfer module are frozen during the few-shot training phase.

[0017] Based on the above technical solution, website traffic data collected using a reference browser and Tor browser is preprocessed to extract traffic features for each traffic trajectory. A bilateral feature representation module maps the original traffic trajectories to a structured feature matrix. The standardized timeline is divided into fixed windows. A multi-scale feature transfer module extracts scale-invariant representations to handle scale variations across browsers in the traffic trajectories. This module is pre-trained using reference traffic data to learn the traffic patterns of each website with low latency, resulting in a pre-trained model. A limited and truncated Tor traffic sample is used to train the pre-trained model, achieving effective cross-domain knowledge transfer and generating the final feature vector. A classifier is then used to classify the feature vectors for website classification. This approach enables the pre-learning of website traffic pattern features from reference browsing behavior and their efficient transfer to the website fingerprinting task of Tor traffic. This significantly improves the analysis and identification performance of anonymous communication traffic under conditions of limited samples and incomplete sample trajectories, providing a systematic technical solution and methodological support for traffic analysis of Tor anonymity systems in real-world network environments.

[0018] In one possible design approach of the first aspect, the key network features include: transmission direction, packet size, and timestamp, and the traffic trajectory is represented as:

[0019]

[0020] Where f represents the data packets in the traffic trajectory, and g represents the length of the traffic trajectory;

[0021] The data packet is represented as:

[0022]

[0023] Where k represents the data packet, t represents the timestamp of the data packet, s represents the size of the data packet, and the direction of data packet transmission is encoded as follows: Symbols: This indicates the outgoing group, and This indicates the incoming group.

[0024] The structured feature matrix M is represented as:

[0025]

[0026]

[0027]

[0028] Where N is the number of time windows, For each element in the structured feature matrix, i is... The sign is determined.

[0029] In one possible design of the first aspect, the multi-scale feature transfer module includes:

[0030] A multi-scale feature generation module for performing multi-scale feature extraction on the structured feature matrix;

[0031] And a multi-scale feature fusion module for fusing the extracted multi-scale features.

[0032] In one possible design approach of the first aspect, the multi-scale feature generation module includes: a cascade of four progressively dimensional convolutional blocks to achieve multi-scale abstraction of features, generating four levels of features.

[0033] In one possible design of the first aspect, the convolutional block includes: a first one-dimensional convolutional layer, a first batch of normalized layers, a first ReLU activation function layer, a second one-dimensional convolutional layer, a second batch of normalized layers, a second ReLU activation function layer, a max pooling layer, and a Dropout layer connected in sequence.

[0034] In one possible design of the first aspect, the multi-scale feature fusion module includes: a third one-dimensional convolutional layer, a fourth one-dimensional convolutional layer, a fifth one-dimensional convolutional layer, a sixth one-dimensional convolutional layer, a first element-wise addition layer, a second element-wise addition layer, a third element-wise addition layer, a fourth element-wise addition layer, a first upsampling layer, a second upsampling layer, a third upsampling layer, a first lightweight convolutional block, a second lightweight convolutional block, a third lightweight convolutional block, and a fourth lightweight convolutional block. The third one-dimensional convolutional layer, the fourth one-dimensional convolutional layer, the fifth one-dimensional convolutional layer, and the sixth one-dimensional convolutional layer take the features of each of the aforementioned layers as input. The outputs of the third one-dimensional convolutional layer and the first upsampling layer serve as the input to the first element-wise addition layer. The output of the first element-wise addition layer is used as the input of the first lightweight convolutional block. The output of the fourth one-dimensional convolutional layer and the second upsampling layer is used as the input of the second element-wise addition layer. The output of the second element-wise addition layer is used as the input of the first upsampling layer and the second lightweight convolutional block. The output of the fifth one-dimensional convolutional layer and the third upsampling layer is used as the input of the third element-wise addition layer. The output of the third element-wise addition layer is used as the input of the second upsampling layer and the third lightweight convolutional block. The output of the sixth one-dimensional convolutional layer is used as the input of the fourth element-wise addition layer. The output of the fourth element-wise addition layer is used as the input of the third upsampling layer and the fourth lightweight convolutional block.

[0035] In one possible design of the first aspect, the few-sample training phase is trained using a limited and truncated Tor browser traffic data.

[0036] In one possible design approach for the first aspect, the loss function L used for training is:

[0037]

[0038] Where B is the number of samples in this training round, and C is the total number of website categories. For the i-th sample, let c be the real website tag. Predict the probability that the i-th sample belongs to class c for the model.

[0039] Secondly, a website fingerprinting attack device is provided, comprising:

[0040] The acquisition unit is used to obtain Tor browser traffic data to be processed.

[0041] The training unit is used to process the Tor browser traffic data to be processed using a trained website fingerprinting attack model to obtain the identification result.

[0042] The website fingerprinting attack model includes: a bilateral feature representation module for constructing a structured feature matrix corresponding to the traffic trajectory based on the representation of data packets in the time sequence obtained by traffic trajectory division; and a multi-scale feature transfer module for multi-scale feature extraction and fusion of the structured feature matrix, wherein the traffic data includes several traffic trajectories, and the data packets are represented by timestamps and key network features.

[0043] The website fingerprinting attack model was obtained through the following training process:

[0044] During the pre-training phase, the website fingerprinting attack model is pre-trained using reference browser traffic data.

[0045] Furthermore, during the few-shot training phase, the website fingerprinting attack model is trained using Tor browser traffic data for training, and the parameters of the multi-scale feature transfer module are frozen during the few-shot training phase.

[0046] Thirdly, an electronic device is provided, comprising: a processor, and a memory coupled to the processor, the memory for storing a computer program; the processor for executing the computer program stored in the memory to cause the electronic device to perform the website fingerprinting attack method as described in any possible implementation of the first aspect. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a schematic diagram of the cross-domain knowledge transfer website fingerprinting attack method provided in the embodiments of this application;

[0049] Figure 2 This is a schematic diagram of the feature matrix provided in an embodiment of this application;

[0050] Figure 3 This is a specific network structure diagram of the multi-scale feature transfer module provided in the embodiments of this application. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0052] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0054] This embodiment proposes a cross-domain knowledge transfer website fingerprinting attack method for Tor browser traffic data. Addressing the practical constraints of difficult and time-consuming Tor traffic data acquisition and incomplete traffic trajectories, this method designs an efficient traffic feature representation method and a cross-domain knowledge transfer network framework. It achieves pre-learning of website traffic pattern features from Firefox browsing behavior and efficiently transfers them to the website fingerprinting task of Tor traffic. This significantly improves the analysis and identification performance of anonymous communication traffic under conditions of few samples and incomplete sample trajectories, providing systematic technical solutions and methodological support for traffic analysis of Tor anonymity systems in real-world network environments.

[0055] like Figure 1 As shown, the cross-domain knowledge transfer website fingerprinting attack method targeting Tor browser traffic data in this embodiment includes the following steps:

[0056] Step 1: Preprocess the website traffic data collected using Firefox (reference browser) and Tor browser to extract traffic characteristics such as data packet direction, data packet size, and timestamp for each traffic trajectory.

[0057] Step 2: The original traffic trajectory is mapped to a structured feature matrix through the bilateral feature representation module. A coarse time pattern is adopted, and the timeline is divided into fixed windows. The outgoing and incoming data packets are counted within the windows.

[0058] Step 3: Extract scale-invariant representations through the multi-scale feature transfer module to handle scale changes across browsers in the traffic trajectory, and pre-train the module using Firefox traffic data to learn the traffic patterns of each website with low latency and obtain the pre-trained model.

[0059] Step 4: Use limited and truncated Tor traffic to train the pre-trained model with few samples to achieve effective cross-domain knowledge transfer, generate the final feature vector, and use a classifier to classify the feature vector for website classification, thereby realizing website fingerprinting attacks.

[0060] Specifically:

[0061] Step 1) Extract packet direction, packet size, and timestamp information from the traffic trajectory. Use the Python programming language and corresponding network analysis libraries (such as Scapy and PyShark) to parse and extract features from the packet capture (pacp) traffic files collected using Firefox and Tor browsers. For each traffic trajectory, extract its key network features, mainly including the transmission direction (uplink / downlink) sequence, packet size sequence, timestamps, and other basic features, and save them as NumPy (npz) files for subsequent feature modeling.

[0062] Step 2) The raw traffic trajectories are mapped to a structured feature matrix using a bilateral feature representation module. This feature matrix employs a multi-dimensional feature representation combining packet direction, packet size, and timestamps. Specifically, for each browser's traffic data, each traffic trajectory is divided into a fixed number of N time windows. Within each window, the number of incoming and outgoing packets is calculated, and these statistics are aggregated into a robust feature matrix. Each traffic trajectory can be represented as:

[0063]

[0064] Where f represents the data packets in the traffic trajectory. It is the first data packet in the traffic trajectory F. This is the last data packet in traffic trajectory F, where g represents the length of the traffic trajectory. Each data packet can be represented as:

[0065]

[0066] Where t represents the timestamp of the data packet, and s represents the size of the data packet. The data packet direction information is encoded as... Symbols: This indicates the outgoing group, and This indicates the incoming group. To ensure a uniform input size, trajectories longer than the predefined length are truncated, while shorter trajectories are padded accordingly. For example... Figure 2 As shown, a feature matrix is ​​constructed for each trajectory:

[0067]

[0068]

[0069] Where N is the number of time windows. Normalizing each timestamp to the range [0, 1] and dividing the normalized timeline into N equal-length windows, the length of each time window can be calculated as w. Elements in the feature matrix:

[0070]

[0071] Among them when Record the number of data packets falling in the outgoing direction within the j-th time window. Record the number of incoming data packets falling within the j-th time window, where the specific time window range is... .

[0072] Specifically, for each data packet Firstly, according to Calculate its normalized timestamp and determine the corresponding time window index j. Row index i is determined by... The sign of the element determines the addition of the corresponding element to matrix M. .

[0073] Step 3) A multi-scale feature transfer module is used to handle cross-browser scale variations in traffic trajectories. While the bilateral feature representation module mitigates page load time mismatches, robust website fingerprinting attacks must address the inherent scale differences in cross-browser traffic. In practice, traffic from the same website from different browsers may vary significantly in transmission time and packet count, even though the website content is identical. Inspired by multi-scale object detection in object detection, where objects may appear at different sizes but should still be identified as identical, this embodiment uses an analogy between Firefox and Tor traffic. Despite significant scale differences, traffic trajectories from the same website exhibit scale-invariant characteristics. To capture these properties, this module employs a Feature Pyramid Network (FPN) to extract and fuse traffic features across multiple scales, achieving robust alignment between the two traffic domains.

[0074] like Figure 3 As shown, this module consists of two components: multi-scale feature generation and multi-scale feature fusion. Since the feature pyramid network requires multi-scale input, this embodiment uses a backbone network to generate multi-scale representations based on the single-scale raw input. Through layer-by-layer downsampling, the input is mapped to multiple feature levels, where each level corresponds to the representation of the original traffic trajectory at a specific time resolution. Specifically, this module takes the single-scale traffic feature matrix as input and achieves multi-scale abstraction of features through a cascade of four progressively larger convolutional blocks, generating four levels of features. Each convolutional block employs a unified and efficient internal structure, containing two one-dimensional convolutional layers, each followed by batch normalization (BN) and ReLU activation functions to accelerate convergence and enhance non-linear expressive power. Subsequently, max pooling layers are used to achieve feature dimensionality reduction and translation invariance enhancement, and dropout layers introduce regularization to suppress overfitting. The four convolutional blocks progressively increase in the input channel dimension, thereby constructing a multi-level representation system from local fine-grained features to global semantic patterns.

[0075] However, significant semantic and informational differences exist between adjacent layers in standard pyramid networks. In deep convolutional neural networks, shallow (low-level) features typically contain rich local spatial details (such as edges and textures), but their semantic representation capabilities are weak; conversely, deep (high-level) features carry highly abstract and semantically strong contextual information, but often lose spatial details. This inherent "semantic gap" hinders the effective collaboration of multi-scale features.

[0076] To alleviate this problem, this embodiment designs a bottom-up fusion strategy that effectively integrates features through convolutional layers and extracts scale-invariant flow features. The core idea of ​​this mechanism is to use lateral connections to progressively sample and propagate the semantic information of high-level feature maps up to the lower levels, performing weighted aggregation with lower-level features at multiple stages. This process achieves progressive information fusion across levels, enhancing not only the semantic representation of low-level features but also providing more precise localization details for high-level features, thus constructing a robust multi-scale feature representation that combines semantics and detail. Specifically, this module uses the output features C0-C3 from four different levels of the feature extraction network as input. Through carefully designed lateral connections and bottom-up paths, it constructs a feature pyramid with multi-scale perception capabilities. First, 1×1 convolutions are used to normalize the channel dimension of each layer's input features, mapping them uniformly to 256 dimensions to form lateral feature branches, thereby preserving the original spatial resolution and structural details of each level. Subsequently, through a bottom-up feature propagation path, the rich semantic information contained in the high-level features is progressively fused upwards. Specifically, high-level features are linearly interpolated and upsampled to the resolution of adjacent lower layers. These upsampled features are then element-wise added to the corresponding lateral features, achieving complementary enhancement of semantic information and detailed features. Finally, to eliminate aliasing and feature inconsistencies that may be introduced during the upsampling process, a lightweight convolutional block is applied after each fusion layer for local smoothing and feature refinement, further enhancing the local consistency and discriminative power of the features. Through this process, the module outputs a set of multi-scale features with unified channels and enhanced semantics. Each level maintains its original resolution while deeply integrating semantic and structural information across scales.

[0077] In real-world environments, browser type, network path, or user behavior can cause traffic to the same website to expand or contract over time, making single-scale features highly sensitive to scale changes. This module constructs deep semantics and fine details through a bottom-up fusion approach. High-level features (P3) capture global patterns but lack precise short-term bursts; while low-level features (P0) retain millisecond-level temporal information but miss long-distance dependencies. FPN injects the semantics of P3 into P2, and then injects the fused semantics of P2 into P1, achieved through nearest-neighbor upsampling. The resulting output maintains resolution while integrating cross-scale contextual information. This fusion reduces semantic gaps, enhances the correlation between layers, and maintains near-constant computational cost, ensuring consistent website identification across both high-latency Tor traffic and low-latency Firefox traffic.

[0078] Based on this module, Firefox traffic data is used for pre-training, aiming to learn the traffic pattern characteristics of each website from Firefox browsing behavior, form a preliminary website fingerprint feature model for each target website, and obtain a pre-trained model.

[0079] Step 4) Train the pre-trained model with a limited number of samples using finite and truncated Tor traffic. Finite Tor traffic means training with only a small number of Tor traffic trajectories, such as 1, 5, or 10. Truncated Tor traffic is achieved by cutting the entire traffic trajectory according to the maximum timestamp of each traffic trajectories, selecting a truncation ratio such as 20%, and retaining only the first 20% of the traffic data for training. During the training phase, the entire network is fine-tuned using a small number of labeled samples, sequentially passing through the bilateral feature representation module, the multi-scale feature transfer module, and the classifier. The Adam optimizer is used during training, and parameters such as training batch size and number of training epochs are adjusted according to the number of samples. The loss function used is:

[0080]

[0081] Where B is the number of samples in this training round, i.e., the batch size, and C is the total number of website categories. For the i-th sample, let c be the real website tag. Predict the probability that the i-th sample belongs to class c for the model.

[0082] First, the pre-trained multi-scale feature transfer module is frozen to better preserve website features. As website trajectories pass through this module, the learned knowledge is propagated from the bottom up through the multi-scale feature fusion component. From the perspective of Tor traffic, Firefox traffic serves as high-level feature C3. This provides a reliable prior knowledge base for subsequent fine-tuning stages, effectively alleviating the problem of insufficient model training caused by the scarcity of Tor traffic samples.

[0083] During the testing phase, the model is tested using traffic trajectories from unknown websites. The test samples are sequentially processed through a two-sided feature representation module, a multi-scale feature transfer module, and a trained classifier to obtain the final predicted website label. Even with insufficient Tor traffic features, such as a small number of training samples or incomplete trajectories, accurate website fingerprinting attacks can still be achieved.

[0084] This embodiment proposes a more efficient and robust traffic representation method. By jointly encoding multi-dimensional traffic attributes such as packet direction, packet size, and timestamps, a more discriminative feature representation is constructed to improve the model's ability to extract key traffic pattern information. At the time-series processing level, a coarse-grained time window partitioning strategy is introduced. By aggregating fine-grained time series into macroscopic time segments, noise interference introduced by network jitter, transmission delay fluctuations, and Tor circuit randomness is effectively smoothed, enhancing the stability of traffic representation.

[0085] This embodiment proposes a cross-domain knowledge transfer website fingerprinting attack method. Addressing the practical constraints of difficult and time-consuming Tor traffic data collection and incomplete traffic trajectories, it constructs an effective knowledge transfer mechanism from the source domain (Firefox browser traffic) to the target domain (Tor browser traffic). This breaks through the dependence of traditional website fingerprinting attacks on large-scale complete Tor traffic data and significantly improves the robustness and accuracy of attacks in scenarios with few samples and incomplete traffic.

[0086] This application also provides a website fingerprinting attack device targeting Tor browser traffic data, including:

[0087] The acquisition unit is used to obtain Tor browser traffic data to be processed.

[0088] The training unit is used to process the Tor browser traffic data to be processed using a trained website fingerprinting attack model to obtain the identification result.

[0089] The website fingerprinting attack model includes: a bilateral feature representation module for constructing a structured feature matrix corresponding to the traffic trajectory based on the representation of data packets in the time sequence obtained by traffic trajectory division; and a multi-scale feature transfer module for multi-scale feature extraction and fusion of the structured feature matrix, wherein the traffic data includes several traffic trajectories, and the data packets are represented by timestamps and key network features.

[0090] The website fingerprinting attack model was obtained through the following training process:

[0091] During the pre-training phase, the website fingerprinting attack model is pre-trained using reference browser traffic data.

[0092] Furthermore, during the few-shot training phase, the website fingerprinting attack model is trained using Tor browser traffic data for training, and the parameters of the multi-scale feature transfer module are frozen during the few-shot training phase.

[0093] This application also provides an electronic device, including: a processor, and a memory coupled to the processor, the memory being used to store a computer program; the processor being used to execute the computer program stored in the memory, so that the electronic device performs the method as described in any of the above embodiments.

[0094] Electronic devices can be computing devices such as desktop computers, laptops, handheld computers, and cloud servers. These electronic devices may include, but are not limited to, processors and memory.

[0095] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting various parts of the device via various interfaces and lines.

[0096] The memory can be used to store the computer program, and the processor implements various functions of the electronic device by running or executing the computer program stored in the memory and calling the data stored in the memory.

[0097] The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0098] This application also provides a storage medium, which is a computer-readable storage medium. The computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0099] This application also provides a computer program product, including: a computer program or instructions that, when the computer program or instructions are run on a computer, cause the computer to perform any of the above possible implementation methods.

[0100] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications are also considered to be within the scope of protection of this application.

Claims

1. A method of website fingerprinting attack, characterized in that, include: Obtain Tor browser traffic data to be processed; Using a trained website fingerprinting attack model, the Tor browser traffic data to be processed is analyzed to obtain the identification results. The website fingerprinting attack model includes: a bilateral feature representation module for constructing a structured feature matrix corresponding to the traffic trajectory based on the representation of data packets in the time series obtained from traffic trajectory segmentation; and a multi-scale feature transfer module for performing multi-scale feature extraction and fusion on the structured feature matrix. The traffic data includes several traffic trajectories, and the data packets are represented by timestamps and key network features. The website fingerprinting attack model was obtained through the following training process: During the pre-training phase, the website fingerprinting attack model is pre-trained using reference browser traffic data; and, During the few-shot training phase, the website fingerprinting attack model is trained using Tor browser traffic data. During this phase, the parameters of the multi-scale feature transfer module are frozen. The key network features include: transmission direction, data packet size, and timestamp; the traffic trajectory is represented as follows: Where f represents the data packets in the traffic trajectory, and g represents the length of the traffic trajectory; The data packet is represented as: Where k represents the position of the data packet in the traffic trajectory, t represents the timestamp of the data packet, s represents the size of the data packet, and the direction of data packet transmission is encoded as... Symbols: This indicates the outgoing group, and Indicates the incoming group, The structured feature matrix M is represented as: Where N is the number of time windows, For each element in the structured feature matrix, i is... The sign determines, The loss function L used for training is: Where B is the number of samples in this training round, and C is the total number of website categories. For the i-th sample, let c be the real website tag. Predict the probability that the i-th sample belongs to class c for the model.

2. The website fingerprinting attack method as described in claim 1, characterized in that, The multi-scale feature transfer module includes: A multi-scale feature generation module for performing multi-scale feature extraction on the structured feature matrix; and... A multi-scale feature fusion module is used to fuse the extracted multi-scale features.

3. The website fingerprinting attack method as described in claim 2, characterized in that, The multi-scale feature generation module includes: four progressively cascaded convolutional blocks to achieve multi-scale abstraction of features and generate four levels of features.

4. The website fingerprinting attack method as described in claim 3, characterized in that, The convolutional block includes: a first one-dimensional convolutional layer, a first batch of normalized layers, a first ReLU activation function layer, a second one-dimensional convolutional layer, a second batch of normalized layers, a second ReLU activation function layer, a max pooling layer, and a Dropout layer, connected in sequence.

5. The website fingerprinting attack method as described in claim 4, characterized in that, The multi-scale feature fusion module includes: a third one-dimensional convolutional layer, a fourth one-dimensional convolutional layer, a fifth one-dimensional convolutional layer, a sixth one-dimensional convolutional layer, a first element-wise addition layer, a second element-wise addition layer, a third element-wise addition layer, a fourth element-wise addition layer, a first upsampling layer, a second upsampling layer, a third upsampling layer, a first lightweight convolutional block, a second lightweight convolutional block, a third lightweight convolutional block, and a fourth lightweight convolutional block. The third, fourth, fifth, and sixth one-dimensional convolutional layers take the features of each level as input. The outputs of the third one-dimensional convolutional layer and the first upsampling layer serve as the input to the first element-wise addition layer. The output of the layer is used as the input of the first lightweight convolutional block. The output of the fourth one-dimensional convolutional layer and the second upsampling layer is used as the input of the second element-wise addition layer. The output of the second element-wise addition layer is used as the input of the first upsampling layer and the second lightweight convolutional block. The output of the fifth one-dimensional convolutional layer and the third upsampling layer is used as the input of the third element-wise addition layer. The output of the third element-wise addition layer is used as the input of the second upsampling layer and the third lightweight convolutional block. The output of the sixth one-dimensional convolutional layer is used as the input of the fourth element-wise addition layer. The output of the fourth element-wise addition layer is used as the input of the third upsampling layer and the fourth lightweight convolutional block.

6. The website fingerprinting attack method as described in claim 1, characterized in that, The few-shot training phase uses limited and truncated Tor browser traffic data for training.

7. A website fingerprinting attack device, characterized in that, include: The acquisition unit is used to obtain Tor browser traffic data to be processed. The training unit is used to process the Tor browser traffic data to be processed using a pre-trained website fingerprinting attack model to obtain the identification result. The website fingerprinting attack model includes: a bilateral feature representation module for constructing a structured feature matrix corresponding to the traffic trajectory based on the representation of data packets in the time series obtained from traffic trajectory segmentation; and a multi-scale feature transfer module for performing multi-scale feature extraction and fusion on the structured feature matrix. The traffic data includes several traffic trajectories, and the data packets are represented by timestamps and key network features. The website fingerprinting attack model was obtained through the following training process: During the pre-training phase, the website fingerprinting attack model is pre-trained using reference browser traffic data; and, During the few-shot training phase, the website fingerprinting attack model is trained using Tor browser traffic data. During this phase, the parameters of the multi-scale feature transfer module are frozen. The key network features include: transmission direction, data packet size, and timestamp; the traffic trajectory is represented as follows: Where f represents the data packets in the traffic trajectory, and g represents the length of the traffic trajectory; The data packet is represented as: Where k represents the position of the data packet in the traffic trajectory, t represents the timestamp of the data packet, s represents the size of the data packet, and the direction of data packet transmission is encoded as... Symbols: This indicates the outgoing group, and Indicates the incoming group, The structured feature matrix M is represented as: Where N is the number of time windows, For each element in the structured feature matrix, i is... The sign determines, The loss function L used for training is: Where B is the number of samples in this training round, and C is the total number of website categories. For the i-th sample, let c be the real website tag. Predict the probability that the i-th sample belongs to class c for the model.

8. An electronic device, characterized in that, The electronic device includes: a processor, and a memory coupled to the processor. The memory is used to store computer programs; The processor is configured to execute the computer program stored in the memory, so that the electronic device performs the website fingerprinting attack method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • User access website fingerprint identification method and system based on distributed calibration

    CN118157963A

  • Website fingerprint attack identification method based on deep learning

    CN116366299A

  • Tor website fingerprint identification method facing satellite internet

    CN121479525A