A deep learning-based website fingerprinting attack method

By using an improved CNN model and transfer learning mechanism, combined with packet orientation and temporal features, the problems of low accuracy and high overhead in existing technologies are solved, and efficient website fingerprint attack identification is achieved.

CN116366299BActive Publication Date: 2025-11-18BEIJING INST OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310187942.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2025-11-18
Estimated Expiration
2043-03-02

AI Technical Summary

Technical Problem

Existing deep learning-based website fingerprinting attack methods suffer from low accuracy and high training costs, making them ineffective in dealing with dynamic changes in traffic patterns and new defense strategies.

Method used

An improved CNN model architecture is adopted, which combines packet direction and time as input features, and utilizes transfer learning and fine-tuning mechanisms to update the model with a small amount of data to adapt to changes in traffic patterns.

Benefits of technology

It improves the accuracy of website identification, reduces training costs, and can effectively resist defense strategies and adapt to dynamic changes in traffic patterns.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116366299B_ABST
    Figure CN116366299B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of website fingerprint attack identification method based on deep learning, belong to the technical field of encrypted traffic identification in computer network security.Encrypter monitors the communication between client and entry relay node entry, extracts packet direction and time information as website fingerprint.Then, attacker creates attack model for website fingerprint attack, the model takes two sequences of packet direction and timestamp as input, and takes website category as output.To train attack model, attacker uses collected traffic data as training set, then uses training set to train CNN model, which is used as classifier to perform classification task.After that, attacker uses trained classifier to perform website fingerprint attack identification.The model is updated regularly after training, and continues to be used in the attack phase after model update, and classifies and identifies unknown traffic.Compared with prior art, the present application has high identification accuracy and small model training overhead.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to a website fingerprint attack method based on deep learning and belongs to the technical field of encrypted traffic identification in computer network security. BACKGROUND

[0002] With the improvement of privacy protection awareness, Internet users tend to hide the real access target in communication to protect personal privacy information. The anonymous communication network Tor is committed to protecting the privacy of users accessing the network. When transmitting data, it will encrypt the data multiple times and randomly select three nodes to establish a link, which can ensure that any Tor node or eavesdropper cannot associate the user's identity with the website accessed by the user, thereby realizing anonymous access to the website. However, the anonymous network has brought new network security problems while protecting the privacy of users. Many unscrupulous people use anonymous networks to cover up their network criminal behavior. Therefore, the regulation technology for anonymous network traffic is very important.

[0003] Website fingerprint attack is a new traffic identification technology that can reduce the anonymity of Tor. Some information in the traffic generated by users accessing different websites can form the fingerprint of the website, such as packet direction, time and size. Website fingerprint attack is to use the website fingerprint information in the traffic to realize the classification of the website. In recent years, the method based on deep learning has gradually replaced the method based on machine learning and has achieved good results, becoming a research hotspot. However, in order to protect the anonymity of Tor, many defense methods against website fingerprint attack have been proposed, which can effectively reduce the classification accuracy. And due to the rapid change of traffic patterns, it is difficult for the trained model to maintain effectiveness for a long time. Using a large number of samples to constantly retrain the model will consume a lot of computing resources and time cost. Therefore, it is necessary to propose a more effective website fingerprint attack method to cope with the challenges brought by the dynamic change of traffic patterns and new defense methods.

[0004] At present, the existing website fingerprint attack identification technology based on deep learning includes the following schemes:

[0005] Scheme one: website fingerprint attack method based on convolutional neural network. This method draws on the effective deep learning model in the field of image recognition and designs a more complex convolutional neural network architecture than previous website fingerprint attack research. In the case of sufficient training data, it can achieve high recognition accuracy.

[0006] Scheme two: website fingerprinting attack method based on small sample learning. This method migrates the small sample learning related model to the scene of website fingerprinting attack. The attacker first pre-trains an effective model and fixes it as a feature extractor, then uses the feature extractor to extract features for a small amount of target website training data, and finally trains the classifier using these features. This method breaks the unrealistic assumption that the test and training data have similar distributions in most studies, can reduce the collection and training workload of large data sets, and reduce the adverse effects of handling different network conditions.

