A method for generating network deception traffic based on adversarial samples
Generating adversarial samples through an ensemble learning method based on transfer learning solves the problem in the existing technology of being unable to defend against deep learning models for network traffic classification attacks, and achieves the effect of deceiving the attacker without understanding the attacker's model.
Patent Information
- Application Number
- CN202210036087.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-13
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-01-13
AI Technical Summary
Existing technologies cannot effectively defend against network traffic classification attacks carried out by deep learning models, especially when the model parameters used by the attacker are not known, making it difficult to implement effective defense.
An ensemble learning method based on transfer learning is used to generate adversarial samples. By constructing a variety of deep neural network models, grayscale images are used for training and testing, and the undirected FGSM algorithm is used to generate adversarial samples on a variety of models to ensure that adversarial samples are Being able to deceive an attacker by knowing the attacker model.
It achieves the generation of effective deceptive traffic confrontation samples without knowing the attacker's model, reduces the attacker's classification accuracy, and provides a solution to black box attacks.
Smart Images

Figure CN114398977B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security, and in particular to a method for generating network deception traffic based on adversarial samples. Background Art
[0002] As a key means of network management, network traffic classification technology can provide managers with reliable network resource usage information. However, with the development of the information age, the traffic in the Internet has exploded, and the classification accuracy of traditional port-based classification technology has declined. Deep learning technology, especially convolutional neural network (CNN), has excellent performance in the field of image classification. The field of network traffic classification has also begun to pay attention to traffic classification technology based on deep learning methods. While network traffic classification technology based on deep learning brings convenience to network managers, it also brings greater challenges to network security. Attackers can use deep learning models to classify the traffic of the target network to determine its reference type (email, website, etc.), and then implement traffic interception based on the classification results and further implement website fingerprint attacks.
[0003] Szefedy proposed the concept of adversarial samples in 2013. By adding tiny perturbations that are imperceptible to the human eye to the original image, the deep learning model can misclassify it or even identify it as a specified category. The application of adversarial samples is most direct in the field of computer vision, and the research has a good attack effect in the fields of face recognition and autonomous driving. Because the generated adversarial samples are highly similar to the original images, some researchers also use adversarial samples to generate network deception traffic and deceive the malware detection model based on neural networks. Existing studies have used algorithms such as FGSM, DeepFool, and C&W to generate deception network traffic, and verified the feasibility of this method through testing. However, the white box algorithm used in the research to generate deception traffic is not feasible in reality because we cannot know the traffic classification model used by the attacker. Therefore, the present invention proposes a method for generating network deception traffic based on transfer learning. In the absence of model parameter information, deception traffic adversarial samples are constructed based on multiple deep neural network models, which can effectively deceive attackers. Summary of the invention
[0004] The present invention provides a method for generating network deception traffic based on adversarial samples. By using the idea of transfer learning attack algorithm and the method of integrated learning, the adversarial samples of network deception traffic are generated, so as to achieve the purpose of making the attacker make classification errors when implementing the traffic classification attack based on deep learning without knowing the model used by the attacker.
[0005] The technical solution adopted by the present invention is:
[0006] A method for generating network deception traffic based on adversarial samples comprises the following steps:
[0007] Step 1): Extract the features of the traffic, and the extracted data is in the form of a one-dimensional series of 1×248;
[0008] Step 2): Normalize the extracted feature information;
[0009] Step 3): The normalized 1×248 sequence is padded with 0 at the back end to expand it into a one-dimensional sequence of 1×256;
[0010] Step 4) Read the expanded 1×256 one-bit array row by row and convert it into a 16×16 array;
[0011] Step 5): Correspond each feature of the 16×16 array to a grayscale value and convert it into a grayscale image;
[0012] Step 6): Build multiple network attack models, use grayscale images to train the network attack models respectively, and test the accuracy of normal traffic;
[0013] Step 7): Generate adversarial samples using multiple network attack models using ensemble learning and visualize the adversarial samples;
[0014] Step 8): Select a network attack model to test whether the generated adversarial sample meets the requirements. If not, repeat step 6 until the generated adversarial sample meets the requirements and converts the adversarial sample into traffic. Otherwise, directly convert the adversarial sample into traffic.
[0015] Among them, in step 6), the data set used for training is the Moore data set; there are five models built and trained, namely ResNet-152, ResNet-101, ResNet-50, VGG-16 and GoogLeNet.
[0016] Among them, in step 7), four models of ResNet-152, ResNet-101, ResNet-50, VGG-16 and GoogLeNet are used for ensemble learning to generate adversarial samples, and the remaining model is attacked.
[0017] Among them, in step 7), the undirected FGSM algorithm is used to generate adversarial samples on the four models of ensemble learning to attack another model.
[0018] Compared with the prior art, the present invention has the following beneficial effects:
[0019] The present invention is based on the idea of transfer learning and generates deceptive traffic adversarial samples by using an ensemble learning method, thereby achieving the purpose of deceiving the attacker without knowing the attacker's model parameter information. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 The present invention is implemented as a flow chart. DETAILED DESCRIPTION
[0021] The present invention will be further described below in conjunction with the accompanying drawings.
[0022] A network deception traffic generation method based on adversarial samples, focusing on solving the problem of being unable to effectively defend against attacks based on traffic classification because the deep learning model used by the attacker is unknown;
[0023] The transfer learning attack algorithm is a very important algorithm in black-box attacks. Its basic idea is that, based on the transferability of adversarial samples, deep neural networks with similar structures will show similar performance when facing the same adversarial sample attacks. Suppose we want to attack model B, but we don't know the details of model B. At this time, we can find model A with similar structure and function to model B, and generate adversarial samples of model A through white-box attack algorithms. These adversarial samples also have a certain attack success rate on model B. Some studies have made a systematic explanation of the transfer learning attack algorithm. As shown in Table 1, the horizontal axis represents the known model A, the vertical axis represents the attacked model B, and the numbers represent the proportion of adversarial samples generated for model A that can be successfully recognized by model B. From the data in Table 1, we can see that the adversarial samples that successfully attack model B can be constructed using the transfer learning method, but the success rate is not very high. Based on this, a method of integrated learning in the field of adversarial samples is proposed, that is, when we want to attack model B, we construct adversarial samples based on multiple models.
[0024] Table 1. Transferability of adversarial examples between different models
[0025] ResNet-152 ResNet-101 ResNet-50 VGG-16 GoogLeNet Incept-v3 ResNet-152 0% 13% 18% 19% 11% 44% ResNet-101 19% 0% 21% 21% 12% 45% ResNet-50 23% 20% 0% 21% 18% 37% VGG-16 22% 17% 17% 0% 5% 16% GoogLeNet 39% 38% 38% 19% 0% 49% Incept-v3 55% 50% 50% 35% 27% 0%
[0026] Assume that we have k constructed models and conduct white-box attacks on these k models. The softmax layer outputs of these k models are j 1 …j k , the original image is x, the original image label is y, and the classification target of the targeted attack is The adversarial example is The integrated learning model can be expressed as:
[0027]
[0028] Among them, ∝ i is the integrated learning parameter, and there are Then the problem of generating adversarial samples is transformed into an optimization problem of a loss function:
[0029]
[0030] in, Identify each model as The loss function when To input adversarial samples is the output value of the softmax layer of the i-th model, λ is the perturbation coefficient, is the added disturbance, x is the original sample, is the input adversarial sample, and N is the number of image pixels. Therefore, the loss function consists of two parts: the difference between the classification results of each model and the targeted attack classification label and the size of the perturbation. In this way, the successful recognition rate of adversarial samples can be greatly reduced.
[0031] Based on this, a method for generating network deception traffic based on adversarial samples is proposed. The process is as follows: Figure 1 As shown:
[0032] Step 1): Extract the features of the traffic, and the extracted data is in the form of a one-dimensional series of 1×248;
[0033] Step 2): Normalize the extracted feature information;
[0034] Step 3): The normalized 1×248 sequence is padded with 0 at the back end to expand it into a one-dimensional sequence of 1×256;
[0035] Step 4) Read the expanded 1×256 one-bit array row by row and convert it into a 16×16 array;
[0036] Step 5): Correspond each feature of the 16×16 array to a grayscale value and convert it into a grayscale image;
[0037] Step 6): Build multiple network attack models, use grayscale images to train the network attack models respectively, and test the accuracy of normal traffic;
[0038] Step 7): Generate adversarial samples using multiple network attack models using ensemble learning and visualize the adversarial samples;
[0039] Step 8): Select a network attack model to test whether the generated adversarial sample meets the requirements. If not, repeat step 6 until the generated adversarial sample meets the requirements and converts the adversarial sample into traffic. Otherwise, convert the adversarial sample into traffic.
[0040] The Moore dataset is used as the dataset. The Moore dataset is a set of 10 data sets consisting of all TCP flow features passing through Columbia University on August 20, 2003. The time of the day is divided into ten blocks with random starting points and uniform distribution on the trajectory of the day. Each block lasts for about 1680 seconds. Each dataset contains 12 types of application flows. Each dataset is expressed as a text file with many lines. The first 248 items of each line represent feature values, and the last item is a classification label. Each line represents a flow. The specific information is shown in Table 2.
[0041] Table 2 - Dataset statistics table
[0042]
[0043]
[0044] Attacker model, assumes that the attacker can obtain flow-level traffic between hosts and can use deep learning-based traffic classification technology to infer the defender's application type to classify the traffic. The specific description is as follows: the attacker attempts to classify the observed traffic (TF) into the i-th category in the application type set C, C = {c 1 ,c 2 …c n}, the traffic TF feature set is X, X = {x 1 ,x 2 …x m}; The classification model function is F(x i ), the output value is the probability of belonging to the i-th category in the application set C. The defender model generates adversarial perturbations P based on the traffic TF using an ensemble learning method, thereby forming deceptive traffic TD. And extract the feature set X'={x' 1 ,x' 2 ,…,x' m}, so that the output of the attacker's classification function F(x' i ) and F(x i ), that is, the attacker mistakenly classifies the traffic from the i-th class to the i'th class. A total of five models are used in this paper. Each attack uses four of them for ensemble learning, and the remaining model is attacked. The undirected white-box attack algorithm FGSM is used, and the remaining model is attacked. The models used are ResNet-152, ResNet-101, ResNet-50, VGG-16 and GoogLeNet, which are used to study the transferability of adversarial samples in homogeneous and heterogeneous network models. The loss function for undirected attacks is defined as:
[0045]
Claims
1. A method for generating network deception traffic based on adversarial samples, characterized in that: The following steps are involved: Step 1): Extract the features of the traffic, and the extracted data is in the form of a one-dimensional series of 1×248; Step 2): Normalize the extracted feature information; Step 3): The normalized 1×248 sequence is padded with 0 at the back end to expand it into a one-dimensional sequence of 1×256; Step 4) Read the expanded 1×256 one-bit array row by row and convert it into a 16×16 array; Step 5): Correspond each feature of the 16×16 array to a grayscale value and convert it into a grayscale image; Step 6): Build multiple network attack models, use grayscale images to train the network attack models respectively, and test the accuracy of normal traffic; Step 7): Generate adversarial samples using multiple network attack models using ensemble learning and visualize the adversarial samples; Assume that there are k constructed models and white-box attacks are performed on k models. The softmax layer outputs of these k models are j1…j k , the original image is x, the original image label is y, and the classification target of the targeted attack is The adversarial example is The integrated learning model can be expressed as: In the formula, ∝ i is the integrated learning parameter, and there are The problem of generating adversarial samples is transformed into an optimization problem of a loss function: In the formula, Identify each model as The loss function when To input adversarial samples is the output value of the softmax layer of the i-th model, λ is the perturbation coefficient, is the added disturbance, x is the original sample, is the input adversarial sample, and N is the number of image pixels; therefore, the loss function consists of two parts: the difference between the classification results of each model and the targeted attack classification label and the size of the perturbation; Step 8): Select a network attack model to test whether the generated adversarial sample meets the requirements. If not, repeat step 6 until the generated adversarial sample meets the requirements and converts the adversarial sample into traffic. Otherwise, directly convert the adversarial sample into traffic.
2. The method for generating network deception traffic based on adversarial samples according to claim 1 , It is characterized in that, in step 6), the data set used for training is the Moore data set; there are five models constructed and trained, namely ResNet-152, ResNet-101, ResNet-50, VGG-16 and GoogLeNet.
3. The method for generating network deception traffic based on adversarial samples according to claim 1 , It is characterized in that in step 7), four models of ResNet-152, ResNet-101, ResNet-50, VGG-16 and GoogLeNet are used for integrated learning to generate adversarial samples, and the remaining model is attacked.
4. The method for generating network deception traffic based on adversarial samples according to claim 3 , It is characterized in that, in step 7), an undirected FGSM algorithm is used to generate adversarial samples on four models of ensemble learning to attack another model.
Citation Information
Patent Citations
Black box antagonistic attack defense method based on sample selection and model evolution
CN108520268A
HRRP confrontation sample black box attack method based on deep learning
CN111291828A
