A method, system, medium and program product for enhancing small sample data against website fingerprint attacks
By combining a multi-dimensional data augmentation method with packet timestamps and directional features, the problem of insufficient samples in website fingerprinting attacks is solved, and efficient identification and defense adaptation are achieved in complex network environments.
Patent Information
- Application Number
- CN202411990952.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Existing website fingerprinting attack methods struggle to achieve effective data augmentation with a small number of samples when resources are limited, and the lack of diversity in sample generation in existing data augmentation methods leads to a decline in attack performance.
By comprehensively utilizing the timestamp and orientation features in the data packets, employing multiple data augmentation methods, including spatial and temporal data augmentation, designing diverse evaluation and optimization algorithms, generating diverse training samples, and improving the data augmentation effect.
It significantly improves the accuracy and robustness of website fingerprinting attacks under few-sample conditions, better adapts to complex and dynamic network environments, and enhances the model's generalization ability and the adaptability of adversarial defense mechanisms.
Smart Images

Figure CN119788394B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of website fingerprinting attack technology, specifically relating to a few-sample data augmentation method, system, medium, and program product for website fingerprinting attacks. Background Technology
[0002] Current deep learning-based website fingerprinting attack methods rely on each website having a sufficient number of training samples. However, in practical applications, obtaining enough data in a short time is a significant challenge for resource-constrained attackers. Furthermore, existing data augmentation methods in the website fingerprinting attack field perform poorly due to insufficient sample generation diversity.
[0003] In existing research, Sirinam et al. proposed Triplet Fingerprinting (TF). They argued that most website fingerprinting attacks assume that training and test data have similar distributions and are collected from the same type of network environment around the same time, which limits the practicality of these attack methods. The TF method requires only a small number of training samples; even when pre-trained using data from three years ago, it only needs 5 samples per class to achieve an accuracy of nearly 85%. However, the performance of the TF model decreases significantly when using WF (Web Security) defense schemes to protect traffic.
[0004] Wang et al. proposed Adaptive Fingerprinting (AF), which utilizes adversarial domain adaptation. It also requires pre-training a feature extractor to extract embedded features from the target dataset, and finally inputting these features into a k-NN classifier for website fingerprinting. AF attacks outperform TF attacks, and the feature extractor training time is shorter, but its advantage is not significant with a small sample size.
[0005] Chen et al. proposed the Transfer Learning Fingerprint Attack (TLFA); they trained a powerful embedding model using training data collected from non-target websites, and then fine-tuned a task-specific classifier model using a small amount of labeled training data from the target website. However, they did not propose a more efficient website fingerprint attack model, but only provided a model fine-tuning method for few-shot website fingerprint attacks. This method assumes that the pre-training dataset and the target dataset have similar data distributions, without considering the more complex situations under different data distribution patterns.
[0006] The aforementioned studies all require a large amount of pre-trained data similar to the test data, making them unsuitable for attacker models with limited resources. Their feature extractors may fail when the data distribution changes drastically, thus rendering them impractical. Chen et al. proposed the HDA data augmentation method, drawing on image augmentation techniques, to implement data augmentation in the field of website fingerprinting attacks, achieving over 90% accuracy when the number of samples per class is 20. However, because this method only utilizes the direction of data packets and ignores timestamp information, the diversity of augmented samples is insufficient, and it does not fully consider the various changes in the network environment that may occur during website fingerprinting attacks. Summary of the Invention
[0007] The purpose of this invention is to provide a few-sample data augmentation method, system, medium, and program product for website fingerprinting attacks. It comprehensively utilizes two key features in data packets—timestamps and directions—and employs multiple data augmentation methods to improve sample diversity. Furthermore, a diversity evaluation and optimization algorithm is designed to further enhance the data augmentation effect, thereby solving the problem of performance degradation in website fingerprinting attacks due to insufficient samples.
[0008] The objective of this invention is achieved through the following technical solution:
[0009] A few-sample data augmentation method for website fingerprinting attacks, the specific steps of which are as follows:
[0010] Step 1: Website fingerprint collection
[0011] When a user visits a website, a website fingerprint is generated, and the encrypted traffic generated by the user's visit to the website is collected and saved as a PCAP file.
[0012] Step 2: Website fingerprint cleaning
[0013] All traffic in the PCAP file generated in step 1 is cleaned, including removing noise and irrelevant data, while extracting and refining useful information.
[0014] Step 3: Confirm Data Augmentation Parameters
[0015] Website fingerprint sequences are augmented using methods such as adding noise, changing sequence length, and perturbing data packet order to generate diverse training samples. The quality of the augmented data is evaluated using predefined intra-sample diversity and inter-sample diversity metrics. Different augmented sample sets are generated iteratively by combining parameter optimization to finally determine the optimal augmentation parameters to support model training.
[0016] Step 4: Enhance data generation
[0017] The final augmented data sequence is generated using the optimal augmentation parameters from step 3. By retraining and feature extraction of the website fingerprint attack model, encrypted traffic is analyzed and classified, ultimately achieving accurate prediction of website fingerprints and improving the model's website classification performance.
[0018] Further, step 1 specifically includes:
[0019] Step 1.1: The traffic acquisition device will use tshark and tcpdump network probes to collect traffic from the local area network environment;
[0020] Step 1.2: The traffic acquisition device will save the large amount of traffic collected into multiple PCAP files according to the rules.
[0021] Furthermore, step 2 specifically includes:
[0022] Step 2.1: Clean all data in the PCAP traffic file generated by the traffic acquisition device to remove noise and irrelevant data; this includes filtering out data from non-target websites and removing erroneous data packets caused by network interference.
[0023] Step 2.2: Extract and refine useful information from the cleaned traffic data; including identifying and saving key packet characteristics, including timestamps, packet length, and transmission direction; and keeping the packet length at 5000, deleting any longer packets and padding with zeros if necessary.
[0024] Furthermore, step 3 specifically includes:
[0025] Step 3.1: Spatial dimension data augmentation: continuous erasure, segmented erasure, rotation; Temporal dimension data augmentation: random noise, scaling time interval; Spatiotemporal dual-dimensional data augmentation: spatiotemporal mixing; Spatiotemporal fusion: multiplication fusion;
[0026] Step 3.2: Diversity assessment optimization and data augmentation parameter confirmation:
[0027] Diversity assessment indicators include in-sample diversity (D) intra The formula is as follows:
[0028]
[0029] In the formula, Var(x) i ) represents the variance of the i-th class of samples, and c is the total number of classes. The larger the variance, the more dispersed the samples are within that class, that is, the higher the diversity within the samples.
[0030] Inter-sample diversity (D) inter The formula is as follows:
[0031]
[0032] In the formula, This represents the distance between the means of two different classes of samples; the larger the distance, the more significant the difference between the classes and the higher the diversity among the samples.
[0033] Step 3.3: By iteratively optimizing the data augmentation parameters, different augmentation sample sets are generated, and the augmentation sample sets are evaluated based on predefined diversity evaluation indicators to finally find the optimal data augmentation parameters.
[0034] Furthermore, step 4 specifically includes:
[0035] Step 4.1: Perform data augmentation based on the data augmentation parameters obtained in Step 3.3 to obtain the final augmented dataset;
[0036] Step 4.2: Train the website fingerprinting attack model using the augmented dataset, and save the trained model.
[0037] A few-sample data augmentation system for website fingerprinting attacks includes a website fingerprint collection device, a website fingerprint cleaning device, a data augmentation device, and a website prediction device.
[0038] The website fingerprint collection device captures the traffic transmitted within the local area network and dumps and saves the acquired traffic.
[0039] The website fingerprint cleaning device is responsible for pre-cleaning the collected traffic;
[0040] The data augmentation device augments the website fingerprint sequence and performs diversity assessment and optimization.
[0041] The website prediction device uses the augmented data sequence to perform website classification prediction.
[0042] A computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of a few-sample data augmentation method for website fingerprinting attacks.
[0043] A computer program product includes a computer program / instructions that, when executed by a processor, implement steps of a few-sample data augmentation method for website fingerprinting attacks.
[0044] The beneficial effects of this invention are as follows:
[0045] 1. This invention utilizes two key features in data packets—timestamps and orientation—to generate virtual samples through spatial and temporal data augmentation methods. The spatial dimension includes operations such as rotation, occlusion, and erasure to simulate data packet loss in a real network environment; the temporal dimension includes operations such as adding random noise and scaling time intervals to simulate random fluctuations in data packet arrival times.
[0046] 2. This invention designs a set of diversity evaluation metrics, including intra-sample diversity and between-sample diversity, to comprehensively evaluate the diversity of augmented samples. By iteratively optimizing the data augmentation parameters, the diversity of the dataset is maximized, providing richer and more favorable training data for model training.
[0047] 3. This invention combines the features of spatial and temporal dimensions and obtains fused features that incorporate spatiotemporal information through strategies such as multiplication and fusion, thereby enhancing the model's adaptability and robustness to changes in complex network environments.
[0048] Extensive verification experiments have shown that this invention can still effectively complete website fingerprint attacks even when the number of website fingerprint samples is small. Attached Figure Description
[0049] Figure 1 This is a system architecture diagram of the present invention;
[0050] Figure 2 A schematic diagram illustrating spatial dimension data enhancement;
[0051] Figure 3 A diagram illustrating the enhancement of time-dimensional data;
[0052] Figure 4 This is a schematic diagram of spatiotemporal dual-dimensional data enhancement. Detailed Implementation
[0053] The present invention will now be further described with reference to the accompanying drawings.
[0054] This invention discloses a few-sample data augmentation method (DESTDA) for website fingerprinting attacks, based on... Figure 1 The specific steps are as follows:
[0055] Step 1: Website fingerprint collection; When a user visits a website, a website fingerprint will be generated within a short period of time. In this step, the encrypted traffic generated by the user's visit to the website will be collected and saved as a PCAP file for subsequent processing.
[0056] Step 1.1: The traffic acquisition device will use network probes such as tshark and tcpdump to collect traffic from the local area network environment;
[0057] Step 1.2: The traffic acquisition device will save the large amount of traffic collected into multiple PCAP files according to certain rules.
[0058] Step 2: Website Fingerprint Cleaning; This step cleanses all traffic in the PCAP traffic files generated by the traffic acquisition device, including removing noise and irrelevant data, while extracting and refining useful information. This step ensures data quality and provides a reliable foundation for subsequent analysis and feature extraction.
[0059] Step 2.1: Clean all data in the PCAP traffic files generated by the traffic acquisition device to remove noise and irrelevant data. This includes filtering out irrelevant traffic, such as data from non-target websites, and removing erroneous data packets caused by network interference.
[0060] Step 2.2: Extract and refine useful information from the cleaned traffic data. This includes identifying and preserving key packet characteristics, such as timestamps, packet length, and transmission direction, which are crucial for subsequent analysis and feature extraction. The packet length should be maintained at 5000 bytes; packets longer than this should be deleted, and packets shorter than this should be padded with zeros.
[0061] Step 3: Data Augmentation Parameter Confirmation; This step involves data augmentation of the website fingerprint sequence to generate more diverse training samples. Specific operations include adding noise, changing sequence length, and perturbing the order of data packets.
[0062] Step 3.1: Spatial dimension data augmentation: continuous erasure, segmented erasure, rotation; Temporal dimension data augmentation: random noise, scaling time intervals; Spatiotemporal dual-dimensional data augmentation: spatiotemporal mixing; Spatiotemporal fusion: multiplication and fusion. For example... Figure 2-4 As shown.
[0063] Step 3.2: Diversity Assessment Optimization and Data Augmentation Parameter Confirmation: Diversity assessment indicators include in-sample diversity (D... intra ):
[0064]
[0065] In the formula Var(x) i ) represents the variance of the i-th class of samples, and c is the total number of classes. The larger the variance, the more dispersed the samples are within that class, that is, the higher the diversity within the samples.
[0066] Inter-sample diversity (D) inter ):
[0067]
[0068] In the formula This represents the distance between the means of two different classes of samples. The larger the distance, the more significant the difference between the classes and the higher the diversity among the samples.
[0069] By iteratively optimizing the data augmentation parameters, different augmentation sample sets are generated, and the augmentation sample sets are evaluated based on predefined diversity evaluation indicators, ultimately finding the optimal data augmentation parameters.
[0070] Step 4: Enhance data generation;
[0071] Step 4.1: Perform data augmentation based on the data augmentation parameters obtained in the previous step to obtain the final augmented dataset.
[0072] Step 4.2: Train the website fingerprinting attack model using the augmented dataset, and save the trained model.
[0073] To verify the effectiveness of this invention in implementing website fingerprinting attacks, a dataset collected in a real network environment was used for verification.
[0074] This invention designs five different experiments to verify the website fingerprinting attack capability of this invention. These mainly include:
[0075] 1. Closed-World Effectiveness Experiment: This experiment designs an effectiveness experiment in a closed-world environment, targeting AWF. 100 Analysis was conducted. In the experimental setup, the dataset was subdivided into a training set, a validation set (10 samples per class), and a test set (70 samples per class). The training set considered several few-sample settings, with 5, 10, 15, and 20 samples per class, respectively. The main purpose of the validation set was for model selection, ensuring that the best-performing model was applied during the testing phase. This experiment used attack success rate as the primary performance evaluation metric.
[0076] In closed-world effectiveness experiments, the data augmentation strategy proposed in this invention (hereinafter referred to as DESTDA) significantly outperformed other control data augmentation methods under different sample size settings. Particularly with a sample size of 20, DESTDA achieved an accuracy of 95.35%, significantly higher than the 45.04% of the traditional DF model. This significant performance improvement is attributed to the dual optimization of the spatiotemporal feature-based data augmentation strategy and the diversity optimization algorithm.
[0077] Table 1. Analysis of the Results of the Closed World Experiment
[0078]
[0079] As can be observed from Table 1, compared to baseline methods that do not use any data augmentation techniques, although basic data augmentation methods like Flipping achieve some performance improvement by increasing sample diversity, their effectiveness is still limited by their inability to fully capture more complex spatiotemporal relationships. In contrast, RE and HDA methods, by introducing more advanced data perturbations and hierarchical structural changes, simulate network traffic that is closer to the real world, thereby effectively improving the model's generalization ability and accuracy.
[0080] The DESTDA method exhibits optimal performance across all sample sizes, thanks to its comprehensive utilization of two key features—timestamps and directions—from data packets, and its enhanced diversity and complexity through a diversity optimization algorithm. This complexity and diversity are crucial for improving model accuracy in closed-world experiments, as it more comprehensively simulates real-world website fingerprint traffic characteristics, thus significantly improving the model's recognition capabilities under limited sample conditions.
[0081] In summary, the results of the closed-world experiment not only verify the significant effectiveness of the DESTDA method in improving the performance of few-sample website fingerprint attack models, but also demonstrate the stability and excellent generalization ability of the method under different sample numbers.
[0082] 2. Open World Effectiveness Experiment: In an open world setting, this experiment will test AWF. 100 The website is defined as the target (monitored) class, while AWF... 400000 Websites in the AWF are defined as non-target (unmonitored) categories. 400000 8020 samples were randomly selected from 400,000 unmonitored websites and divided into training, validation, and test sets with sizes of 20, 1000, and 7000 respectively. Since the open-world experiment required identifying non-target classes, precision, recall, and F1 score were used as performance metrics for the model.
[0083] The experimental results conducted in an open-world environment are shown in Table 2. In this environment, the DESTDA method proposed in this study demonstrates significant performance advantages under different sample size settings. Particularly noteworthy is that when the sample size is 20, its F1 score reaches 84.01%, significantly higher than the 54.93% of the traditional DF model. This result demonstrates the effectiveness and robustness of the DESTDA method in complex open-world attack scenarios.
[0084] Open-world scenarios require models to not only accurately identify known website fingerprints but also effectively distinguish unknown website fingerprints, placing higher demands on the model's generalization ability and robustness. Compared to baseline methods that do not use any data augmentation techniques, Flipping, while improving sample diversity through basic data augmentation, still fails to fully capture more complex spatiotemporal relationships, resulting in limited performance improvement. In contrast, RE and HDA, by introducing more complex data variations, simulate network traffic changes closer to the real world, thereby effectively improving the model's generalization ability. These methods, by introducing more advanced data perturbations and structural changes, can better adapt to the uncertainty and changes in the open world, thus improving the accuracy and robustness of the classifier. The DESTDA method, by comprehensively utilizing two key features in data packets—timestamps and directions—and further improving the diversity and complexity of generated samples through a diversity optimization algorithm, significantly outperforms other methods.
[0085] Table 2 Analysis of Open World Experiment Results
[0086]
[0087] This enhanced complexity and diversity is key to handling unknown website fingerprints in open-world experiments, as it more comprehensively simulates real-world website fingerprint traffic characteristics, thereby significantly improving the model's ability to identify fingerprints under limited sample conditions and its adaptability to new categories.
[0088] Furthermore, the DESTDA method performed exceptionally well in open-world experiments, demonstrating excellent performance in recall, precision, and F1 score, showcasing a balanced approach to reducing false positives and false negatives. A high recall value indicates that the model can cover more real-world attack scenarios, while high precision reflects accuracy in attack identification. The DESTDA method's performance in these two areas demonstrates its ability to effectively identify malicious website access behavior while protecting user privacy.
[0089] The results of the open-world experiments further validate the practicality and effectiveness of the DESTDA method, especially its applicability in handling highly uncertain network environments. These characteristics make the DESTDA method not only applicable to traditional closed-world scenarios, but also effective in dealing with more complex and realistic open-world scenarios.
[0090] 3. Adaptability Assessment under WTF-PAD Defense: Compared to the previous two experiments, this experiment was designed to be conducted under a more challenging website fingerprinting attack defense scenario, especially considering the impact of the WTF-PAD defense strategy. WTF-PAD increases the difficulty of the attack by changing the data traffic pattern. The experiment used DF95. WTF-PADThe dataset consists of 100 randomly selected samples from each website, which are divided into a training set (20 samples), a validation set (10 samples), and a test set (70 samples). The attack success rate in a closed-world scenario is used as the metric to evaluate the performance of the experiment.
[0091] The experimental results under WTF-PAD defense are shown in Table 3. In the experimental scenario of the WTF-PAD defense mechanism, the DESTDA method showed excellent performance, especially with a sample size of 20, achieving an accuracy of 66.56%, a significant improvement compared to the baseline DF model's 45.75%, and surpassing all comparison models.
[0092] WTF-PAD is a defense mechanism designed to increase the difficulty of traffic analysis. It interferes with the attacker's traffic analysis process by introducing additional latency and packets. The DESTDA method maintains high accuracy in this environment, demonstrating its comprehensive utilization of the two key features of packet timestamps and directions. This not only enhances sample diversity but also improves the model's depth of understanding and adaptability to traffic characteristics. Therefore, the DESTDA method is more effective in countering WTF-PAD defenses.
[0093] Compared to the baseline method lipping, which enhances data diversity through simple image flipping without using any data augmentation techniques, lipping shows some improvement but still fails to adequately adapt to the traffic pattern changes caused by the WTF-PAD defense mechanism. Its performance is relatively poor among all models, especially in low-sample scenarios. RE and HDA methods introduce more complex data augmentation mechanisms, such as random erasure, which improve model adaptability by introducing structural changes and more advanced data perturbations. Compared to lipping, they demonstrate better adaptability and adversarial capabilities.
[0094] The DESTDA proposed in this invention not only utilizes the timestamp and direction features of data packets, but also further improves the diversity of samples and the model's ability to identify complex traffic characteristics through a diversity optimization algorithm. DESTDA exhibits optimal performance in the WTF-PAD environment, reflecting the crucial role of the diversity optimization algorithm in complex and interference-prone environments. By deeply simulating traffic characteristics in a real network environment, DESTDA effectively addresses the random delays and data packet disturbances introduced by WTF-PAD, thereby significantly improving accuracy.
[0095] These analyses demonstrate that DESTDA provides crucial adaptability and robustness to WTF-PAD defenses. Traditional methods, lacking strategies for adapting to dynamic network environments, suffer limited performance improvements. These comparisons not only highlight DESTDA's advantages in adversarial advanced defense environments but also reveal the limitations of existing methods in handling dynamic and complex attack scenarios.
[0096] Table 3. Analysis of Experimental Results under WTF-PAD Defense
[0097]
[0098] 4. Adaptability Evaluation under Concept Drift: To verify the effectiveness of the data augmentation strategy proposed in this invention in resisting concept drift, a concept drift experiment was designed. AWFTime was used. 100 Experiments were conducted using a dataset with several few-sample settings for the training set, with 5, 10, 15, and 20 samples per class. Testing was performed after 2, 4, and 6 weeks, with 70 test samples per class. Attack success rate was used as the performance evaluation metric.
[0099] Table 4 presents the experimental results of concept drift testing at different time intervals. This experiment aims to evaluate the robustness of the model in the face of changes in network environment and data distribution drift. The results show that although the performance of all participating models generally declines over time, the DESTDA method maintains a relatively high accuracy across all time interval settings. In particular, at the 6-week test interval, DESTDA achieves an accuracy of 68.21%, significantly outperforming other comparative methods.
[0100] Table 4. Analysis of Experimental Results under Concept Drift
[0101]
[0102] The experimental results under concept drift not only confirm the effectiveness of the DESTDA method in combating data distribution drift, but also highlight its reliability and stability in long-term applications—key attributes for real-world applications. Compared to baseline methods without any data augmentation, Flipping, while improving performance by increasing sample diversity through simple data augmentation, still failed to effectively adapt to data changes over time. RE and HDA performed better, mainly because these methods introduced more complex data perturbation and feature change mechanisms, improving the model's adaptability to new data and understanding of complex network traffic patterns. The advantage of the DESTDA method lies in its utilization of not only the two key features of timestamps and directions, but also in its enhancement of the efficiency of these features through diversity optimization algorithms, thus maintaining stable performance in concept drift environments. This strategy significantly improves the model's adaptability to time changes, demonstrating the effectiveness of diversity optimization algorithms in handling dynamic network environments. Through this series of comparisons and analyses, the different performances of various methods in dealing with concept drift are clearly visible, especially the reliability and stability of the DESTDA method in long-term applications. This is crucial for practical deployment because it reduces the need for frequent model updates due to environmental changes, enhancing the method's practicality and cost-effectiveness.
[0103] 5. Ablation Experiments: To analyze in detail the specific effects of each component of the data augmentation strategy (DESTDA) proposed in this invention, a series of ablation experiments were conducted. The experiments were performed on an AWF (Aircraft Field Fusion) screen. 100 The experiment was conducted on the same dataset as Experiment 1, with no defensive measures implemented. The data augmentation strategies included in this experiment were continuous erasure (D1), segmented erasure (D2), rotation (D3), a combination of all spatial data augmentation methods (DALL), adding random noise (T1), scaling the time interval (T2), and a combination of all temporal data augmentation methods (TALL). A spatiotemporal hybrid strategy (DT) was also examined.
[0104] The results of the ablation experiments are shown in Table 5, aiming to systematically evaluate the specific impact of different data augmentation strategies on the few-sample website fingerprint attack model. This experiment explored the contributions of sequential erasure (D1), segmented erasure (D2), rotation (D3), full spatial dimension augmentation (DALL), addition of random noise (T1), time interval scaling (T2), full temporal dimension augmentation (TALL), spatiotemporal data augmentation (DT), and combinations of all data augmentation techniques (DALL+TALL+DT) to the model accuracy.
[0105] Table 5 Analysis of Ablation Experiment Results
[0106]
[0107] (1) Spatial Data Augmentation Strategy Analysis: Both continuous erasure (D1) and segmented erasure (D2) significantly improved the model's performance, indicating that simulating packet loss can effectively increase the model's robustness. In particular, segmented erasure (D2) achieved an accuracy of 92.31% with 20 samples, a significant improvement compared to the baseline DF model's 45.04%. This strategy enhances the model's adaptability to real-world network environments by simulating network instability. Rotation (D3) further improved model performance, especially with an accuracy of 93.27% with 20 samples. This demonstrates that changing the packet order can effectively simulate network latency uncertainty, thereby improving the model's generalization ability.
[0108] (2) Analysis of temporal data augmentation strategies: Adding random noise (T1) and scaling the time interval (T2) both effectively improved the model performance, especially when the number of samples was 20, the accuracy reached 92.53% and 92.32%, respectively. These results show that by introducing changes in temporal features, the model can better learn and adapt to temporal irregularities, thereby improving the recognition accuracy of website fingerprints.
[0109] (3) Analysis of spatiotemporal data augmentation strategy: Although spatiotemporal data augmentation (DT) did not significantly improve the performance when the number of samples was 5, the accuracy increased to 89.11% as the number of samples increased to 20. This shows that when spatiotemporal data augmentation techniques are used in combination, they can improve the performance of the model to a certain extent, especially when the data samples are relatively sufficient.
[0110] (4) The combined use of all data augmentation techniques (DALL+TALL+DT) showed optimal performance in all scenarios, especially with an accuracy of 95.35% when the sample size was 20. This result highlights the importance of the comprehensive application of multiple data augmentation techniques, which greatly improves the model's ability to identify complex website fingerprints by simultaneously simulating the spatial uncertainty and temporal irregularity of the network environment.
[0111] (5) Conclusion: Ablation experiments demonstrate the unique contributions of various data augmentation techniques to model performance improvement and the complexity of their interactions. In particular, the approach of comprehensively utilizing all data augmentation techniques showed significant improvements across all performance metrics, highlighting the importance of comprehensively considering multi-dimensional data augmentation strategies in the field of website fingerprinting attacks. This approach not only enhances the model's adaptability to complex real-world network environments but also optimizes its generalization ability, providing valuable strategic guidance for network security technologies.
[0112] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A few-sample data augmentation method for website fingerprinting attacks, characterized in that: The specific steps are as follows: Step 1: Website fingerprint collection When a user visits a website, a website fingerprint is generated, and the encrypted traffic generated by the user's visit to the website is collected and saved as a PCAP file. Step 2: Website fingerprint cleaning All traffic in the PCAP file generated in step 1 is cleaned, including removing noise and irrelevant data, while extracting and refining useful information. Step 2.1: Clean all data in the PCAP traffic file generated by the traffic acquisition device to remove noise and irrelevant data; This includes filtering out data from non-target websites and removing erroneous data packets caused by network interference; Step 2.2: Extract and refine useful information from the cleaned traffic data; this includes identifying and saving key packet characteristics, including timestamps, packet length, and transmission direction; and maintaining the packet length at 5000, deleting packets longer than 5000 and padding with zeros if the packet length is too short. Step 3: Confirm Data Augmentation Parameters Website fingerprint sequences are augmented using methods such as adding noise, changing sequence length, and perturbing data packet order to generate diverse training samples. The quality of augmented data is evaluated by using predefined intra-sample diversity and inter-sample diversity metrics, and different augmented sample sets are generated by combining parameter optimization iterations to finally determine the optimal augmentation parameters to support model training. Step 4: Enhance data generation The final augmented data sequence is generated using the optimal augmentation parameters from step 3. By retraining and feature extraction of the website fingerprint attack model, encrypted traffic is analyzed and classified, ultimately achieving accurate prediction of website fingerprints and improving the model's website classification performance.
2. The few-sample data augmentation method for website fingerprinting attacks according to claim 1, characterized in that: Step 1 specifically involves: Step 1.1: The traffic acquisition device will use tshark and tcpdump network probes to collect traffic from the local area network environment; Step 1.2: The traffic acquisition device will save the large amount of traffic collected into multiple PCAP files according to the rules.
3. The few-sample data augmentation method for website fingerprinting attacks according to claim 1, characterized in that: Step 3 specifically involves: Step 3.1: Spatial dimension data augmentation: continuous erasure, segmented erasure, rotation; Temporal dimension data augmentation: random noise, scaling time interval; Spatiotemporal dual-dimensional data augmentation: spatiotemporal fusion; Spacetime fusion: multiplicative fusion; Step 3.2: Diversity assessment optimization and data augmentation parameter confirmation: Diversity assessment indicators include in-sample diversity (D) intra The formula is as follows: In the formula, Var(x) i ) represents the variance of the i-th class of samples, and c is the total number of classes. The larger the variance, the more dispersed the samples are within that class, that is, the higher the diversity within the samples. Inter-sample diversity (D) inter The formula is as follows: In the formula, This represents the distance between the means of two samples from different categories; The greater the distance, the more significant the difference between categories and the higher the diversity among samples; Step 3.3: By iteratively optimizing the data augmentation parameters, different augmentation sample sets are generated, and the augmentation sample sets are evaluated based on predefined diversity evaluation indicators to finally find the optimal data augmentation parameters.
4. The few-sample data augmentation method for website fingerprinting attacks according to claim 3, characterized in that: Step 4 specifically involves: Step 4.1: Perform data augmentation based on the data augmentation parameters obtained in Step 3.3 to obtain the final augmented dataset; Step 4.2: Train the website fingerprinting attack model using the augmented dataset, and save the trained model.
5. A system for implementing the few-sample data augmentation method for website fingerprinting attacks as described in any one of claims 1-4, characterized in that: This includes website fingerprint collection devices, website fingerprint cleaning devices, data augmentation devices, and website prediction devices. The website fingerprint collection device captures the traffic transmitted within the local area network and dumps and saves the acquired traffic. The website fingerprint cleaning device is responsible for pre-cleaning the collected traffic; The data augmentation device augments the website fingerprint sequence and performs diversity assessment and optimization. The website prediction device uses the augmented data sequence to perform website classification prediction.
6. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that: When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1-4.
7. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-4.
Citation Information
Patent Citations
Diversity-based sample screening method, system and device and medium
CN112308143A
Encrypted malicious traffic detection and attack identification method based on deep learning
CN115589314A