[0007] However, the above scheme still has the following defects:

[0008] 1. Low accuracy. The first scheme requires a large amount of training data to achieve ideal recognition, but it is difficult to collect and update traffic data. When the training data is insufficient, the recognition accuracy of this scheme will decrease significantly, and it cannot achieve the actual required recognition accuracy. The second scheme supports different distributions of training and test data, but its recognition accuracy is not ideal. At the same time, both of these two schemes cannot effectively identify traffic that has passed through new defense methods.

[0009] 2. Large overhead. The first scheme does not support different distributions of training and test data, so it needs to retrain the model every period of time, and in addition, it requires a large amount of training data for each training model, so the overhead of collecting data and training the model is very large. The second scheme has a larger model, so the training overhead of the feature extractor itself is relatively large. SUMMARY

[0010] The purpose of the present application is to overcome the low accuracy, large training overhead and other defects and deficiencies of existing website fingerprinting attack recognition methods, which result in low practicality, and creatively proposes a website fingerprinting attack method based on deep learning. The method of the present application is only used for network security research.

[0011] The purpose of the present application is solved by the following technical scheme.

[0012] First, the technical terms involved in the present application are explained.

[0013] Convolutional Neural Network (CNN): a deep network widely used in classification tasks, which has proven its effectiveness in image classification, speech recognition, etc. CNN automatically extracts features from raw input data through multiple convolutional layers, pooling layers, and nonlinear activation functions. Batch normalization layers and dropout layers are usually used after convolutional layers to prevent overfitting and improve performance. The last part of CNN is the fully connected layer, which combines all local features into global features to calculate the final score of each class.

[0014] Transfer learning: A machine learning technique that can transfer knowledge learned on a source task to a target task, thereby improving the performance of the target task model in prediction. Transfer learning is effective because the shallow layers of the model generally learn the general features of the task, while the deep layers focus more on learning the specific features of the task as the network deepens. This can directly transfer the model's shallow layers, and then adjust the deeper layers to adapt to the new task.

[0015] Fine-tuning: Fine-tuning is a transfer learning method that saves a lot of computing resources and time. If the new data set is similar to the pre-trained data set, fine-tuning the trained model can make the model adapt to the new data set.

[0016] A deep learning-based website fingerprinting attack method, comprising the following steps:

[0017] Step 1: Traffic collection.

[0018] The attacker needs to listen to the communication between the client and the entry relay node entry, and extract the packet direction and time information as the website fingerprint.

[0019] Step 2: Model training.

[0020] The attacker creates an attack model, i.e. a CNN model, for website fingerprinting attack, which takes two sequences of packet direction and timestamp as input and website category as output.

[0021] To train the attack model, the attacker uses the collected traffic data as the training set, and then uses the training set to train the CNN model, which is used as a classifier to perform the classification task.

[0022] Step 3: Website fingerprinting attack.

[0023] The attacker uses the trained classifier to perform website fingerprinting attack. First, the attacker captures unknown traffic between the user and the entry node, and then feeds the unknown traffic into the trained classifier for classification to infer the target website of the traffic.

[0024] Step 4: Model fine-tuning.

[0025] Since the website traffic pattern changes from time to time, the trained model needs to be updated regularly.

[0026] The attacker needs to collect a number of example data for each monitored website. The trained model obtained in the training phase will be used as a pre-trained model, and the attacker only needs to fine-tune the parameters of the pre-trained model using new traffic data to adapt the model to the new traffic pattern.

[0027] When the model is adjusted, the attacker uses the adjusted model to classify new unknown traffic and re-identify the attack process.

[0028] Advantages

[0029] Compared with the prior art, the present application has the following advantages:

[0030] 1. High accuracy. Compared with scheme one and scheme two, the present method improves the architecture of the attack model, uses packet direction and time as website fingerprints, improves the accuracy of website identification, alleviates the accuracy decline caused by insufficient training data, and can resist common defense strategies.

[0031] 2. Small overhead. The present scheme can achieve better identification effect with less data, relaxes the requirements of the attack, reduces the training overhead, and uses a more concise transfer learning idea in supporting different data distributions. Compared with scheme two, the present scheme significantly shortens the training time. BRIEF DESCRIPTION OF DRAWINGS

