A traffic obfuscation method based on random link padding and differential privacy
By using a traffic obfuscation method based on random link padding and differential privacy, a Rayleigh-distributed packet insertion schedule is generated and virtual packets are inserted. This solves the problem that existing technologies cannot effectively obfuscate packet length and interval time, thereby improving the security and privacy protection of network users.
Patent Information
- Application Number
- CN202211371666.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-03
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-11-03
AI Technical Summary
Existing traffic obfuscation methods are difficult to effectively defend against website fingerprinting attacks based on neural network classifiers, especially in terms of obfuscating information such as packet length and arrival interval.
A traffic obfuscation method based on random link padding and differential privacy is adopted. By generating a packet insertion schedule that follows a Rayleigh distribution, calculating noise values and changing packet lengths, virtual packets are inserted to obfuscate traffic characteristics, especially the time interval characteristics of the front domain, while also taking into account packet length information.
It improves the online security of users in anonymous networks, effectively obfuscates the characteristics that attackers use to identify target traffic, and enhances privacy protection for packet length and interval.
Smart Images

Figure CN115996138B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security, and in particular to a traffic obfuscation method based on random link filling and differential privacy. Background Art
[0002] As society's dependence on the Internet and information gradually increases, concepts such as data security, communication network security, and privacy protection are gaining more and more attention. Even though people are increasingly using encryption technology to protect personal privacy, statistical features of encrypted traffic such as packet size, packet arrival interval, and packet direction leak user information. Traffic analysis attacks are modeled as a classification problem based on side channel information. Attackers use information such as packet length and time series to extract features and classify them in a group of websites or applications. The more significant and unique the features are, the better the effect of traffic analysis attacks.
[0003] Traffic obfuscation is one of the common technologies used to resist traffic analysis, ensuring that the target traffic cannot be identified by attackers in the observed traffic set. The common traffic obfuscation method is to use various means to randomize information such as target traffic feature fields or statistical features, so that untrusted listeners cannot identify the target traffic when listening to it. However, high-performance machine learning classification algorithms bring huge challenges to traffic obfuscation, resulting in the previous website fingerprint obfuscation method being unable to resist traffic analysis attacks. Therefore, a more effective traffic obfuscation method is needed.
[0004] After searching, the closest prior art is CN113347156, an intelligent traffic obfuscation method, system and computer storage medium for website fingerprint defense. This invention combines direct time sampling and adaptive random filling technology to obfuscate website traffic generated by network users, thereby resisting website fingerprint attacks based on neural network classifiers. However, the prior art only considers the arrival interval of data packets, while the packet length information is also a common feature used in traffic analysis. Summary of the invention
[0005] In order to protect information such as packet length and packet arrival interval, the present invention proposes a traffic obfuscation method based on random link padding and differential privacy, which specifically includes the following steps:
[0006] Collect traffic data of the target website and generate the arrival interval time matrix and data packet length matrix;
[0007] Read fill budget and sampling window according to configuration file;
[0008] Generate a packet insertion schedule that follows Rayleigh distribution according to a fill budget and a sampling window;
[0009] Calculate the noise value of the data packet, and change the length of the data packet according to the noise value;
[0010] Schedule virtual packets according to the schedule and sample IAT;
[0011] Countdown IAT, if five packets arrive during the countdown, then an additional dummy packet is inserted after the IAT countdown ends.
[0012] Further, reading the fill budget and sampling window according to the configuration file includes:
[0013] B c and B s are the padding overhead budgets for the client and proxy server, respectively, n c and n s Respectively represent the number of virtual packets injected at both ends, and n c Obey 1 to B c Uniform distribution between n s Obey 1 to B s Uniform distribution between
[0014] If the maximum filling time and minimum filling time of the server or server side are PT max and PT min For each flow, the client receives min and PT max The filling window w is sampled from a uniform distribution between c , that is, w c Obey PT min to PT max The server side is evenly distributed from PT min and PT max The filling window w is sampled from a uniform distribution between s , that is, w s Obey PT min to PT max Even distribution between the server side as well.
[0015] Furthermore, the client and proxy server generate a data packet insertion schedule that obeys the Rayleigh distribution according to the filling budget and sampling window, respectively, which is expressed as:
[0016]
[0017] Where t represents the timestamp, w represents the sampling window length, and w = {w c , w s},w c Indicates the sampling window of the client, w s Indicates the sampling window of the proxy client.
[0018] Furthermore, the calculation process of the noise value of the data packet is expressed as:
[0019]
[0020] in, is the noise value of the data packet with timestamp t; represents the noise value at time G(t); x[G(t)] represents the packet size at timestamp G(t); x[t] represents the packet size at timestamp t; r t Represents random numbers sampled from Laplace distribution at different times.
[0021] Furthermore, the calculation of the timestamp G(t) includes:
[0022]
[0023] Wherein, D(t) represents the maximum power of 2 divided by the timestamp t, and t=D(t) if and only if t is a power of 2.
[0024] Furthermore, the random numbers r sampled from the Laplace distribution at different times t It is expressed as:
[0025]
[0026] Wherein, Lap() represents the Laplace distribution; ε represents the privacy parameter, which determines the size of the noise value generated; D(t) represents the maximum power of 2 divided by the timestamp t, and t = D(t) if and only if t is a power of 2; Indicates rounding down.
[0027] Furthermore, when the packet length is changed according to the noise value, if the noise generated is ρ and the packet size is s i If ρ>0, the packet size is filled to s i +ρ; if ρ=0, add a virtual packet; if ρ<0, the packet size will be reduced to s i -ρ, and the remainder of the packet will be buffered in the queue until subsequent real or virtual packets are available in the traffic sequence.
[0028] Furthermore, after the IAT countdown ends, the length of an additional virtual data packet is inserted and sampled from the data packet length matrix. The timestamp of the virtual packet is equal to the current traffic timestamp plus the sampled time IAT, and the direction of the virtual packet is the same as that of the previous real data packet.
[0029] The present invention can obfuscate the real features of the original website and improve the security of users surfing the Internet in an anonymous network. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1It is a schematic diagram of the overall process of the present invention;
[0031] Figure 2 4 is a finite state machine transition diagram in an embodiment. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] The present invention proposes a traffic obfuscation method based on random link filling and differential privacy, which specifically includes the following steps:
[0034] Collect traffic data of the target website and generate the arrival interval time matrix and data packet length matrix;
[0035] Read fill budget and sampling window according to configuration file;
[0036] Generate a packet insertion schedule that follows Rayleigh distribution according to a fill budget and a sampling window;
[0037] Calculate the noise value of the data packet, and change the length of the data packet according to the noise value;
[0038] Schedule virtual packets according to the schedule and sample IAT;
[0039] Countdown IAT, if five packets arrive during the countdown, then an additional dummy packet is inserted after the IAT countdown ends.
[0040] For traffic analysis attacks, packet arrival interval and packet size are both basic features used by attackers for classification. In addition, the first few seconds of each web page flow (called the front domain of the flow) leaks extremely useful features for traffic analysis. Therefore, the present invention focuses on using virtual packets to obfuscate the time interval features of the front domain, while also considering the information leakage problem caused by the packet length information.
[0041] like Figure 1 As shown in FIG. 1 , the present invention is a traffic obfuscation method based on random link filling and differential privacy, which is used to confuse website traffic generated by network users. First, traffic is captured from non-user target websites as a target traffic set, and then the required time information is obtained from the target traffic set using a time sampling method. Then, the filling overhead budget and sampling window are obtained according to the user configuration information, and a filling schedule that obeys the Rayleigh distribution is generated according to the pin budget and the sampling window, so as to obfuscate the interval time characteristics of the traffic front domain, that is, given a real or virtual packet P i, let the noise generated be ρ, and the packet size be s i , if ρ>0, the packet size is filled to s i +ρ; if ρ=0, add a virtual packet; if ρ<0, the packet size will be reduced to s i -ρ, and the rest of the data packets will be buffered in the queue until the subsequent real or virtual packets are available in the traffic sequence. The filling schedule determines at what moment to insert the virtual data packets, but in order to confuse the more obvious interval time characteristics later, additional virtual packets are inserted through the time information obtained by sampling to change the entire traffic sequence.
[0042] like Figure 2 As shown, the present invention describes the entire process through a finite state machine, which is mainly divided into three parts. The first is the initialization mode, which generates a traffic time interval and length feature matrix based on the collected traffic, and then generates a schedule based on the configuration. When a data packet arrives, the virtual data packet is first scheduled according to the schedule, and then the noise value is calculated to fill the data packet. Finally, it is decided whether to insert an additional virtual data packet based on the time IAT obtained by sampling.
[0043] In this embodiment, let T be the traffic sequence generated by the target website. Given m possible inter-arrival time IAT samples, the target traffic sequence is described as a column vector. The probability mass function X can be expressed as: X = [x 1 ,x 2 ,…,x m ] T , where x i is the probability of the ith maximum IAT on the target traffic sequence, i∈{1,2,...,m}; Similarly, given a sample space of n possible packet sizes, L represents the probability mass function on n sizes, then L=[l 1 ,l 2 ,…,l n ] T , where x j is the probability of the jth largest packet on the target traffic sequence, j∈{1,2,...,n}.
[0044] In this embodiment, B c and B s Represents the padding overhead budget of the client and proxy server, n c and n s Respectively represent the number of virtual packets injected at both ends, which can be expressed as: That means n c Obey 1 to B c Uniform distribution between That means n s Obey 1 to B sUniform distribution between
[0045] If the maximum filling time and minimum filling time of the server or server side are PT max and PT min For each flow, the client receives min and PT max The filling window w is sampled from a uniform distribution between c , that is, w c Obey PT min to PT max The server is evenly distributed from PT min and PT max The filling window w is sampled from a uniform distribution between s , that is, w s Obey PT min to PT max Even distribution between the server side as well.
[0046] After sampling the above variables, the client and proxy server generate their own filling schedules to schedule virtual data packets. The generated schedules follow the Rayleigh distribution, and its probability density function is:
[0047]
[0048] Where t represents the timestamp, w represents the sampling window length, and w = {w c , w s},w c Indicates the sampling window of the client, w s Represents the sampling window for the proxy client; real packets will not be delayed and virtual packets will be sent as scheduled.
[0049] set up represents a natural number, Denotes the maximum power of 2 divided by timestamp t, t = D(t) if and only if t is a power of 2. d*-privacy calculates a noise value at timestamp t The specific expressions are as follows:
[0050]
[0051] in And the timestamp G(t) and the random number r sampled from the Laplace distribution at different times t The following conditions are met:
[0052]
[0053]
[0054] Among them, Lap() represents the Laplace distribution; ε represents the privacy parameter, which will determine the size of the generated noise value.
[0055] The inter-arrival time is a unique feature, and the difference in inter-arrival time will directly affect the distribution of data packets. In order to minimize the delay and bandwidth overhead caused by the obfuscation mechanism, we need to fill the intervals of the traffic sequence with pseudo packets to minimize the delay and avoid affecting the transmission of real data packets. When the first real packet is received, the virtual packet is first scheduled according to the schedule generated in step S2. Then the inter-arrival time IAT is sampled. If no data packet arrives before the end of IAT, a virtual packet is added and the IAT sampling is restarted.
[0056] When adding a virtual packet, the generated virtual packet is determined by the timestamp, direction and length of the real packet. Before adding the virtual packet, the length l is sampled from LT, and the length of the virtual packet added this time is l. The timestamp of the virtual packet is equal to the current traffic timestamp plus the sampled time IAT, and the direction of the virtual packet is the same as the direction of the previous real data packet.
[0057] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A traffic obfuscation method based on random link filling and differential privacy, characterized in that: The following steps are involved: Collect traffic data of the target website and generate the arrival interval time matrix and data packet length matrix; Read fill budget and sampling window according to configuration file; Generate a packet insertion schedule that follows Rayleigh distribution according to a fill budget and a sampling window; Calculate the noise value of the data packet. The calculation process of the noise value of the data packet is expressed as: in, is the noise value of the data packet with timestamp t; represents the noise value at time G(t); x[G(t)] represents the packet size at timestamp G(t); x[t] represents the packet size at timestamp t; r t Represents random numbers sampled from Laplace distribution at different times; The calculation of the timestamp G(t) includes: Where D(t) represents the maximum power of 2 divided by the timestamp t, and t=D(t) if and only if t is a power of 2; Random numbers r sampled from Laplace distribution at different times t It is expressed as: Wherein, Lap() represents Laplace distribution; ε represents the privacy parameter; D(t) represents the maximum power of 2 divided by the timestamp t, and t=D(t) if and only if t is a power of 2; Indicates rounding down; Change the packet length according to the noise value, that is, if the noise generated is ρ, the packet size is s i , if ρ>0, the packet size is filled to s i +ρ; if ρ=0, add a virtual packet; if ρ<0, the packet size will be reduced to s i -ρ, and the rest of the packet will be buffered in the queue until subsequent real or virtual packets are available in the traffic sequence; Schedule virtual packets according to a schedule and sample inter-arrival times; Countdown to the arrival interval time. If no data packet arrives during the countdown, an additional dummy data packet is inserted after the arrival interval time countdown ends.
2. According to claim 1, a traffic obfuscation method based on random link filling and differential privacy is characterized in that: Read fill budget and sampling window from configuration file include: B c and B s are the padding overhead budgets for the client and proxy server, respectively, n c and n s Respectively represent the number of virtual packets injected at both ends, and n c Obey 1 to B c Uniform distribution between n s Obey 1 to B s Uniform distribution between If the maximum filling time and minimum filling time of the server or server side are PT max and PT min For each flow, the client receives min and PT max The filling window w is sampled from a uniform distribution between c , that is, w c Obey PT min to PT max The server side is evenly distributed from PT min and PT max The filling window w is sampled from a uniform distribution between s , that is, w s Obey PT min to PT max Even distribution between the server side as well.
3. According to claim 1, a traffic obfuscation method based on random link filling and differential privacy is characterized in that: The client and proxy server generate a data packet insertion schedule that follows the Rayleigh distribution based on the filling budget and sampling window, respectively, which is expressed as: Where t represents the timestamp, w represents the sampling window length, and w = {w c , w s },w c Indicates the sampling window of the client, w s Indicates the sampling window of the proxy client.
4. According to claim 1, a traffic obfuscation method based on random link filling and differential privacy is characterized in that: After the IAT countdown ends, the length of the additional virtual data packet inserted is sampled from the data packet length matrix. The timestamp of the virtual packet is equal to the current traffic timestamp plus the sampled time IAT. The direction of the virtual packet is the same as that of the previous real data packet.
