Estimation device, estimation method, and recording medium
By reversibly transforming the payload of the data packet and using the machine learning model, the problem of why the deep learning anomaly detector cannot inversely transform the feature quantity is solved, and an accurate estimation of the cause of the data packet anomaly is achieved.
Patent Information
- Application Number
- CN202080107106.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-19
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-11-19
AI Technical Summary
It is difficult for existing deep learning anomaly detectors to inversely transform the abnormality causes of feature quantities from the original data, resulting in the inability to determine the specific payload part of data packets determined to be abnormal.
Features are generated by reversibly transforming the payload of the data packet character by character, and a machine learning model is used to learn these features and extract features with high contribution to estimate the cause of the anomaly.
It is possible to accurately estimate the cause of the abnormality in the payload of a packet judged to be abnormal and provide clear abnormal location information.
Smart Images

Figure CN116458119B
Abstract
Description
Technical Field
[0001] The present invention relates to an estimation device, an estimation method, and a recording medium for estimating which part of a payload of a data packet determined to be abnormal is responsible for the determination that the data packet is abnormal. Background Art
[0002] In the past, anomaly detectors using deep learning and the like have been proposed. If the cause of anomaly detection based on the anomaly detector can be explained, it will help the user decide whether to take appropriate measures for the detected anomaly. In recent years, in order to explain the judgment of the deep learning model, a method of estimating the cause part in the feature quantity input to the explainable model and the cause part in the original data of the feature quantity has been proposed.
[0003] Prior art literature
[0004] Non-patent literature
[0005] Non-patent document 1: K.Amarasinghe et al., "Toward Explainable Deep NeuralNetwork based Anomaly Detection," IEEE: 11th International Conference on HumanSystem Interaction, 2018. Summary of the invention
[0006] Problems to be solved by the invention
[0007] However, among the anomaly detectors using deep learning in the prior art, there are anomaly detectors that irreversibly transform the original data into feature quantities. In this case, even if the abnormal part of the feature quantity is determined, it is sometimes difficult to estimate the cause of the original data. For example, even if the anomaly detector determines that a certain data packet is abnormal, it is sometimes unknown which part of the payload of the data packet is determined to be abnormal. Therefore, the subject of the present invention is to solve the above-mentioned problem and estimate which part of the payload of the data packet is determined to be abnormal for a data packet determined to be abnormal.
[0008] Means for solving problems
[0009] In order to solve the above-mentioned problems, the present invention is characterized in that it comprises: a feature value generating unit, which generates a feature value for each data packet determined as abnormal or normal by an anomaly detector by performing a reversible transformation on the payload of the data packet character by character, and assigns a determination result of whether the data packet is abnormal or normal to the generated feature value; a model learning unit, which uses the feature value of the payload of the data packet and the determination result of whether the data packet is abnormal or normal as training data, and performs learning of the following model through machine learning, wherein the model is used to classify whether the data packet is abnormal or normal; an extraction unit, which extracts the dimension of the feature value in the learned model whose contribution to the classification is greater than a predetermined value; and an output unit, which uses the extracted dimension of the feature value to estimate the cause of the abnormality in the payload of the data packet determined as abnormal, and outputs the estimated result.
[0010] Effects of the Invention
[0011] According to the present invention, it is possible to estimate which part of the payload of a packet determined to be abnormal is responsible for determining the packet to be abnormal. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a diagram showing a configuration example of an estimation system.
[0013] Figure 2 is a flowchart showing an example of a processing procedure of an estimation system.
[0014] Figure 3 The diagram shows examples of the payload of a packet determined to be normal and the payload of a packet determined to be abnormal.
[0015] Figure 4 It is shown Figure 1 FIG. 1 is a diagram showing examples of features extracted by the extraction unit.
[0016] Figure 5 This is a diagram showing an output example of a portion estimated to be a cause of abnormality in the payload of a packet determined to be abnormal.
[0017] Figure 6 It is a diagram showing a configuration example of a computer that executes an estimation program. DETAILED DESCRIPTION
[0018] Hereinafter, a mode (embodiment) for carrying out the present invention will be described with reference to the drawings. The present invention is not limited to the embodiment described below.
[0019] [Structure example]
[0020] A configuration example of an estimation system including the estimation device of this embodiment will be described. Figure 1 As shown, the estimation system 1 includes, for example, an estimation device 10 , an input device 20 , and an output device 30 .
[0021] The estimation device 10 estimates which part of the payload is judged to be abnormal for the data packet judged to be abnormal among the data packets of the communication data.
[0022] The input device 20 receives input of various data (for example, data packets determined to be abnormal) used by the estimation device 10. The output device 30 outputs data output from the estimation device 10. For example, the output device 30 displays the estimation result of the estimation device 10 on a monitor.
[0023] The estimation device 10 includes a storage unit 11 and a control unit 12. The storage unit 11 stores various data that the control unit 12 refers to when executing processing. The storage unit 11 stores, for example, normal determination data and model parameter information. The normal determination data is data of a packet group determined to be normal by an abnormality detector (not shown).
[0024] The model parameter information is information indicating the parameters used by the model learning unit 123 (described later) when learning the model. For example, when the model to be learned by the model learning unit 123 is a model using a decision tree, the model parameter information indicates the max_depth (maximum depth) of the decision tree, the number of branch conditions, etc.
[0025] The control unit 12 controls the entire estimation device 10. The control unit 12 includes, for example, a data acquisition unit 121, a feature quantity generation unit 122, a model learning unit 123, an extraction unit 124, and an output unit 125.
[0026] The data acquisition unit 121 acquires various data from the input device 20. For example, the data acquisition unit 121 acquires from the input device 20 data of a packet group determined to be abnormal by the abnormality detector.
[0027] The feature generation unit 122 generates a feature for each data packet determined as abnormal / normal by the anomaly detector by performing a reversible transformation on the payload of the data packet character by character. Then, the feature generation unit 122 assigns a determination result of whether the data packet is abnormal or normal to the generated feature of the payload of the data packet.
[0028] For example, the feature generation unit 122 extracts the payload of the data packet determined to be abnormal obtained by the data acquisition unit 121, and further extracts the payload from the data packet of the normal determination data in the storage unit 11. Then, the feature generation unit 122 generates the feature by reversibly transforming the payload of each extracted data packet character by character.
[0029] For example, the feature generation unit 122 generates a feature by treating the payload of each data packet as a hexadecimal byte string and converting each byte into a decimal number. Then, the feature generation unit 122 assigns a determination result of whether the data packet is abnormal or normal to the feature of the payload of the generated data packet.
[0030] For example, the feature generation unit 122 sets the payload extracted from each of the packet determined to be normal and the packet determined to be abnormal as x represented by the following equation (1).
[0031] [Mathematical formula 1]
[0032]
[0033] Here, the feature generation unit 122 reversibly transforms the character string of the payload of the data packet character by character, for example, in the case of performing a reversible transformation based on the ASCII code table, so that the dimension after the transformation is equal to the length of the payload. In addition, the feature generation unit 122 transforms the character string of the payload (hexadecimal number: 0x00 to 0xff) into a numerical string (decimal number: 0 to 255) according to the ASCII code table. For example, the feature generation unit 122 transforms the payload x=hello into x='104 101 108 108 111'. In addition, the feature generation unit 122 distinguishes between uppercase characters and lowercase characters in the payload for transformation.
[0034] The model learning unit 123 uses the feature value of the payload of the data packet generated by the feature value generating unit 122 and the result of determining whether the data packet is abnormal or normal as training data, and performs learning of the following model through machine learning, which model is used to classify whether the data packet is abnormal or normal. The model used as the above learning object is a model with high interpretability. A model with high interpretability is, for example, a model that is easy to explain which feature value contributes to a large extent to the classification based on the model.
[0035] For example, the above-mentioned model is a model using a decision tree, linear regression, logistic regression, etc. The model parameter information in the storage unit 11 is used when learning the model.
[0036] The extraction unit 124 extracts features whose contribution is greater than or equal to a predetermined value in the model learned by the model learning unit 123. For example, the extraction unit 124 measures to what extent the values of the dimensions constituting the feature quantity in the above-mentioned model contribute to the classification of normal / abnormal in the model. Then, the extraction unit 124 extracts the dimension of the feature quantity whose contribution is greater than or equal to the predetermined value as a feature.
[0037] For example, when the byte strings of the feature quantity whose contribution is greater than the predetermined value are the 43rd, 41st, and 18th, the extraction unit 124 extracts the feature quantity as follows: Figure 4 As shown, "Byte string: 43rd, Byte string: 41st, Byte string: 18th" are extracted as features.
[0038] For example, consider a case where the model learned by the model learning unit 123 is a model using a decision tree. In this case, the extraction unit 124 extracts the dimension of the feature quantity described in the branch condition as a feature from the node describing the branch condition in the above-mentioned decision tree.
[0039] The output unit 125 estimates the cause of the abnormality in the payload of the packet determined to be abnormal, using the features (eg, the dimension of the feature amount) extracted by the extraction unit 124 and having a contribution greater than or equal to a predetermined value, and outputs the estimation result.
[0040] For example, the output unit 125 outputs the features (e.g., Figure 4 The estimation system 1 estimates the byte number of the payload of the data packet determined to be abnormal as the cause of the abnormality, and outputs the estimation result to the output device 30. Thus, the user of the estimation system 1 can confirm which byte of the payload of the data packet determined to be abnormal is estimated to be the cause of the abnormality.
[0041] Furthermore, the output unit 125 may output information in which a portion estimated to be a cause of abnormality in the payload of the packet determined to be abnormal is visualized based on the feature extracted by the extraction unit 124 .
[0042] For example, the output unit 125 may output data in which a portion estimated to be the cause of the abnormality in the payload of the data packet determined to be abnormal is highlighted to the output device 30 based on the features extracted by the extraction unit 124 (see Figure 5 ).
[0043] This allows the user of the estimation system 1 to easily visually confirm which portion of the payload of the data packet is estimated to be the cause of the abnormality.
[0044] [Processing example]
[0045] Next, use Figure 2An example of the processing procedure of the estimation system 1 is described. The data acquisition unit 121 of the estimation device 10 acquires data (data packet) determined to be abnormal. Then, the feature quantity generation unit 122 extracts the payload of the data packet determined to be abnormal and transforms it into a reversible feature quantity (S1). In addition, the feature quantity generation unit 122 gives the feature quantity of the payload of the data packet transformed in S1 a determination result indicating that the data packet is abnormal.
[0046] In addition, the feature quantity generating unit 122 obtains the data packet determined to be normal from the normal determination data packet data. Then, the feature quantity generating unit 122 extracts the payload of the data packet determined to be normal and transforms it into a reversible feature quantity (S2). In addition, the feature quantity generating unit 122 gives the feature quantity of the payload of the data packet transformed in S2 a determination result indicating that the data packet is normal.
[0047] After that, the model learning unit 123 uses the feature quantity of the payload of the data packet transformed in S1 and S2 and the determination result of whether the data packet is abnormal or normal as training data, and performs machine learning using a highly explanatory model (S3). Then, the extraction unit 124 extracts features that contribute to the cause of the abnormality from the machine-learned model (S4). For example, the extraction unit 124 measures the contribution of each feature quantity to the classification of the abnormality from the machine-learned model, and extracts features (for example, the dimension of the feature quantity) whose measured contribution is greater than a predetermined value.
[0048] After S4, the output unit 125 transforms the features extracted in S4 into the original data format (S5), and outputs the result of the transformation in S5 as the result of estimating the cause of the abnormality (S6). For example, the output unit 125 outputs data in which the part estimated to be the cause of the abnormality in the payload of the data packet determined to be abnormal is emphasized in a highlighted manner to the output device 30 (refer to Figure 5 ).
[0049] Thus, the estimation system 1 can estimate which part of the payload of a packet determined to be abnormal is the cause of the determination that the packet is abnormal.
[0050] [Experimental results]
[0051] Next, refer to Figure 3 to Figure 5 , the experimental results of the estimation device 10 are described. Here, the following case is tested: for a packet determined to be abnormal by the anomaly detector, the estimation device 10 extracts an abnormal part in the payload of the packet and does not extract parts other than the abnormal part.
[0052] Experimental conditions
[0053] (1) In the experiment, data packets with labels indicating normal / abnormal results were used. For data packets with labels indicating abnormal results, three types of data packets (abnormal patterns 1 to 3) with different abnormal parts in the payload were prepared (see Figure 3 ).also, Figure 3 The hatched portion of the byte string shown in the abnormal patterns 1 to 3 indicates the abnormal portion. For example, the data packet of abnormal pattern 1 is a data packet in which the 18th byte (function code) of the payload is different from that of the normal data packet. Abnormal pattern 2 is a data packet in which the possible value of the 43rd byte of the payload is different from that of the normal data packet. Abnormal pattern 3 is a data packet in which the possible value of the 41st byte of the payload is different from that of the normal data packet.
[0054] (2) The estimation device 10 estimates, for each data packet, which byte of the payload of the data packet is abnormal.
[0055] (3) When performing reversible conversion of the payload, the estimation device 10 converts each byte (hexadecimal number: 0x00 to 0xff) of the payload into a numerical value (decimal number: 0 to 255).
[0056] (4) Manually label the normal / abnormal labels after the payload transformation.
[0057] (5) The model with high explanatory power used by the estimation device 10 is a model using a decision tree.
[0058] ·evaluate
[0059] The following situations were evaluated: whether the estimation device 10 extracted the abnormal part of the payload of the data packet ( Figure 1 The shaded area) and the areas other than the abnormal area were not extracted ( Figure 1 (except the shaded area).
[0060] For example, if the estimation device 10 is able to extract the 18th byte as Figure 3 If the estimation device 10 can extract the 43rd byte as the abnormal part in the payload of the packet of abnormal pattern 1, it is evaluated as OK. If the estimation device 10 can extract the 41st byte as the abnormal part in the payload of the packet of abnormal pattern 3, it is evaluated as OK.
[0061] ·result
[0062] use Figure 4 The following describes the results of an experiment conducted under the above-mentioned experimental conditions, that is, whether the estimation device 10 can correctly extract the abnormal part of the payload of the data packet determined to be abnormal. Figure 4 The numbers of the byte strings of the abnormal parts of the payload extracted by the estimation device 10 are shown.
[0063] like Figure 4 As shown, there are three abnormal parts in the payload of the data packet, and the estimation device 10 extracts the 18th byte, the 41st byte, and the 43rd byte (in any order). In this experiment, the three parts of the payload of the data packet, the 18th byte, the 41st byte, and the 43rd byte, are pre-set as abnormal parts, so it can be confirmed that the estimation device 10 correctly extracts the abnormal parts of the payload and does not extract parts other than the abnormal parts of the payload.
[0064] In addition, as a supplement, Figure 5 , shows a case where, in the estimation device 10, the portion of the payload of the data packet extracted as the abnormal portion is output in a color different from other portions of the payload. Figure 5 The boldface parts in are parts that are output in a color different from that of other parts.
[0065] Will Figure 5 The leftmost side of the payload shown ( Figure 5 The estimation device 10 outputs the three byte numbers (byte 18, byte 41, byte 43) extracted as abnormal parts in a color different from the colors of other parts. Figure 5 In the example, the □ in the 43rd byte of the payload of line 1 represents null. Figure 3 The payload of abnormal modes 1 to 3 shown is Figure 5 By comparing the output results shown in Figure 1, it can be seen that the abnormal part of the payload of the data packet has been correctly extracted.
[0066] [System structure, etc.]
[0067] In addition, the structural elements of each part shown in the figure are functional conceptual elements and do not necessarily need to be physically constructed as shown in the figure. That is, the specific method of distributing / merging each device is not limited to the method shown in the figure, and it can be constructed by functionally or physically distributing / merging all or part of it in arbitrary units according to various loads, usage conditions, etc. In addition, all or any part of each processing function performed by each device can be implemented by a CPU and a program executed by the CPU, or can be implemented as hardware based on wired logic.
[0068] In addition, in the processing described in the above-mentioned embodiments, all or part of the processing described as automatically performed can also be performed manually, or all or part of the processing described as manually performed can also be performed automatically by a known method. In addition, the processing process, control process, specific name, and information including various data or parameters shown in the above-mentioned documents or drawings can be changed arbitrarily except for special records.
[0069] [program]
[0070] The estimation device 10 described above can be realized by installing the program as packaged software or online software on a desired computer. For example, by causing an information processing device to execute the program described above, the information processing device can function as the estimation device 10 of each embodiment. The information processing device referred to herein includes a desktop or notebook personal computer. In addition, in addition to this, for information processing devices, mobile communication terminals such as smart phones, mobile phones, PHS (Personal Handyphone System), and terminals such as PDA (Personal Digital Assistant) are also included in its scope.
[0071] In addition, the estimation device 10 may also be implemented as a server device that uses a terminal device used by a user as a client and provides services related to the above-mentioned processing to the client. In this case, the server device may be implemented as a Web server or as a cloud that provides services related to the above-mentioned processing through outsourcing.
[0072] Figure 6 1000 is a diagram showing an example of a computer that executes an estimation program. The computer 1000 includes, for example, a memory 1010 and a CPU 1020. In addition, the computer 1000 includes a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These components are connected via a bus 1080.
[0073] The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM (Random Access Memory) 1012. The ROM 1011 stores, for example, a boot program such as a BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to the hard disk drive 1090. The disk drive interface 1040 is connected to the disk drive 1100. For example, a removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to, for example, a mouse 1110 and a keyboard 1120. The video adapter 1060 is connected to, for example, a display 1130.
[0074] The hard disk drive 1090 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. That is, the program that specifies each process executed by the above-mentioned estimation device 10 is implemented as a program module 1093 in which a code executable by a computer is described. The program module 1093 is stored in, for example, the hard disk drive 1090. For example, the program module 1093 for executing the same process as the functional structure of the estimation device 10 is stored in the hard disk drive 1090. In addition, the hard disk drive 1090 may also be replaced by an SSD.
[0075] In addition, each data used in the processing of the above-mentioned embodiment is stored as program data 1094 in, for example, memory 1010 or hard disk drive 1090. Then, CPU 1020 reads program module 1093 and program data 1094 stored in memory 1010 or hard disk drive 1090 to RAM 1012 as needed for execution.
[0076] In addition, the program module 1093 and the program data 1094 are not limited to being stored in the hard disk drive 1090, and may be stored in a removable storage medium, for example, and read out by the CPU 1020 via the disk drive 1100 or the like. Alternatively, the program module 1093 and the program data 1094 may be stored in another computer connected via a network (LAN (Local Area Network), WAN (Wide Area Network), etc.). Furthermore, the program module 1093 and the program data 1094 may also be read out by the CPU 1020 from another computer via the network interface 1070.
[0077] Description of symbols
[0078] 10 Estimation device
[0079] 20 Input Devices
[0080] 30 Output device
[0081] 11 Storage
[0082] 12 Control Unit
[0083] 121 Data Acquisition Department
[0084] 122 Feature quantity generation unit
[0085] 123 Model Learning Department
[0086] 124 Extraction Department
[0087] 125 Output
Claims
1. An estimation device, characterized in that: have: a feature quantity generating unit, which generates a feature quantity by reversibly transforming the payload of each data packet determined as abnormal or normal by the abnormality detector, and assigns a determination result of whether the data packet is abnormal or normal to the generated feature quantity, wherein the character string is transformed into a numerical string according to the ASCII code table in the reversible transformation; A model learning unit, which uses the characteristic quantity of the payload of the data packet and the determination result of whether the data packet is abnormal or normal as training data, and learns the following model through machine learning, wherein the model is used to classify whether the data packet is abnormal or normal; an extracting unit configured to extract the dimension of the feature quantity whose contribution to the classification is greater than or equal to a predetermined value in the learned model; as well as An output unit estimates a cause of abnormality in a payload of a data packet determined to be abnormal, using the extracted dimension of the feature amount, and outputs a result of the estimation.
2. The estimation device according to claim 1, characterized in that The model is a model using a decision tree. The extraction unit extracts the dimension of the feature quantity described in the branch condition from the node describing the branch condition in the decision tree obtained by the machine learning as the dimension of the feature quantity whose contribution degree is greater than or equal to a predetermined value.
3. The estimation device according to claim 1, characterized in that The model is a model using linear regression or logistic regression.
4. The estimation device according to claim 1, characterized in that The output unit identifies a portion in the payload of the data packet determined to be abnormal that is estimated to be the cause of the abnormality based on the dimension of the extracted feature amount, and outputs information that visualizes the identified portion as a result of the estimation.
5. The estimation device according to claim 1, characterized in that The reversible conversion is a conversion from a character string to a numerical string according to the ASCII code table.
6. An estimation method, the estimation method being performed by an estimation device, characterized in that: The estimation method comprises the following steps: For each data packet determined as abnormal or normal by the anomaly detector, a feature quantity is generated by reversibly transforming the payload of the data packet character by character, and a determination result of whether the data packet is abnormal or normal is assigned to the generated feature quantity, wherein the character string is transformed into a numerical string according to an ASCII encoding table in the reversible transformation; Using the characteristic quantity of the payload of the data packet and the determination result of whether the data packet is abnormal or normal as training data, learning the following model through machine learning, the model is used to classify whether the data packet is abnormal or normal; extracting the dimension of the feature quantity whose contribution to the classification is greater than or equal to a predetermined value in the learned model; as well as Using the extracted dimension of the feature amount, a cause of abnormality in the payload of the data packet determined to be abnormal is estimated, and the estimation result is output.
7. A recording medium storing an estimation program, characterized in that: The estimation program causes the computer to execute the following steps: For each data packet determined as abnormal or normal by the anomaly detector, a feature quantity is generated by reversibly transforming the payload of the data packet character by character, and a determination result of whether the data packet is abnormal or normal is assigned to the generated feature quantity, wherein the character string is transformed into a numerical string according to an ASCII encoding table in the reversible transformation; Using the characteristic quantity of the payload of the data packet and the determination result of whether the data packet is abnormal or normal as training data, learning the following model through machine learning, the model is used to classify whether the data packet is abnormal or normal; extracting the dimension of the feature quantity whose contribution to the classification is greater than or equal to a predetermined value in the learned model; as well as Using the extracted dimension of the feature amount, a cause of abnormality in the payload of the data packet determined to be abnormal is estimated, and the estimation result is output.
Citation Information
Patent Citations
Data transmitting method, a data sending method and a data receiving method
CN101645883A
Gf256 SIMD instructions and logic to provide general purpose Gf256 SIMD cryptographic arithmetic functionality
CN105302522A
Automatic biochemical analyzer remote equipment diagnosis strategy
CN107942854A
A fault detection method based on automatic encoder and Bayesian network
CN109146246A
Terminal access data abnormality detection method based on machine learning
CN109391624A