[0032] Figure 1 is a schematic diagram of the overall process of the method of the present application;

[0033] Figure 2 is a schematic diagram of the model structure of the present application. DETAILED DESCRIPTION

[0034] The present application will be further described in detail below in combination with the drawings.

[0035] As shown in Figure 1 , a website fingerprinting attack method based on deep learning includes the following steps:

[0036] Step 1: Traffic collection.

[0037] In order to achieve the identification of user access to websites, the attacker needs to collect traffic data as a training set to train an effective attack model.

[0038] Specifically, the attacker first selects a group of websites of interest, which are referred to as monitored websites, and collects traffic for these monitored websites. Since website fingerprinting attack is a passive attack, the attacker can only listen to the communication between the client and the ingress relay node, and cannot insert, modify or discard data packets. Since the data packet content is encrypted and cannot be obtained, only the packet direction and time information tracked by the corresponding website traffic are extracted as the website fingerprint of the website.

[0039] Step 2: Model training. Use the data set collected in the traffic collection stage to train the attack model.

[0040] Specifically, as Figure 2As shown, the attack model is a CNN model with 12 convolutional layers, each followed by a normalization layer and an activation layer. Two convolutional layers are used before the pooling layer to increase the network depth, thereby ensuring the CNN model fully learns the patterns.

[0041] To more clearly describe the model's architecture, it is divided into three modules, including the directional model f. d Time module f t and combined module f c The direction sequence is represented by D, where D = (d1, d2, ..., dn). L ), d i ∈{-1,+1}; the time series is represented as T, T=(t1,t2,…,t L ), t i >0; The model input is X, X=(D,T), which includes direction and time series.

[0042] Initially, sequences D and T are input into the direction module and time module, respectively, to obtain the corresponding feature map D′=f d (D), T′=f t (T). Then, D′ and T′ are concatenated and fed into the combining module to obtain the probability that X belongs to a specific class. Compared to other blocks, the combined module adds a pooling layer before every two convolutional blocks and a dropout layer after them. Before the fully connected layer, the output of the convolution is converted into a vector by a global average pooling layer, which better integrates global spatial information and reduces the number of parameters.

[0043] When obtained Then, use The training loss, Loss, is calculated using the original data labels Y to update the model parameters. This method employs a label smoothing strategy on top of the cross-entropy loss. This is a regularization method that adds random noise to each dimension of the original label representation. This strategy can avoid the problem of model overfitting and make the model have stronger generalization ability.

[0044] Step 3: Attack Phase.

[0045] This stage is the execution phase of a website fingerprinting attack. Attackers need to eavesdrop on the link between the client and the entry relay node to obtain unknown traffic from users accessing unknown websites, extract the packet size and time series from the unknown traffic, and input them into an initially trained or tuned model to obtain website classification results.

[0046] Step 4: Fine-tune the model.

[0047] Due to the constantly changing traffic patterns, CNN models cannot always maintain high accuracy. It is very difficult to periodically re-collect a large amount of data, and how to use a small amount of traffic data to make the model effective for a long time is a thorny problem.

[0048] The method fully utilizes the idea of transfer learning, and designs a fine-tuning mechanism to enable the model to support new data distribution. Specifically, the working process of the fine-tuning mechanism is as follows:

[0049] The attacker uses the source data set to train a robust model. The CNN model trained during the training process is regarded as a pre-trained model. When the traffic pattern changes and the model cannot accurately identify the website, the attacker re-collects N examples for each monitored website. Considering the difficulty of traffic collection, N is usually set to be small (for example, 5 examples for each website). In the method, a threshold δ is specified. If the attacker has the ability to collect the number of examples N for each website greater than the threshold δ, the attacker chooses to retrain the model. If the number of examples N is not greater than the threshold δ, the attacker needs to fine-tune the parameters of the model using new traffic data.

[0050] When the model is fine-tuned, all the parameters before the fully connected layer of the pre-trained model are migrated to the same new model, and only the fully connected layer of the new model needs to be initialized. After that, the attacker can fine-tune the new model using new traffic data.

