A fingerprint attack method for multi-page websites
Through technical means such as convolutional neural network and BalanceCascade algorithm, the problem of poor recognition effect of existing Web site fingerprint attacks in multi-page scenarios is solved, and higher recognition accuracy and practicality are achieved, especially when processing samples. Balance and overlapping traffic with pages.
Patent Information
- Application Number
- CN202211030388.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-08-26
AI Technical Summary
The existing Web site fingerprint attack technology is poor in real scenarios, especially in multi-page scenarios, and the problem of imbalanced sample categories affects the recognition accuracy.
Convolutional neural network is used to distinguish single page/multi-page, and segmentation point recognition method is designed based on BalanceCascade algorithm. Fingerprint recognition model is built using residual network and multi-head self-attention mechanism, and tail-end missing and front-end overlapping traffic sequences are respectively processed to improve recognition Accuracy.
It improves the practicality and accuracy of Web site fingerprint attacks, solves the problem of sample imbalance and poor recognition effect with high page overlap rate, and enhances the ability to identify traffic on multiple pages.
Smart Images

Figure CN115378726B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a multi-page oriented Web site fingerprint attack method, belonging to the technical field of traffic analysis (Traffic Analysis) and anonymity network (Anonymity Network). Background Art
[0002] Web is one of the most important applications of the Internet, carrying a wide variety of services, including a large amount of user privacy data. In order to protect the privacy and security of communication, anonymous communication technology has emerged and has been widely deployed, but the problem of anonymous abuse has become increasingly serious. Web site fingerprint attack, as a technology that uses side channel analysis methods to extract target site features to form fingerprints and identify sites, is of great significance for strengthening the supervision of anonymous communication traffic and promoting the development of communication privacy protection technology. However, most of the existing Web site fingerprint attack work is carried out offline in an ideal environment, for example, it is assumed that the traffic data collected by the attacker belongs to a single page and does not contain noise, etc., and there is little research on evaluating its attack performance in real scenarios. Therefore, Web site fingerprint attack technology in multi-page scenarios still needs further research. Summary of the invention
[0003] Purpose of the invention: In view of the poor practicality of existing website fingerprint attack technologies in real scenarios, the present invention proposes a multi-page website fingerprint attack technology. The solution achieves the distinction between unknown obfuscated traffic by constructing a single-page / multi-page classification model, and designs a segmentation point recognition method based on the BalanceCascade algorithm to segment multi-page traffic. Then, for the segmented tail missing traffic sequence and front overlapping traffic sequence, fingerprint recognition models based on residual networks and multi-head self-attention mechanisms are constructed respectively to achieve multi-page website fingerprint recognition.
[0004] Technical solution: This invention proposes a fingerprint attack solution for multi-page websites. The solution is divided into five parts, namely single page / multi-page distinction, single page identification, segmentation point identification, segmented tail missing traffic sequence identification and front-end overlapping traffic sequence identification, as follows:
[0005] (1) Single page / multiple page distinction: Using the time series characteristics of network traffic, a convolutional neural network is used to identify whether unknown traffic is generated by accessing a single page or multiple pages;
[0006] (2) Single page identification: Use the deep learning-based Web site fingerprint attack method to identify the single page traffic identified in (1);
[0007] (3) Multi-page segmentation point identification: For the multi-page traffic identified in (1), relevant features are extracted from the uplink data packets, and a segmentation point identification method is designed based on the BalanceCascade algorithm to obtain the traffic segmentation points, thereby segmenting the multi-page traffic into the site A traffic sequence and the site B traffic sequence;
[0008] (4) Identification of tail missing traffic sequence: This traffic sequence does not contain traffic packets from other pages, but a part of the tail traffic packets are missing. In view of the characteristics of this sequence, a deeper neural network model is constructed using the residual network, so that the model can extract more effective features from limited fragments;
[0009] (5) Identification of front-end overlapping traffic sequences: This traffic sequence contains a portion of the tail traffic data of the previous page at the front end of the traffic. To this end, the traffic feature sequence is first divided into multiple groups, and the multi-head self-attention mechanism is used to calculate the attention weight for each group. Finally, the attention weight is multiplied by the original traffic feature sequence to generate a new traffic feature and identify it, thereby improving the recognition accuracy of the site B traffic sequence.
[0010] Furthermore, the step (1) specifically includes:
[0011] (11) Restore the TCP datagram to Tor cell data, and further represent the traffic sequence as a Tor cell time sequence;
[0012] (12) A single page / multi-page recognition model is constructed using a convolutional neural network with three convolution groups, and a sigmoid function is used as the activation function and a binary cross entropy function is used as the loss function;
[0013] (13) Input the network traffic time series into the single-page / multi-page recognition model and obtain the final classification result.
[0014] Furthermore, the step (2) specifically includes:
[0015] (21) For the identified single-page traffic, the traffic sequence is represented as a Tor cell direction sequence;
[0016] (22) A single page recognition model is constructed based on deep learning. The model is built by superimposing four convolution groups, and a Droppout layer is added to each convolution group to alleviate the occurrence of overfitting. The sigmoid function is used as the activation function and the cross entropy function is used as the loss function.
[0017] (22) Input the single-page traffic direction sequence into the single-page recognition model and obtain the recognition result of the first site.
[0018] Furthermore, the step (3) specifically includes:
[0019] (31) Mark the first HTTP request data packet accessing site B in the multi-page traffic as a true split point, and mark the remaining uplink data packets as false split points;
[0020] (32) extracting the time characteristics and quantity characteristics of the data packets before and after the segmentation point;
[0021] (33) The uplink packet data set is divided into a true segmentation point data set P and a false segmentation point data set N. P, N and the number of iterations T are input into the algorithm as parameters. The FPR threshold f that the classifier should reach is calculated using the size of P and N, that is, the probability of misclassifying a false segmentation point as a true segmentation point, as shown in the following formula:
[0022]
[0023] (34) Randomly select a subset N of the same size as P from the pseudo-split point dataset N i , merged with P to generate a balanced data set D i , using the balanced data set D i Train to generate XGBoost base classifier and adjust parameter θ i Control the FPR threshold of the classifier to f, and then delete all the false segmentation point samples that are judged correctly from the data set N;
[0024] (35) Repeat step (34) T-1 times. The segmentation point recognition model finally generated is obtained by integrating multiple base classifiers. The FPR threshold f is determined so that after T-1 iterations, the number of samples in the false segmentation point data set N is as follows:
[0025] Therefore, in the last iteration, all samples in N are extracted for training, ensuring that all samples participate in the construction of the model and obtaining the final segmentation point recognition model;
[0026] (36) Using the segmentation point recognition model obtained in step (35), the probability of each point being a segmentation point is obtained, and the point with the largest probability is selected as the segmentation point of the traffic. The traffic segment before the data packet corresponding to the segmentation point is the traffic sequence of site A with missing tail traffic, and the traffic segment after the segmentation point is the traffic sequence of site B with overlapping front traffic.
[0027] Furthermore, the step (4) specifically includes:
[0028] (41) A tail-end missing sequence recognition model is constructed by alternately adding identity blocks and convolution blocks;
[0029] (42) The direction sequence of the tail-end missing traffic is input into the model constructed in step (41) to obtain the probability that the sequence belongs to each site, and finally the site with the largest probability is selected as the prediction result.
[0030] Furthermore, the step (5) specifically includes:
[0031] (51) Input the direction sequence of the front-end overlapping traffic into the residual network to obtain a feature sequence;
[0032] (52) Flatten the feature sequence generated in step (51) into a one-dimensional tensor by column, and split it into feature blocks of the same length;
[0033] (53) The multi-head attention mechanism is used to calculate the attention weights between feature blocks, multiply the feature blocks of each group by the attention weights, and finally the Softmax classifier is used for classification.
[0034] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:
[0035] 1. The present invention relaxes the strong assumption of the traditional Web site fingerprint attack model that there is no background traffic, and designs a multi-page Web site fingerprint attack technology that is closer to real-world scenarios and improves the practicality of Web site fingerprint attacks.
[0036] 2. Analyze the access process of multiple pages, mark the true segmentation point as the first HTTP request data packet to access the second site, and mark the remaining upstream packets as false segmentation points. There is an imbalance problem in sample categories, which affects the accuracy of true segmentation point recognition. Therefore, the present invention designs a traffic segmentation point recognition algorithm based on the BalanceCascade algorithm to solve the sample imbalance problem, improve the recognition accuracy of the model for minority class samples, and thus improve the final recognition accuracy of each page.
[0037] 3. Analyzing the traffic of the first segmented site, it is found that a portion of the tail traffic is missing. Therefore, the present invention uses a residual network to construct a deeper neural network model, so that more effective features can be extracted from limited fragments, thereby improving the recognition accuracy of the site.
[0038] 4. The existing Web site fingerprint attack technology has poor recognition effect on multi-page traffic with a high page overlap rate. The present invention analyzes the traffic of the second site containing overlapping traffic and constructs new traffic features using a multi-head self-attention mechanism, so that the features related to the second site contribute more to the classification results, and the features related to the previous site have little impact on the classification results, thereby improving the recognition accuracy of the site. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 Schematic diagram of the attack model of the present invention.
[0040] Figure 2 It is a schematic diagram of the structure of the tail end missing flow sequence recognition model of the present invention.
[0041] Figure 3 It is a schematic diagram of the front-end overlapping traffic sequence feature grouping process of the present invention.
[0042] Figure 4 It is a schematic diagram of the site identification process corresponding to the front-end overlapping traffic sequence of the present invention. DETAILED DESCRIPTION
[0043] The present invention designs and implements a multi-page website fingerprint attack technology. The technology is divided into five parts, namely single page / multi-page distinction, single page identification, segmentation point identification, segmented tail missing traffic sequence identification and front end overlapping traffic sequence identification. Specifically including:
[0044] 1. Single page / multi-page distinction
[0045] The present invention uses a convolutional neural network to construct a single-page / multi-page recognition model, which is a type of feedforward neural network that includes convolution calculations and has a deep structure. The input sequence is divided into small pieces by convolution operations to extract local features, and the weights are dynamically adjusted by the back-propagation algorithm to achieve a good classification effect. The recognition model proposed in the present invention is composed of three convolution groups in total, each of which includes a convolution layer, a batch normalization layer, an activation layer, and a maximum pooling layer, and finally a fully connected layer as the output. Since the model is to solve a binary classification problem, after the fully connected layer, the present invention uses a sigmoid function as an activation function and a binary cross entropy function as a loss function. Finally, the traffic time direction sequence is input into the constructed convolutional neural network to obtain the classification result.
[0046] 2. Single page recognition
[0047] The present invention uses a convolutional neural network to construct a single page recognition model. The model consists of four convolution groups, each of which contains two convolutional layers, two batch normalization layers, two activation layers, a maximum pooling layer, and a Droppout layer. The model is built by superimposing convolutional groups, and finally the fully connected layer is used as the output. Since the model needs to solve a multi-classification problem, after the fully connected layer, the present invention uses the softmax function as the activation function and the cross entropy function as the loss function. Finally, the traffic direction sequence is input into the constructed convolutional neural network to obtain the classification result.
[0048] 3. Multi-page segmentation point recognition
[0049] In a multi-page network flow, the split point can be divided into an upstream packet split point and a downstream packet split point. In order to separate the traffic of two pages as much as possible, the present invention selects the first HTTP request data packet sent by the access site B as the upstream packet split point, and the last downstream data packet received by the access site A as the downstream packet split point. During the Web site access process, the number of downstream messages is much larger than the number of upstream messages. Therefore, the present invention selects the upstream packet split point as the overlapping traffic split point to reduce the total number of identification data packets.
[0050] The essence of split point identification is to determine whether each uplink packet in the traffic sequence is the first HTTP request sent by accessing site B. Therefore, split point identification can be transformed into a supervised classification problem: the uplink data packets in the traffic need to be marked as true split points and false split points. The present invention records the sending time and direction of each Tor cell in the page access process by modifying the Tor source code. By analyzing the log information, the multi-page access process can be obtained.
[0051] When a user accesses site A through Tor, he must first send a relay cell to instruct the exit node to establish a TCP connection with the website. Only after receiving a successful response to the TCP connection, will an HTTP GET message request be sent to communicate subsequent data. When accessing site B, the same steps will be followed. While waiting for the successful response to the TCP connection of site B, the data packet of the first page is still being transmitted, which results in a large number of traffic packets about site A before and after the first relay cell sent to access site B, and the traffic characteristics are not obvious. At the same time, considering that the HTTP GET request will cause a burst of traffic in the downlink message in a short period of time after it is sent, there is a more obvious traffic characteristic. Therefore, the present invention marks the true split point as the first HTTP request data message for accessing site B, rather than the first relay cell sent.
[0052] The present invention extracts the segmentation point features based on the following two points: first, in the early stage of page access, it is necessary to send an access request to the site, and in the later stage of page access, the main data is the response data of the page. The present invention extracts the time features and quantity features of the data packets before and after the segmentation point.
[0053] In a network traffic with multiple pages overlapping, there is only one true segmentation point, and the rest of the uplink packets are false segmentation points, which makes the sample categories in the uplink packet data set unbalanced, which may cause the trained model to have a high recognition accuracy for false segmentation points and a low recognition accuracy for true segmentation points. Therefore, the present invention designs and uses the BalanceCascade algorithm to solve the classification problem of unbalanced sample categories. First, the uplink packet data set is divided into a true segmentation point data set P and a false segmentation point data set N, and P, N and the number of iterations T are input as parameters into the algorithm. The size of P and N is used to calculate the FPR threshold f that the classifier should reach, that is, the probability of misclassifying a false segmentation point as a true segmentation point, as shown in the following formula:
[0054]
[0055] Secondly, randomly select a subset N of the same size as P from the pseudo-split point dataset N i , merged with P to generate a balanced data set D i , using the dataset D i Train to generate XGBoost base classifier and adjust parameter θ i The FPR of the control classifier is f, and then all the false segmentation point samples that are correctly judged are deleted from the data set N, and then the next iteration is entered to generate a new base classifier in the same way. The final generated segmentation point recognition model is obtained by integrating multiple base classifiers. The determination of the FPR threshold f makes the number of samples in the false segmentation point data set N after the algorithm has gone through T-1 rounds of iterations as shown in the following formula:
[0056]
[0057] Therefore, the last iteration will extract all samples from N for training, which ensures that after T iterations, all samples can participate in the construction of the model. The BalanceCascade algorithm is an undersampling method, but it uses supervised learning and Boosting mechanisms to solve the problem of information loss in traditional random undersampling and improve the model's recognition accuracy for minority class samples. The specific algorithm flow is as follows:
[0058]
[0059] After training the segmentation point recognition model, it is necessary to identify all the uplink packets in the multi-page traffic, obtain the probability of each point being a segmentation point, and finally select the point with the largest probability value as the segmentation point of the multi-page traffic to divide the traffic into segments.
[0060] 4. Identification of tail-end missing traffic sequence
[0061] Although the tail missing traffic sequence truncates the original traffic, unlike the front overlapping traffic sequence, the sequence does not contain traffic data packets from other pages. Therefore, the model only needs to be constructed for incomplete network traffic fragments. Compared with the complete traffic sequence, the tail missing traffic sequence is shorter and can extract fewer effective features. Therefore, the present invention learns deeper features by increasing the depth of the network. However, neural networks that are too deep will have the problem of gradient disappearance, resulting in a decrease in recognition accuracy. The present invention solves the problem of gradient disappearance by introducing a residual network. The residual network can transfer gradient information to the deeper levels of the neural network through jump connections, effectively improving the problems of gradient disappearance and network degradation caused by the excessive depth of the neural network.
[0062] The residual network is composed of multiple residual blocks, where the residual blocks can be divided into two types: identity blocks and convolution blocks. The present invention realizes the construction of the model by alternately adding identity blocks and convolution blocks, such as Figure 2 The input of the model is the direction sequence of traffic. After extracting features through the residual network, the softmax classifier is used for classification to obtain the probability that the sequence belongs to each station. Finally, the station with the largest probability is selected as the prediction result.
[0063] 5. Front-end overlapping traffic sequence identification
[0064] The front-end overlapping traffic sequence contains a part of the tail traffic data of the previous page at the front end of the traffic. Therefore, the recognition model of this segment needs to be used to identify the network traffic segment with noise.
[0065] First, the feature generation process is similar to the tail missing sequence recognition. The input of the model is the direction sequence of the traffic flow, and the residual network is used to generate the feature sequence from the original traffic sequence.
[0066] Next, the present invention flattens the feature sequence into a one-dimensional tensor by flattening the columns. After the feature sequence is flattened, the present invention splits the feature sequence into feature blocks of the same length, which makes some feature blocks at the tail end not contain overlapping traffic, reducing the impact of the traffic sequence of site A. The feature grouping process is as follows: Figure 3 shown.
[0067] Next, in the process of site identification, different weights need to be assigned to different feature blocks, that is, low weights are assigned to feature blocks related to site A, and high weights are assigned to feature blocks related to site B. This can make the features related to site B contribute more to the classification results, and the features related to site A have less impact on the classification results, thereby improving the accuracy of site identification.
[0068] The present invention uses a multi-head self-attention mechanism to solve the problem of weight allocation of feature blocks. The multi-head self-attention mechanism is an improvement on the self-attention mechanism, which is derived from the attention mechanism. The attention mechanism is generally used in the field of natural language processing. It can help the model notice the words that play a key role in the classification results, assign high weights to these words, and assign low weights to other unimportant words. The present invention compares each feature block to each word in the sequence, and uses a multi-head self-attention mechanism to calculate the attention weights between feature blocks. Through the processing of the multi-head self-attention mechanism, feature blocks with high label relevance will obtain higher attention weights, that is, feature blocks without overlapping traffic will obtain greater attention, so more weights can be retained, and for feature blocks with overlapping traffic, the multi-head self-attention mechanism will give a lower score, which also reduces the impact of the tail sequence of site A on the final recognition result. For the grouped features, the present invention uses a multi-head self-attention mechanism to calculate the attention weights of each feature block and other feature blocks, and then multiplies the feature blocks of each group by the attention weight, and finally uses a Softmax classifier for classification. The site recognition process is as follows Figure 4 shown.
[0069] The English abbreviations used in the present invention are explained in Chinese as follows:
[0070] 1. Web, the full name is World Wide Web, which is interpreted as Global Wide Area Network in Chinese, also known as the World Wide Web;
[0071] 2.TOR, the full name is The Onion Router, which is interpreted as Onion Router in Chinese;
[0072] 3.TCP, the full name is Transmission Control Protocol, which is explained in Chinese as Transmission Control Protocol;
[0073] 4.HTTP, the full name is Hyper Text Transfer Protocol, which is interpreted as Hypertext Transfer Protocol in Chinese;
[0074] 5.FPR, the full name is False Positive Rate, which is explained in Chinese as false positive rate.
[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application rather than to limit its protection scope. Although the present application has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that after reading the present application, those skilled in the art can still make various changes, modifications or equivalent substitutions to the specific implementation methods of the application, but these changes, modifications or equivalent substitutions are all within the protection scope of the claims to be approved.
Claims
1. A multi-page website fingerprint attack method, characterized in that: The method includes: (1) Single-page / multi-page distinction: First, the network traffic is represented as a time-direction sequence of Tor cells. Using the time series features, a convolutional neural network is used to identify whether the unknown traffic is generated by accessing a single page or multiple pages. The specific process of distinguishing between single page and multiple pages is as follows: (11) Restore the TCP datagram to Tor cell data, and further represent the traffic sequence as a Tor cell time sequence; (12) A single page / multi-page recognition model is constructed using a convolutional neural network with three convolution groups, and a sigmoid function is used as the activation function and a binary cross entropy function is used as the loss function; (13) Input the network traffic time series into the single page / multi-page recognition model and obtain the final classification result; (2) Single-page identification: For the identified single-page traffic, use the deep learning-based Web site fingerprint attack method to identify it; The single page identification specifically includes: (21) For the identified single-page traffic, the traffic sequence is represented as a Tor cell direction sequence; (22) A single page recognition model is constructed based on deep learning. The model is built by superimposing four convolution groups, and a Droppout layer is added to each convolution group to alleviate the occurrence of overfitting. The sigmoid function is used as the activation function and the cross entropy function is used as the loss function. (23) Inputting the single-page traffic direction sequence into the single-page recognition model and obtaining the recognition result of the first site; (3) Identification of multi-page segmentation points: For the identified multi-page traffic, firstly, relevant features are extracted from the uplink data packets, and a model is designed to identify the traffic segmentation points, thereby segmenting the multi-page traffic into the traffic sequence of site A where the tail traffic is missing and the traffic sequence of site B where the front traffic overlaps; The multi-page segmentation point identification specifically includes: (31) For the identified multi-page traffic, mark the first HTTP request data packet accessing site B in the traffic as a true split point, and mark the remaining uplink data packets as false split points; (32) extracting the time characteristics and quantity characteristics of all data packets before and after the segmentation point; (33) The uplink packet data set is divided into a true segmentation point data set P and a false segmentation point data set N. P, N and the number of iterations T are input into the algorithm as parameters. The FPR threshold f that the classifier should reach is calculated using the size of P and N, that is, the probability of misclassifying a false segmentation point as a true segmentation point, as shown in the following formula: (34) Randomly select a subset N of the same size as P from the pseudo-split point dataset N i , merged with P to generate a balanced data set D i , using the balanced data set D i Train to generate XGBoost base classifier and adjust parameter θ i Control the FPR threshold f of the XGBoost base classifier, and then delete all the false segmentation point samples that are judged correctly from the data set N; (35) Repeat step (34) T-1 times. The segmentation point recognition model finally generated is obtained by integrating multiple base classifiers. The FPR threshold f is determined so that after T-1 iterations, the number of samples in the false segmentation point data set N is as follows: (36) Using the segmentation point recognition model obtained in step (35), the probability of each point being a segmentation point is obtained, and the point with the largest probability is selected as the segmentation point of the traffic. The traffic segment before the data packet corresponding to the segmentation point is the traffic sequence of site A with missing tail traffic, and the traffic segment after the segmentation point is the traffic sequence of site B with overlapping front traffic. (4) Identification of tail missing traffic sequences: The segmented traffic sequence of site A does not contain traffic packets of other pages, but is missing a portion of tail traffic packets. Compared with the complete traffic sequence, the traffic sequence of site A is shorter and has fewer effective features that can be extracted. Therefore, we increase the network depth to learn deeper features and use the residual network to solve the gradient vanishing problem. The tail end missing traffic sequence identification specifically includes: (41) A tail-end missing sequence recognition model is constructed by alternately adding identity blocks and convolution blocks; (42) Input the direction sequence of the tail end missing flow into the model constructed in step (41) to obtain the probability that the sequence belongs to each station, and finally select the station with the largest probability as the prediction result; (5) Identification of front-end overlapping traffic sequences: The front end of the traffic sequence of site B contains a part of the tail traffic data of the previous page. Therefore, the traffic feature sequence is first grouped, and the multi-head attention mechanism is used to calculate the attention weight for each group. Finally, the attention weight is multiplied by the original traffic feature sequence to generate a new traffic feature for identification. The front-end overlapping traffic sequence identification specifically includes: (51) Input the direction sequence of the front-end overlapping traffic into the residual network to obtain a feature sequence; (52) Flatten the feature sequence generated in step (51) into a one-dimensional tensor by column, and split it into feature blocks of the same length; (53) The multi-head attention mechanism is used to calculate the attention weights between feature blocks, multiply the feature blocks of each group by the attention weights, and finally the Softmax classifier is used for classification.
