Website fingerprint defense method based on generative adversarial network
By generating virtual data packets through adversarial generative networks and dynamic bandwidth mechanisms, this approach addresses the shortcomings of existing website fingerprinting defense solutions in terms of defense performance and targeting, achieving effective resistance to website fingerprinting attacks and reducing defense costs.
Patent Information
- Application Number
- CN202411200227.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-08-29
AI Technical Summary
Existing website fingerprinting defense solutions are insufficient in terms of defense performance and targeting, especially when facing deep website fingerprinting attacks. They also suffer from high packet latency or high data overhead during deployment.
A defense method based on adversarial generative networks is adopted. Virtual data packets are generated by training a generator, and traffic is adjusted using a dynamic bandwidth mechanism to confuse network traffic patterns and resist website fingerprinting attacks.
It effectively defends against website fingerprinting attacks, reduces defense costs and bandwidth consumption, and improves user experience and defense performance.
Smart Images

Figure CN118890210A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to network security technology, and in particular relates to a website fingerprint defense method based on adversarial generation network. Background Art
[0002] As people use the Internet more and more frequently for work and entertainment, network surveillance has become a common threat to people's privacy. In order to protect user privacy, Tor, an anonymous network based on onion routing, has become one of the most popular privacy-enhancing technologies. It prevents public disclosure of the association between servers and clients by routing traffic using layered encrypted chain relays (i.e., circuits). However, Tor's privacy can be compromised by a traffic analysis method called website fingerprinting. In website fingerprinting, a local eavesdropper passively observes and collects side channel information of the web browser client's network traffic, such as packet size, packet timestamp, and packet sequence, to identify the websites visited by the client (website fingerprinting does not require breaking encryption).
[0003] In order to defend against website fingerprint attacks, researchers have proposed a variety of defense measures. Current defense methods have high packet delay or high data overhead, which affects user experience. The deployment of some defense methods relies on prior information about web page access, which is often difficult to obtain in advance in actual situations. Some lightweight website fingerprint defense methods have poor defense effects against deep website fingerprint attacks. Many website fingerprint defense schemes have been proposed, which cover or confuse the characteristics of a sensitive traffic by filling virtual data packets. However, these defense methods only consider global traffic sequence statistics and lack personalized filling design for specific protected traffic. Therefore, the currently proposed website fingerprint defense schemes are insufficient in defense performance and targeting. Summary of the invention
[0004] Purpose of the invention: To solve the deficiencies in the defense performance and pertinence of the currently proposed website fingerprint defense scheme, a website fingerprint defense method based on an adversarial generation network is provided. This method targets the network traffic generated by network users, generates the traffic pattern of each website traffic from the perspective of traffic bursts and the time interval between traffic bursts based on an adversarial generation network, adjusts the traffic through a dynamic bandwidth mechanism, obfuscates the network traffic pattern information, and successfully resists the website fingerprint attack based on a deep neural network. Intelligent obfuscation of website traffic is achieved, solving the problem of privacy protection of web page access in an anonymous network.
[0005] Technical Solution
[0006] A website fingerprint defense method based on an adversarial generation network of the present invention comprises the following steps:
[0007] A website fingerprint defense method based on adversarial generation network, characterized in that for any website traffic w s , based on the adversarial generative network method, the traffic pattern w of the website is generated. s 1 , when defending, the website traffic of other websites is used as the defense shaping target, and the dynamic bandwidth mechanism is used to add virtual data packets to make w s Become a defense sample that can resist website fingerprint attacks s ′; the defense sample w s The generation process of ′ includes:
[0008] Step (1): Traffic processing mechanism
[0009] Collect network traffic: Use packet capture tools to collect access traffic, convert the captured traffic into a specific format of five-tuples, design common features such as the number of request packets and the number of corresponding packets based on expert knowledge, and label each traffic with the corresponding website.
[0010] Extract the direction and time characteristics of data packets in network traffic: Some data packets in network traffic are sent by the client, and the other part is sent by the server. The sending directions from the two senders are extracted;
[0011] The extracted packet direction features in the network traffic are converted into burst form: the burst form is defined as a sequence of continuous packets in the same direction, and the packet sending direction information in the burst form is composed of the number of packets contained in each burst; the burst time information in the burst form is composed of the timestamp of the first packet contained in each burst, and the burst time interval is defined as the difference of the burst time information;
[0012] Step (2): Training of the traffic pattern generator
[0013] Use website traffic burst data to train the adversarial generative network, generate traffic patterns of each website from two perspectives: traffic burst and time interval between traffic bursts. During the training, train the deep website fingerprint classifier to guide the training of the generator and accelerate the convergence of the adversarial generative network: the website fingerprint classifier is composed of a convolutional neural network to achieve higher accuracy; train the adversarial generative network to obtain a generator that can generate various website traffic burst data;
[0014] Step (3): Traffic shaping target selection
[0015] The trained generator is used to generate traffic burst data of various sensitive websites to form a random traffic pool. A traffic burst data is randomly selected from the pool as the traffic shaping target w t ;
[0016] Step (4): Dynamic bandwidth mechanism
[0017] According to the difference between actual traffic and traffic shaping targets, dynamic bandwidth mechanisms are constructed, including normalization mechanism, probability skip mechanism and dynamic control mechanism.
[0018] Step (5), real-time filling algorithm
[0019] Generate virtual data packets based on timestamp, direction, size and other information; use dynamic bandwidth mechanism to generate virtual data packets based on original traffic w s Fill some virtual data packets in the original flow, shape the burst contained in the original flow to the target flow, and match some characteristics of the target flow with the original flow to become the new original flow w s ′.
[0020] As a further improvement of the present invention, in step 2, network traffic bursts and burst time intervals are used as training data to train an adversarial generative network as a traffic pattern generator for subsequent use; the training goal of the adversarial generative network is to train a generator that can generate realistic data distribution, namely:
[0021]
[0022] Among them, P f is the distribution of false data, P r is the distribution of the real data, is the linear insertion point between real data and false data, and the corresponding distribution is P u The output of D is the logarithm of the probability that the input is real, which we call log probability. The first two terms represent the discriminator trying to maximize the log probability between real samples and fake samples for each potential generator, while the generator tries to minimize this probability. The third term is the regularization term, in order to make D satisfy the Lipschitz constraint.
[0023] Both the generator and the discriminator are multi-layer perceptrons. The input of the generator is two vectors, namely the burst size direction and the burst time interval. Two generators are trained.
[0024] While training the adversarial generative network, the deep neural network is trained to synchronously guide the generation of the generator. The deep neural network is composed of a convolutional neural network, and the loss function is the cross entropy function.
[0025] The attacker network is trained using the true and generated trajectories, the corresponding burst sequences and interval sequences are extracted from the trajectories as the input of the corresponding attacker network, and the attacker network is trained using the cross entropy loss.
[0026] As a further improvement of the present invention, the specific process of selecting the target flow in step 3 is:
[0027] Use the generator trained in step 2 to generate traffic bursts and burst time interval data for different websites as the defense target traffic pool; when performing defense, randomly extract traffic burst data from it as the target traffic for defense shaping of this traffic.
[0028] As a further improvement of the present invention, the dynamic bandwidth mechanism in step 4, when defending, due to the diversity of traffic between different websites, the unmodified shaping of traffic will cause huge bandwidth overhead; in order to control bandwidth consumption, it is divided into three modules, namely normalization, probability skipping and dynamic control modules;
[0029] Normalization module: Each time the buffer is filled, the size of the buffer is compared with the size of the traffic shaping target, the number of false packets filled in the blank is reduced, and a large number of meaningless false packets are avoided in the blank time. The randomness of the sending size is ensured to ensure the effectiveness of the defense, while reducing the retention of packets in the buffer, and alleviating the problem of data timeout and failure to load the page normally caused by the packets that should be sent being retained in the buffer. This module has two parameters, α0 and α1, and α0<α1, and the reference burst is b. f , the buffer size is b u , then after defense, the size after defense is b s :
[0030]
[0031] Probabilistic skip module: When the size of the data packet in the buffer area is 0, there is a certain probability that the false data packet will be skipped. The purpose is to avoid filling a large number of meaningless data packets in the blank time, and to strengthen the defense effect by reducing the frequency of false data packets filled in the blank and increasing randomness.
[0032] Dynamic control module: before each filling, the ratio of the number of false data packets filled in the history to the real data packets is calculated. The sending direction (request direction) and the receiving direction (response direction) calculate their own ratios respectively to prevent the data packets in opposite directions from interfering with the defense filling of each other's data packets and affecting the defense effect.
[0033] As a further improvement of the present invention, the specific process of filling the data packet in step 5 is:
[0034] During defense, the burst and burst time intervals are randomly generated as reference samples to shape the traffic during defense; due to the diversity of traffic between different websites, shaping the traffic without modification will cause huge bandwidth overhead; using the dynamic bandwidth mechanism, each time filling, according to the cached data packets and shaping targets in the real-time cache area, fill part of the virtual data packets in the original traffic, shape the burst contained in the original traffic to the target traffic, and fit part of the characteristics of the target traffic with the original traffic to become a new defended traffic. Beneficial effect: The present invention aims at the problem that the existing website fingerprint defense lacks consideration of prior knowledge acquisition, resulting in unreasonable deployment assumptions, combines adversarial generation network technology, generates a sample traffic pool for defense, randomly selects target traffic in the random traffic pool, and covers the original traffic characteristics by bidirectionally filling virtual data packets. Using the dynamic bandwidth mechanism, the defense cost is reduced, the classifier of the website fingerprint attacker is confused, and the privacy security of anonymous traffic users is effectively protected. The present invention uses adversarial generation network technology to enhance the deployability of the defense scheme; uses dynamic bandwidth control technology to reduce the bandwidth overhead and delay cost caused by deploying defense, and enhances the user browsing experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is the overall flow chart of the present invention.
[0036] Figure 2 This is a schematic diagram of the training of the traffic pattern generator in the present invention.
[0037] Figure 3 It is a schematic diagram of the data packet filling process in the present invention. DETAILED DESCRIPTION
[0038] The technical solution of the present invention is described in detail below, but the protection scope of the present invention is not limited to the embodiments.
[0039] The present invention combines adversarial generative network technology with dynamic bandwidth control technology to confuse the user's website fingerprint traffic characteristics. First, the traffic is captured as a traffic data set, and then while training the adversarial generative network, a website fingerprint classifier with a certain classification accuracy is trained to guide the generator in the adversarial generative network to better generate samples. When a network traffic needs to be protected, the generator obtained by previous training generates a sample traffic pool for defense, and randomly selects the target traffic in the random traffic pool. The original traffic characteristics are covered by bidirectional filling of virtual data packets, and the dynamic bandwidth mechanism is used to reduce the defense cost, resulting in the classifier being unable to accurately classify the category of the protected traffic. The present invention can cover the original traffic characteristics by bidirectional filling of virtual data packets, confuse the classifier of the website fingerprint attacker, realize the premise of realistic deployability, and protect the privacy and security of anonymous traffic users.
[0040] The present invention achieves effective traffic filling through the following technical features, thereby confusing the classifier of the website fingerprint attacker:
[0041] 1. The adversarial generative network trained by the present invention can meet most defense implementation prerequisites through the generator method, and the deployability of the solution is increased.
[0042] 2. The present invention creates a dynamic bandwidth mechanism, formulates an effective filling scheme, improves defense performance, and reduces defense costs.
[0043] like Figure 1 As shown, the present invention provides a website fingerprint defense method based on an adversarial generation network, comprising the following steps:
[0044] Step (1): Traffic processing mechanism
[0045] Collect network traffic: Collect access traffic through packet capture tools, convert and save the captured traffic into a specific format of five-tuples, design common features such as the number of request packets and the number of corresponding packets based on expert knowledge, and label each traffic with the corresponding website.
[0046] Extract the direction and time characteristics of data packets in network traffic: Some data packets in network traffic are sent by the client, and the other part is sent by the server. The sending directions from the two senders are extracted.
[0047] Convert the extracted packet direction features in the network traffic into burst form: a burst can be defined as a sequence of continuous packets in the same direction. The packet sending direction information in the burst form consists of the number of packets contained in each burst. The burst time information in the burst form consists of the timestamp of the first packet contained in each burst. The burst time interval is defined as the difference of the burst time information.
[0048] Step (2): Training of the traffic pattern generator
[0049] Use website traffic burst data to train the adversarial generative network, generate traffic patterns of each website from two perspectives: traffic burst and time interval between traffic bursts, and simultaneously train the deep website fingerprint classifier during training to guide the training of the generator and accelerate the convergence of the adversarial generative network: the website fingerprint classifier is composed of a convolutional neural network to achieve higher accuracy. Train the adversarial generative network to obtain a generator that can generate various website traffic burst data.
[0050] Step (3): Traffic shaping target selection
[0051] According to the actual deployment requirements, the generator trained in step 2 is used to generate traffic burst data of different websites as the defense target traffic pool. When performing defense, traffic burst data is randomly extracted from it as the target traffic for defense shaping of this traffic.
[0052] Step (4): Dynamic bandwidth mechanism
[0053] In actual application scenarios, the defense solution needs to control the bandwidth consumption and delay consumption caused by virtual data packet filling. Excessive bandwidth consumption will cause the defense solution to affect the user's browsing experience, and too little bandwidth consumption will lead to poor defense effect. In order to achieve effective defense while reducing defense costs, defenders need to reduce defense consumption in some way.
[0054] During defense, due to the diversity of traffic between different websites, unmodified traffic shaping will cause huge bandwidth overhead. In order to control bandwidth consumption, the dynamic bandwidth mechanism is divided into three modules: normalization, probability skipping and dynamic control modules.
[0055] Normalization module: Each time the buffer is filled, the size of the buffer is compared with the size of the traffic shaping target, the number of false packets filled in the blank is reduced, and a large number of meaningless false packets are avoided in the blank time. The randomness of the sending size is guaranteed to ensure the effectiveness of the defense, while reducing the retention of packets in the buffer, and alleviating the problem of data timeout and failure to load the page normally caused by the packets that should be sent being retained in the buffer. This module has two parameters, α0 and α1, and α0<α1, and the reference burst is b f , the buffer size is b u , then after defense, the size after defense is b s .
[0056]
[0057] Probabilistic skip module: When the size of the data packet in the buffer is 0, there is a certain probability that the false data packet will be skipped. The purpose is to avoid filling a large number of meaningless data packets in the blank time, and to strengthen the defense effect by reducing the frequency of false data packets filled in the blank and increasing randomness.
[0058] Dynamic control module: before each filling, the ratio of the number of false data packets filled in the history to the real data packets is calculated. The sending direction (request direction) and the receiving direction (response direction) calculate their own ratios respectively to prevent the data packets in opposite directions from interfering with the defense filling of each other's data packets and affecting the defense effect.
[0059] Step (5), real-time filling algorithm
[0060] Generate virtual data packets based on timestamp, direction, size and other information. During defense, randomly generate bursts and burst time intervals as reference samples to shape traffic during defense. Due to the diversity of traffic between different websites, shaping traffic without modification will cause huge bandwidth overhead. Using the dynamic bandwidth mechanism, each time it is filled, some virtual data packets are filled in the original traffic according to the cached data packets in the real-time cache area and the shaping target, shaping the bursts contained in the original traffic to the target traffic, and fitting some characteristics of the target traffic with the original traffic to form new defended traffic.
[0061] The virtual data packets contain meaningless virtual information. Since an anonymous network is used between the client and the server, the communication information is encrypted and transmitted, so attackers cannot distinguish between virtual data packets and real data packets.
[0062] The other steps of this embodiment are the same as above, but the real-time filling algorithm is as follows: Figure 3 As shown, the details are as follows:
[0063]
[0064] Explanation of the above virtual packet filling algorithm
[0065] Assume there is a group of sites that need to be protected, and there is a traffic instance w in the site s , the defense method needs to be against w s Fill the data packet to make it a protected traffic sequence w s ′.
[0066] w s is a sequence of data packet direction features. Data packets can be considered to have two directions. The outgoing direction refers to the direction in which the client sends data packets to the server, and the incoming direction refers to the direction in which the server sends data packets to the client. The outgoing direction is expressed as +1 and the incoming direction is expressed as -1. s It is expressed as an array consisting of +1 and -1. s can be converted into a burst form, that is, w s ={b1,b2,…,b n}, where n is the number of bursts. i is the length of the ith burst.
[0067] When defending, the generator first generates N traffic samples to form a random traffic pool T r When defending, a traffic shaping target is randomly selected from the sample traffic pool, T r ={(b1,t1),(b2,t2),…,(b n , t n )}t iis the burst time interval format, b i It is a sudden form.
[0068] Get the buffer size of time period ti as b u , get the buffer size as b u ,
[0069] The ratio of the number of sent false data packets to the real data packets is calculated as parameter p. Based on this parameter, the normalization parameter a and the probability skip parameter β are calculated respectively.
[0070] During the current burst defense, a random number is generated. If the random number is greater than the probability skip parameter β, the correction of this burst is abandoned and the next burst defense is entered. Otherwise, the following normalization is performed.
[0071] If the current burst size b i Less than t i a, this burst is corrected to random(1,t i a), the purpose of this is to reduce the filling of blank time. Otherwise, it is corrected to random(t i ,b u ), the purpose of this is to increase the randomness of defense and ensure the effectiveness of defense.
[0072] Finally, b at each iteration s The sequence is the traffic after defense, output w s ′.
[0073] The above embodiments show that the present invention fills a small amount of virtual data packets in the network traffic based on the training traffic pattern generator to interfere with the classifier of the website fingerprint attacker and avoid the risk of user communication information leakage. On this basis, the present invention uses adversarial generation network technology to enhance the deployability of the defense scheme; it uses dynamic bandwidth control technology to reduce the bandwidth overhead caused by deploying defenses while ensuring the defense effect and the user's browsing experience. Enhanced deployability. The present invention enhances the pertinence of defense technology, realizes customized protection of traffic, achieves a balance between protection performance and defense cost, and solves the privacy protection problem of anonymous network users.
Claims
1. A website fingerprint defense method based on adversarial generation network, characterized in that: For any website traffic s , based on the adversarial generative network method, the traffic pattern w of the website is generated. s 1 ,,When defending, the website traffic of other websites is used as the defense shaping target, and the dynamic bandwidth mechanism is used to add virtual data packets to make w s Become a defense sample that can resist website fingerprint attacks s ′; the defense sample w s The generation process of ′ includes: Step (1): Traffic processing mechanism Collect network traffic: Use packet capture tools to collect access traffic, convert the captured traffic into a specific format of five-tuples, design common features of the number of request packets and the number of corresponding packets based on expert knowledge, and label each traffic with the corresponding website; Extract the direction and time characteristics of data packets in network traffic: Some data packets in network traffic are sent by the client, and the other part is sent by the server. The sending directions from the two senders are extracted; The extracted packet direction features in the network traffic are converted into burst form: the burst form is defined as a sequence of continuous packets in the same direction, and the packet sending direction information in the burst form is composed of the number of packets contained in each burst; the burst time information in the burst form is composed of the timestamp of the first packet contained in each burst, and the burst time interval is defined as the difference of the burst time information; Step (2): Training of the traffic pattern generator Use website traffic burst data to train the adversarial generative network, generate traffic patterns of each website from two perspectives: traffic burst and time interval between traffic bursts. During the training, train the deep website fingerprint classifier to guide the training of the generator and accelerate the convergence of the adversarial generative network: the website fingerprint classifier is composed of a convolutional neural network to achieve higher accuracy; train the adversarial generative network to obtain a generator that can generate various website traffic burst data; Step (3): Traffic shaping target selection The trained generator is used to generate traffic burst data of various sensitive websites to form a random traffic pool. A traffic burst data is randomly selected from the pool as the traffic shaping target w t ; Step (4): Dynamic bandwidth mechanism According to the difference between actual traffic and traffic shaping targets, dynamic bandwidth mechanisms are constructed, including normalization mechanism, probability skip mechanism and dynamic control mechanism. Step (5), real-time filling algorithm Generate virtual data packets based on timestamp, direction, size and other information; use dynamic bandwidth mechanism to generate virtual data packets based on original traffic w s Fill some virtual data packets in the original flow, shape the burst contained in the original flow to the target flow, and match some characteristics of the target flow with the original flow to become the new original flow w s ′.
2. According to claim 1, a website fingerprint defense method based on adversarial generation network is characterized in that: In step 2, network traffic bursts and burst time intervals are used as training data to train the adversarial generative network as a traffic pattern generator for subsequent use; the training goal of the adversarial generative network is to train a generator that can generate realistic data distributions, namely: Among them, P f is the distribution of false data, P r is the distribution of the real data, is the linear insertion point between real data and false data, and the corresponding distribution is P u ; The output of D is the logarithm of the probability that the input is real, which we call log probability; the first two terms represent that the discriminator tries to maximize the log probability between the real sample and the fake sample of each potential generator, and the generator tries to minimize this probability; the third term is the regularization term, in order to make D satisfy the Lipschitz constraint; Both the generator and the discriminator are multi-layer perceptrons. The input of the generator is two vectors, namely the burst size direction and the burst time interval. Two generators are trained. While training the adversarial generative network, the deep neural network is trained to synchronously guide the generation of the generator. The deep neural network is composed of a convolutional neural network, and the loss function is the cross entropy function. The attacker network is trained using the true and generated trajectories, the corresponding burst sequences and interval sequences are extracted from the trajectories as the input of the corresponding attacker network, and the attacker network is trained using the cross entropy loss.
3. According to claim 1, a website fingerprint defense method based on adversarial generation network is characterized in that: The specific process of selecting the target traffic in step 3 is as follows: Use the generator trained in step 2 to generate traffic bursts and burst time interval data for different websites as the defense target traffic pool; when performing defense, randomly extract traffic burst data from it as the target traffic for defense shaping of this traffic.
4. According to claim 1, a website fingerprint defense method based on adversarial generation network is characterized in that: In step 4, the dynamic bandwidth mechanism, when defending, will cause huge bandwidth overhead due to the diversity of traffic between different websites. In order to control bandwidth consumption, it is divided into three modules, namely normalization, probability skipping and dynamic control module. Normalization module: Each time the data is filled, the size of the buffer area is compared with the size of the traffic shaping target, the number of false data packets filled in the blank is reduced, and a large number of meaningless false data packets are avoided in the blank time. The randomness of the sending size is ensured to ensure the effectiveness of the defense, while reducing the retention of data packets in the buffer area, alleviating the problem of data timeout and failure to load the page normally caused by the data packets that should be sent being retained in the buffer area. This module has two parameters, α0 and α1, and α0<α1, and the reference burst is b f , the buffer size is b u , then after defense, the size after defense is b s : Probabilistic skip module: When the size of the data packet in the buffer area is 0, there is a certain probability that the false data packet will be skipped. The purpose is to avoid filling a large number of meaningless data packets in the blank time, and to strengthen the defense effect by reducing the frequency of false data packets filled in the blank and increasing randomness. Dynamic control module: before each filling, the ratio of the number of false data packets filled in the history to the real data packets is calculated. The sending direction, i.e. the request direction, and the receiving direction, i.e. the response direction, calculate their own ratios respectively. This is to prevent the data packets in opposite directions from interfering with the defense filling of each other's data packets and affecting the defense effect.
5. According to claim 1, a website fingerprint defense method based on adversarial generation network is characterized in that: The specific process of filling the data packet in step 5 is: During defense, the burst and burst time intervals are randomly generated as reference samples to shape the traffic during defense. Due to the diversity of traffic between different websites, shaping the traffic without modification will cause huge bandwidth overhead. Using the dynamic bandwidth mechanism, each time it is filled, some virtual data packets are filled in the original traffic according to the cached data packets in the real-time cache area and the shaping target, and the bursts contained in the original traffic are shaped to tend to the target traffic, and some characteristics of the target traffic are matched with the original traffic to form new defended traffic.
Citation Information
Patent Citations
Network background flow generation method and system based on conditional generative adversarial network
CN109889452A
Intelligent traffic confusion method and system for website fingerprint defense and computer storage medium
CN113347156A
DDoS attack detection and defense method based on statistical measurement in SDN-IIOT and related equipment
CN116232777A
Multi-sample website fingerprint defense method based on adversarial sample filling
CN118432893A
Network security architecture of dynamic reconfigurable system based on FPGA (Field Programmable Gate Array) and implementation method
CN118473835A
Cited By
Website fingerprint defense-oriented online message-level traffic simulation method and system, and storage medium
CN122348865A
An online packet-level traffic simulation method, system and storage medium for website fingerprint defense
CN122348865B
