Website fingerprint attack-oriented few-sample data enhancement method and system, medium and program product
By utilizing the diversified data enhancement method of packet timestamps and direction characteristics in website fingerprint attacks, combined with diversity evaluation and optimization algorithms, the problems of insufficient samples and changes in data distribution in the existing technology are solved, and the performance and adaptability of the model are significantly improved.
Patent Information
- Application Number
- CN202411990952.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The prior art requires a large amount of similar pre-trained data in website fingerprint attacks, which is difficult to adapt to attackers with limited resources. In addition, existing data augmentation methods are poorly effective due to insufficient diversity in sample generation, especially when data distribution changes.
A variety of data enhancement methods are adopted that comprehensively utilizes the two key features of timestamp and direction in the data packet. Through data enhancement in spatial and temporal dimensions, diversified training samples are generated, and diversity evaluation and optimization algorithms are designed to improve the data enhancement effect.
It improves the performance and adaptability of the website fingerprint attack model under the condition of few samples, enhances the adaptability and robustness of the model to changes in complex network environments, and significantly improves the attack success rate in WTF-PAD defense and concept drift scenarios.
Smart Images

Figure CN119788394A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of website fingerprint attacks, and specifically relates to a method, system, medium and program product for enhancing small sample data for website fingerprint attacks. Background Art
[0002] The current website fingerprint attack methods based on deep learning rely on each website having enough training samples. However, in practical applications, it is a difficult challenge for attackers with limited resources to obtain sufficient data in a short period of time. The existing data enhancement methods in the field of website fingerprint attacks have poor performance due to insufficient sample generation diversity.
[0003] In existing research, Sirinam et al. proposed TripletFingerprinting (TF). They believe that most website fingerprint attacks assume that the training data and the test data have similar distributions and are collected from the same type of network environment at about the same time, which limits the practicality of these attack methods. The TF method only requires a small number of training samples. Even if pre-training is done using data from three years ago, only 5 samples per category are needed to achieve an accuracy rate of nearly 85%. However, when the WF defense solution is used to protect traffic, the effect of the TF model is significantly reduced.
[0004] Wang et al. proposed Adaptive Fingerprinting (AF), which uses adversarial domain adaptation technology. It also requires pre-training of the feature extractor to extract the embedded features of the target dataset, and finally inputs these features into the k-NN classifier for website fingerprinting. The performance of AF attack is better than TF attack, and the training time of feature extractor is shorter, but its advantage is not obvious when the sample size is small.
[0005] Chen et al. proposed the Transfer Learning Fingerprint Attack (TLFA); they used training data collected from non-target websites to train a strong embedding model, and then fine-tuned the task-specific classifier model with a small amount of labeled training data from the target website. However, they did not propose a more effective website fingerprint attack model, but only provided a model fine-tuning method for the few-shot website fingerprint attack problem. This method assumes that the pre-training dataset and the target dataset have similar data distributions, without considering the more complex situation under different data distribution patterns.
[0006] The above studies all require a large amount of pre-training data similar to the test data, which is not applicable to attacker models with limited resources. When the data distribution changes drastically, their feature extractors may fail, so they are not practical. Chen et al. proposed the HDA data enhancement method, which borrowed data enhancement technology from the image field and implemented data enhancement in the field of website fingerprint attacks. When the number of samples per class was 20, an accuracy rate of more than 90% was achieved. However, since this method only uses the direction of the data packet and ignores the timestamp information, the diversity of the data enhancement samples is insufficient, and it does not fully consider the various changes that may occur in the network environment during the website fingerprint attack. Summary of the invention
[0007] The purpose of the present invention is to provide a method, system, medium and program product for enhancing data with a small number of samples for website fingerprint attacks, which comprehensively utilizes the two key features of timestamp and direction in the data packet and adopts multiple data enhancement methods to improve sample diversity. A set of diversity evaluation and optimization algorithms are designed to further improve the data enhancement effect, thereby solving the problem of reduced performance of website fingerprint attacks due to insufficient samples.
[0008] The purpose of the present invention is achieved through the following technical solutions:
[0009] A small sample data enhancement method for website fingerprint attacks, the specific steps are as follows:
[0010] Step 1: Website fingerprinting
[0011] When a user visits a website, a fingerprint of the website is generated. The encrypted traffic generated by the user visiting the website is collected and saved as a PCAP file.
[0012] Step 2: Website fingerprint cleaning
[0013] Clean all traffic in the PCAP file generated in step 1, including removing noise and irrelevant data, while extracting and purifying useful information;
[0014] Step 3: Data enhancement parameter confirmation
[0015] Data enhancement is performed on the website fingerprint sequence, including adding noise, changing sequence length, and perturbing the order of data packets to generate diverse training samples. The quality of the enhanced data is evaluated through predefined intra-sample diversity and inter-sample diversity indicators, and different enhanced sample sets are iteratively generated in combination with parameter optimization, and the optimal enhancement parameters are finally determined to support model training.
[0016] Step 4: Enhanced Data Generation
[0017] The optimal enhancement parameters in step 3 are used to generate the final enhanced data sequence. By retraining the website fingerprint attack model and extracting features, the encrypted traffic is analyzed and classified, and finally the website fingerprint is accurately predicted, thus improving the website classification performance of the model.
[0018] Furthermore, the step 1 is specifically as follows:
[0019] Step 1.1: The traffic collection device will use tshark and tcpdump network probes to collect traffic from the LAN environment;
[0020] Step 1.2: The traffic collection device saves the collected large amount of traffic into multiple PCAP files according to the rules.
[0021] Furthermore, the step 2 is specifically as follows:
[0022] Step 2.1: Clean all data in the PCAP traffic file generated by the traffic collection device to remove noise and irrelevant data; including filtering out data from non-target websites and removing erroneous data packets caused by network interference;
[0023] Step 2.2: Extract and purify useful information from the cleaned traffic data; including identifying and saving key packet features, including timestamp, packet length and transmission direction; and keep the packet length at 5000, deleting any excess and adding 0 if it is less.
[0024] Furthermore, the step 3 is specifically as follows:
[0025] Step 3.1: Spatial dimension data enhancement: continuous erasing, segmented erasing, rotation; temporal dimension data enhancement: random noise, scaling time interval; spatial and temporal dual dimension data enhancement: spatial and temporal mixing; spatial and temporal fusion: multiplication fusion;
[0026] Step 3.2: Diversity evaluation optimization and data enhancement parameter confirmation:
[0027] Diversity evaluation indicators include within-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 sample set, c is the total number of classes, and the larger the variance, the more dispersed the samples in the class, that is, the higher the diversity within the sample;
[0030] The diversity among samples (D inter ), the formula is as follows:
[0031]
[0032] In the formula, Represents the distance between the means of samples of two different categories; the larger the distance, the more significant the difference between categories and the higher the diversity between samples;
[0033] Step 3.3: Generate different enhanced sample sets by iteratively optimizing data augmentation parameters, and evaluate the enhanced sample sets based on predefined diversity evaluation indicators to finally find the optimal data augmentation parameters.
[0034] Furthermore, the step 4 is specifically as follows:
[0035] Step 4.1: Perform data enhancement according to the data enhancement parameters obtained in step 3.3 to obtain the final enhanced data set;
[0036] Step 4.2: Use the enhanced dataset to train the website fingerprint attack model and save the trained model.
[0037] A small sample data enhancement system for website fingerprint attacks, including a website fingerprint collection device, a website fingerprint cleaning device, a data enhancement device, and a website prediction device;
[0038] The website fingerprint collection device captures the traffic transmitted in 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 enhancement device performs data enhancement on the website fingerprint sequence and performs diversity evaluation and optimization;
[0041] The website prediction device uses the enhanced data enhancement sequence to perform website classification prediction.
[0042] A computer-readable storage medium stores a computer program / instruction, which, when executed by a processor, implements the steps of a method for enhancing small sample data against website fingerprint attacks.
[0043] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of a method for enhancing small sample data against website fingerprint attacks.
[0044] The beneficial effects of the present invention are:
[0045] 1. The present invention uses the two key features of the timestamp and direction in the data packet to generate virtual samples through data enhancement methods in the spatial dimension and the temporal dimension. The spatial dimension includes operations such as rotation, masking, and erasing to simulate the situation of data packet loss in a real network environment; the temporal dimension includes operations such as adding random noise and scaling time intervals to simulate the random fluctuations of the arrival time of data packets.
[0046] 2. This paper designs a set of diversity evaluation indicators, including intra-sample diversity and inter-sample diversity, to comprehensively evaluate the diversity of enhanced samples. By iteratively optimizing data enhancement parameters, the diversity of the data set is maximized, providing richer and more favorable training data for model training.
[0047] 3. The present invention combines the characteristics of spatial dimension and time dimension, and obtains fusion characteristics that integrate spatiotemporal information through strategies such as multiplication and fusion, thereby enhancing the adaptability and robustness of the model to changes in complex network environment.
[0048] After a large number of verification experiments, the results show that when the website fingerprint samples of the present invention are small, it can still effectively complete the website fingerprint attack. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a system architecture diagram of the present invention;
[0050] Figure 2 This is a schematic diagram of spatial dimension data enhancement;
[0051] Figure 3 This is a schematic diagram of time dimension data enhancement;
[0052] Figure 4 Schematic diagram of spatial and temporal dual-dimensional data enhancement. DETAILED DESCRIPTION
[0053] The present invention is further described below in conjunction with the accompanying drawings.
[0054] The present invention provides a small sample data enhancement method for website fingerprint attack (abbreviated as DESTDA), according to Figure 1 , the specific steps are as follows:
[0055] Step 1: Website fingerprint collection: When a user visits a website, a website fingerprint of the visit 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 collection device will use network probes such as tshark and tcpdump to collect traffic from the LAN environment;
[0057] Step 1.2: The traffic collection device saves the collected large amount of traffic into multiple PCAP files according to certain rules.
[0058] Step 2: Website fingerprint cleaning: This step will clean all traffic in the PCAP traffic file generated by the traffic collection device, including removing noise and irrelevant data, while extracting and purifying useful information. This step ensures the quality of the data and provides a reliable basis for subsequent analysis and feature extraction.
[0059] Step 2.1: Clean all data in the PCAP traffic file generated by the traffic collection 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 purify useful information from the cleaned traffic data. This includes identifying and saving key packet features, such as timestamp, packet length, and transmission direction, which are essential for subsequent analysis and feature extraction. The packet length is kept at 5000, and any longer is deleted, and any shorter is padded with 0.
[0061] Step 3: Confirmation of data enhancement parameters: This step will perform data enhancement on the website fingerprint sequence to generate more diverse training samples. Specific operations include adding noise, changing sequence length, and disturbing the order of data packets.
[0062] Step 3.1: Spatial dimension data enhancement: continuous erasing, segmented erasing, rotation; temporal dimension data enhancement: random noise, scaling time interval; spatial and temporal dual dimension data enhancement: spatial and temporal mixing; spatial and temporal fusion: multiplication fusion. Figure 2-4 shown.
[0063] Step 3.2: Diversity evaluation optimization and data enhancement parameter confirmation: Diversity evaluation indicators include in-sample diversity (D intra ):
[0064]
[0065] Where Var(x i ) represents the variance of the i-th sample set, c is the total number of categories, and the larger the variance, the more dispersed the samples in the category, that is, the higher the diversity within the sample.
[0066] The diversity among samples (D inter ):
[0067]
[0068] In the formula Represents the distance between the mean values of samples of two different categories. The larger the distance, the more significant the difference between categories and the higher the diversity between samples.
[0069] By iteratively optimizing data augmentation parameters, different augmented sample sets are generated, and the augmented sample sets are evaluated based on predefined diversity evaluation indicators, and finally the optimal data augmentation parameters are found.
[0070] Step 4: Enhanced data generation;
[0071] Step 4.1: Perform data enhancement according to the data enhancement parameters obtained in the previous step to obtain the final enhanced data set.
[0072] Step 4.2: Use the enhanced dataset to train the website fingerprint attack model and save the trained model.
[0073] In order to verify the effectiveness of the present invention in implementing website fingerprint attacks, a data set collected in a real network environment is used for verification.
[0074] The present invention designs five different experiments to verify the website fingerprint attack capability of the present invention. They mainly include:
[0075] 1. Closed world validity experiment: This experiment designed a closed world validity experiment for AWF 100 In the experimental setting, the dataset is subdivided into a training set, a validation set (10 samples per category), and a test set (70 samples per category). The training set considers several small sample settings, with 5, 10, 15, and 20 samples per category. The main purpose of the validation set is for model selection to ensure that the best performing model is applied in the testing phase. This experiment uses the attack success rate as the main performance evaluation indicator.
[0076] In the closed-world validity experiment, the data augmentation strategy proposed in this paper (hereinafter referred to as DESTDA) performs significantly better than other control data augmentation methods under different sample size settings. In particular, when the sample size is 20, the accuracy of DESTDA reaches 95.35%, which is significantly higher than the 45.04% of the traditional DF model. This significant performance improvement is attributed to the dual optimization of the data augmentation strategy based on spatiotemporal features and the diversity optimization algorithm.
[0077] Table 1 Analysis of closed world experiment results
[0078]
[0079] From Table 1, we can observe that, compared with the baseline method that does not use any data augmentation technology, although basic data augmentation methods such as Flipping have achieved certain performance improvements by increasing the diversity of samples, their effect is still limited by the failure to fully capture more complex spatiotemporal relationships. In contrast, the RE and HDA methods simulate network traffic that is closer to the real world by introducing more advanced data perturbations and hierarchical structural changes, thereby effectively improving the generalization ability and accuracy of the model.
[0080] The DESTDA method showed the best performance at all sample sizes, thanks to its comprehensive use of the two key features of the timestamp and direction in the data packet, and further improved the diversity and complexity of the generated samples through the diversity optimization algorithm. This complexity and diversity is the key to improving the accuracy of the model in closed-world experiments, because it can more comprehensively simulate the website fingerprint traffic characteristics in the real world, thereby significantly improving the model's recognition ability under few 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 the few-sample website fingerprint attack model, but also demonstrate the stability and excellent generalization ability of the method under different sample numbers.
[0082] 2. Open World Validity Experiment: In an open world setting, this experiment will use AWF 100 The websites in the target (monitored) category are defined as AWF 400000 The websites in the are defined as non-target (not monitored) categories. From AWF 400000 8020 samples are randomly selected from 400,000 unmonitored websites and divided into training set, validation set and test set, with specific set sizes of 20, 1000 and 7000 respectively. Since the open world experiment needs to identify non-target classes, precision, recall and F1 value are used as evaluation indicators of model performance.
[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 shows significant performance advantages under different sample number settings. It is particularly noteworthy that when the number of samples is 20, its F1 score reaches 84.01%, which is 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] The open world scenario requires the model to not only accurately identify known website fingerprints, but also effectively distinguish unknown website fingerprints, which places higher requirements on the generalization and robustness of the model. Compared with the baseline method that does not use any data enhancement technology, although Flipping improves the diversity of samples through basic data enhancement, it still fails to fully capture more complex spatiotemporal relationships, resulting in limited performance improvement. In contrast, RE and HDA simulate network traffic changes that are closer to the real world by introducing more complex data changes, thereby effectively improving the generalization ability of the model. These methods can better adapt to the uncertainty and changes in the open world by introducing more advanced data perturbations and structural changes, thereby improving the accuracy and robustness of the classifier. The DESTDA method makes comprehensive use of the two key features of timestamp and direction in the data packet, and further improves the diversity and complexity of the generated samples through a diversity optimization algorithm, which is significantly better than 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 can more comprehensively simulate the website fingerprint traffic characteristics in the real world, thereby significantly improving the model's recognition ability under few-sample conditions and its adaptability to new categories.
[0088] In addition, the DESTDA method performed well in Recall, Precision, and F1 scores in the open world experiment, showing the balance of the method in reducing false positives and false negatives. A high Recall value indicates that the model can cover more attacks in real scenarios, while a high Precision indicates the accuracy in identifying attacks. The performance of the DESTDA method in these two aspects shows its ability to effectively identify malicious website access behaviors while protecting user privacy.
[0089] The results of the open-world experiment further verify the practicality and effectiveness of the DESTDA method, especially its applicability when dealing with highly uncertain network environments. These characteristics make the DESTDA method not only suitable for traditional closed-world scenarios, but also effective in dealing with more complex and realistic open-world scenarios.
[0090] 3. Adaptability evaluation under WTF-PAD defense: Compared with the previous two experiments, this experiment is designed to be conducted under a more challenging website fingerprint 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 uses DF95 WTF-PADDataset,100 samples are randomly selected from each website and divided into training set (20 samples), validation set (10 samples) and test set (70 samples), and the attack success rate in the closed world scenario is used as an indicator to evaluate the experimental performance.
[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 shows excellent performance, especially when the number of samples is 20, it reaches an accuracy of 66.56%, which is a significant improvement over the 45.75% of the baseline DF model. It also exceeds all the comparison models.
[0092] WTF-PAD is a defense mechanism designed to increase the difficulty of traffic analysis by introducing additional delays and packets to interfere with the attacker's traffic analysis process. The DESTDA method can maintain a high accuracy in this environment, which shows that its comprehensive use of the two key features of the packet's timestamp and direction not only enhances the diversity of samples, but also improves the model's deep understanding and adaptability to traffic features. Therefore, the DESTDA method can more effectively counter WTF-PAD defense.
[0093] Compared with the baseline method lipping which does not use any data augmentation technology, which enhances data diversity by simple image flipping, although it has improved, it still does not fully adapt to the changes in traffic patterns caused by the WTF-PAD defense mechanism. The performance is relatively poor among all models, especially in low-sample scenarios. RE and HDA introduce more complex data augmentation mechanisms, such as random erasure, which improve the adaptability of the model by introducing structural changes and more advanced data perturbations. Compared with Flipping, they show better adaptability and adversarial capabilities.
[0094] The DESTDA proposed in this invention not only utilizes the timestamp and direction characteristics of the data packet, but also further improves the diversity of samples and the model's ability to recognize complex traffic characteristics through the diversity optimization algorithm. In the WTF-PAD environment, DESTDA shows the best performance, which reflects the important role of the diversity optimization algorithm in complex and interference environments. By deeply simulating the traffic characteristics in a real network environment, DESTDA effectively copes with the random delays and packet disturbances introduced by WTF-PAD, thereby significantly improving the accuracy.
[0095] Through these analyses, it can be seen that DESTDA provides key adaptability and robustness to the model when dealing with WTF-PAD defense. However, the performance improvement of traditional methods is limited due to the lack of adaptive strategies for dynamic network environments. These comparisons not only highlight the advantages of DESTDA in dealing with advanced defense environments, but also reveal the limitations of existing methods in dealing with dynamic and complex attack scenarios.
[0096] Table 3 Analysis of experimental results under WTF-PAD defense
[0097]
[0098] 4. Adaptability evaluation under concept drift: In order to verify the effectiveness of the data enhancement strategy proposed in this paper in resisting concept drift, a concept drift experiment was designed. 100 The data set was used for experiments. Several small sample settings were considered for the training set, with 5, 10, 15, and 20 samples in each category. The tests were conducted after 2, 4, and 6 weeks, with 70 test samples in each category. The attack success rate was used as the performance evaluation indicator.
[0099] Table 4 shows 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 the network environment and data distribution drift. The results show that although the performance of all compared models generally shows a downward trend over time, the DESTDA method maintains a relatively high accuracy rate under all time interval settings. In particular, in the 6-week test interval, the accuracy of DESTDA is as high as 68.21%, which is significantly better than other compared methods.
[0100] Table 4 Experimental results analysis 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 the reliability and stability of the method in long-term applications, which are crucial properties in real-world applications. Compared with the baseline method that does not use any data augmentation technology, Flipping improves performance by increasing sample diversity through simple data augmentation, but still fails to effectively adapt to data changes brought about by time. RE and HDA perform better, mainly because these methods introduce more complex data perturbations and feature change mechanisms, which improve the model's adaptability to new data and understanding of complex network traffic patterns. The advantage of the DESTDA method is that it not only utilizes the two key features of timestamp and direction, but also enhances the utilization efficiency of these features through the diversity optimization algorithm, thereby maintaining stable performance in the concept drift environment. This strategy significantly improves the model's adaptability to time changes and proves the effectiveness of the diversity optimization algorithm in dealing with dynamic network environments. Through this series of comparisons and analyses, it can be clearly seen that various methods have different performances in dealing with concept drift, especially the reliability and stability of the DESTDA method in long-term applications, which is crucial for actual deployment because it reduces the need to frequently update the model due to environmental changes and enhances the practicality and economic efficiency of the method.
[0103] 5. Ablation Experiment: In order to analyze the specific effects of each component of the data enhancement strategy (DESTDA) proposed in this paper, a series of ablation experiments were conducted. 100 The experiment was conducted on the dataset with the same settings as Experiment 1, without any defensive measures. The data augmentation strategies included in this experiment are continuous erasure (D1), segmented erasure (D2), rotation (D3), combination of all data augmentation methods in spatial dimension (DALL), adding random noise (T1), scaling time interval (T2), and combination of all data augmentation methods in temporal dimension (TALL). The spatiotemporal hybrid strategy (DT) was also investigated.
[0104] The results of the ablation experiment are shown in Table 5, which aims to systematically evaluate the specific effects of different data augmentation strategies in the few-shot website fingerprint attack model. This experiment explores the contribution of continuous erasure (D1), segmented erasure (D2), rotation (D3), full spatial dimension enhancement (DALL), adding random noise (T1), time interval scaling (T2), full temporal dimension enhancement (TALL), spatiotemporal data enhancement (DT), and the combination of all data augmentation techniques (DALL+TALL+DT) to the model accuracy.
[0105] Table 5 Ablation experiment results analysis table
[0106]
[0107] (1) Analysis of spatial data enhancement strategies: Both continuous erasure (D1) and segmented erasure (D2) significantly improved the performance of the model, which shows that the robustness of the model can be effectively increased by simulating the phenomenon of packet loss. In particular, segmented erasure (D2) achieved an accuracy of 92.31% when the number of samples was 20, which is a significant improvement over the 45.04% of the baseline DF model. This strategy enhances the model's adaptability to the actual network environment by simulating the instability in the network. Rotation (D3) further improved the model performance, especially when the number of samples was 20, the accuracy reached 93.27%. This shows that by changing the order of data packets, the uncertainty of network delay can be effectively simulated, thereby improving the generalization ability of the model.
[0108] (2) Analysis of temporal data enhancement 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 enhancement strategy: Although spatiotemporal data enhancement (DT) did not improve significantly 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 enhancement 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 combination of all data enhancement techniques (DALL+TALL+DT) shows the best performance in all scenarios, especially when the number of samples is 20, the accuracy reaches 95.35%. This result highlights the importance of the comprehensive application of multiple data enhancement 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) Summary: Ablation experiments show the unique contributions of various data enhancement techniques to model performance improvement and the complexity of their interactions. In particular, the method that comprehensively applies all data enhancement techniques shows significant improvements in various performance indicators, emphasizing the importance of comprehensively considering multi-dimensional data enhancement strategies in the field of website fingerprint 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 technology.
[0112] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for enhancing small sample data against website fingerprint attacks, characterized by: The specific steps are as follows: Step 1: Website Fingerprinting When a user visits a website, a fingerprint of the website is generated. The encrypted traffic generated by the user visiting the website is collected and saved as a PCAP file. Step 2: Website fingerprint cleaning Clean all traffic in the PCAP file generated in step 1, including removing noise and irrelevant data, while extracting and purifying useful information; Step 3: Data enhancement parameter confirmation Data enhancement is performed on the website fingerprint sequence, including adding noise, changing sequence length, and perturbing the order of data packets to generate diverse training samples; The quality of the augmented data is evaluated through predefined intra-sample diversity and inter-sample diversity indicators, and different augmented sample sets are iteratively generated in combination with parameter optimization, and the optimal augmentation parameters are finally determined to support model training; Step 4: Enhanced Data Generation The optimal enhancement parameters in step 3 are used to generate the final enhanced data sequence. By retraining the website fingerprint attack model and extracting features, the encrypted traffic is analyzed and classified, and finally the website fingerprint is accurately predicted, thus improving the website classification performance of the model.
2. According to claim 1, a method for enhancing data with a small number of samples for website fingerprint attacks is characterized by: The step 1 is specifically as follows: Step 1.1: The traffic collection device will use tshark and tcpdump network probes to collect traffic from the LAN environment; Step 1.2: The traffic collection device saves the collected large amount of traffic into multiple PCAP files according to the rules.
3. The method for enhancing small sample data against website fingerprint attacks according to claim 1, characterized in that: The step 2 is specifically as follows: Step 2.1: Clean all data in the PCAP flow file generated by the flow collection 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 purify useful information from the cleaned traffic data; including identifying and saving key packet features, including timestamp, packet length and transmission direction; and keep the packet length at 5000, deleting any excess and adding 0 if it is less.
4. The method for enhancing small sample data against website fingerprint attacks according to claim 1, characterized in that: The step 3 is specifically as follows: Step 3.1: Data enhancement in spatial dimension: continuous erasing, segmented erasing, rotation; data enhancement in temporal dimension: random noise, time interval scaling; Time-space dual-dimensional data enhancement: time-space mixing; Time and space fusion: multiplication and fusion; Step 3.2: Diversity evaluation optimization and data enhancement parameter confirmation: Diversity evaluation indicators include within-sample diversity (D intra ), the formula is as follows: In the formula, Var ( x i) represents the variance of the i-th class sample set, c is the total number of classes, and the larger the variance, the more dispersed the samples in the class, that is, the higher the diversity within the sample; The diversity among samples (D inter ), the formula is as follows: In the formula, Represents the distance between the means of samples of two different categories; The larger the distance, the more significant the difference between categories and the higher the diversity among samples; Step 3.3: Generate different enhanced sample sets by iteratively optimizing data augmentation parameters, and evaluate the enhanced sample sets based on predefined diversity evaluation indicators to finally find the optimal data augmentation parameters.
5. The method for enhancing small sample data against website fingerprint attacks according to claim 1, characterized in that: The step 4 is specifically as follows: Step 4.1: Perform data enhancement according to the data enhancement parameters obtained in step 3.3 to obtain the final enhanced data set; Step 4.2: Use the enhanced dataset to train the website fingerprint attack model and save the trained model.
6. A system for enhancing small sample data against website fingerprint attacks according to any one of claims 1 to 5, characterized in that: It includes a website fingerprint collection device, a website fingerprint cleaning device, a data enhancement device, and a website prediction device; The website fingerprint collection device captures the traffic transmitted in 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 enhancement device performs data enhancement on the website fingerprint sequence and performs diversity evaluation and optimization; The website prediction device uses the enhanced data enhancement sequence to perform website classification prediction.
7. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method described in claims 1-6 are implemented.
8. A computer program product, comprising a computer program / instructions, which, when executed by a processor, implement the steps of the method of claims 1-6.
Citation Information
Patent Citations
Diversity-based sample screening method, system and device and medium
CN112308143A
Self-adaptive fingerprint attack method and system aiming at dynamic growth of target website
CN114500071A
Encrypted malicious traffic detection and attack identification method based on deep learning
CN115589314A
Bad information sample amplification method and system based on encrypted traffic
CN117938545A
Network traffic confrontation sample generation method and system based on time sequence
CN118659907A
Cited By
Website fingerprint defense method for encryption agent
CN120750625A
A website fingerprinting defense method against encryption proxies
CN120750625B
Network intrusion detection model end adversarial training defense method and device
CN121923942A