[0051] When the model is adjusted, the attacker uses the adjusted model to classify new unknown traffic and re-identify the attack process.

Claims

1. A website fingerprinting attack method based on deep learning, characterized in that, Includes the following steps: Step 1: Traffic Collection; Attackers monitor the communication between the client and the entry point relay node, extracting data packet direction and time information as a website fingerprint; Step 2: Model training; Attackers create attack models for website fingerprinting attacks, namely CNN models, which take two sequences, packet direction and timestamp, as input and website category as output. To train the attack model, the attacker uses the collected traffic data as a training set, and then uses the training set to train a CNN model, which is used as a classifier to perform classification tasks. The attack model is a CNN model with 12 convolutional layers, each followed by a normalization layer and an activation layer; two convolutional layers are used before the pooling layer to increase the network depth and ensure that the CNN model fully learns the pattern. The model consists of three modules: the orientation module f d Time module f t and combined module f c The direction sequence is represented by D, where D = (d1, d2, ..., d...). L ), d i ∈{-1,+1}; the time series is represented as T, T=(t1,t2,…,t L ), t i >0; The model input is X, X = (D, T), which includes direction and time series; Initially, sequences D and T are input into the direction module and time module, respectively, to obtain the corresponding feature map D′=f d (D), T′=f t (T); then, D′ and T′ are concatenated and fed into the combining module to obtain the probability that X belongs to a specific category. Compared to other blocks, the concatenation module adds a pooling layer before every two convolutional blocks and a dropout layer after them; before the fully connected layer, the output of the convolution is converted into a vector by a global average pooling layer; When obtained After that, use The training loss Loss is calculated using the original data labels Y to update the model parameters; a label smoothing strategy is used on top of the cross-entropy loss to add random noise to each dimension of the original label representation; Step 3: Website fingerprinting attack; Attackers use a trained classifier to perform website fingerprinting attacks; First, the attacker captures unknown traffic between the user and the entry node, and then feeds the unknown traffic into a trained classifier for classification in order to infer the target website of the traffic; Step 4: Model fine-tuning; The trained model is updated regularly: the attacker collects several sample data for each monitored website. The trained model obtained during the training phase is used as a pre-trained model. The attacker uses the new traffic data to fine-tune the parameters of the pre-trained model. Once the model is adjusted, attackers use the adjusted model to classify new, unknown traffic and re-identify the attack process.

2. The website fingerprinting attack method based on deep learning as described in claim 1, characterized in that, In step 1, the attacker first selects a group of websites of interest, which are called monitored websites, and collects traffic from these monitored websites. Attackers can only listen to the communication between the client and the ingress relay node; they cannot insert, modify, or discard data packets.

3. The website fingerprinting attack method based on deep learning as described in claim 1, characterized in that, In step 3, the attacker listens on the link between the client and the entry relay node to obtain unknown traffic from users accessing unknown websites. The attacker extracts the packet size and time series from the unknown traffic and inputs them into the initially trained model or the adjusted model to obtain the website classification results.

4. The website fingerprinting attack method based on deep learning as described in claim 1, characterized in that, The fine-tuning mechanism used in step 4 is as follows: The attackers use the source dataset to train a robust model; the trained CNN model is treated as a pre-trained model during the training process; when the traffic pattern changes and the model can no longer accurately identify the website, the attackers re-collect N examples for each monitored website. A threshold δ is defined. If the number of examples N collected by the attacker for each website is greater than the threshold δ, the attacker chooses to retrain the model. If the number of examples N is not greater than the threshold δ, the attacker needs to use new traffic data to fine-tune the model's parameters. During model fine-tuning, all parameters before the fully connected layer of the pre-trained model are transferred to the same new model. The fully connected layer of the new model only needs to be initialized. After that, the attacker uses new traffic data to fine-tune the new model. Once the model is adjusted, attackers use the adjusted model to classify new, unknown traffic and re-identify the attack process.

Citation Information

Patent Citations

  • Multi-scene low-resource encrypted traffic identification method and system based on large-scale pre-training

    CN115412295A