Detection circuit
The integrated detection circuit in IoT processors combines processor and packet information for anomaly detection, addressing the challenge of detecting malware and malicious communications with reduced hardware footprint.
Patent Information
- Application Number
- JP2023052449
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2024-10-10
AI Technical Summary
Existing technologies struggle to detect both malware and malicious communications in IoT devices, especially those directly connected to the Internet, due to resource limitations and the lack of hardware implementations, and do not consider processor information.
A detection circuit integrated into a processor that uses a selector to combine processor and packet information, feeding it into a discriminator for anomaly detection, allowing for reduced hardware scale and effective detection of both malware and malicious communications.
The detection circuit effectively identifies both malware and malicious communications in IoT devices without increasing circuit size, leveraging a single discriminator to handle different feature vectors efficiently.
Smart Images

Figure 2024141023000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a sensing circuit. [Background technology]
[0002] Conventionally, there is technology for detecting anomalies in cyber attacks.
[0003] For example, there is a technology related to a method for detecting anomalies by analyzing logs (see Patent Document 1). In this technology, a teacher label is attached to a feature vector including an abnormal communication log, and an anomaly classifier is trained.
[0004] There is also a technology related to a method for efficiently detecting unknown anomalies and identifying the causes of the anomalies (see Patent Document 2). This technology learns communication features or operation logs to generate a detection model for detecting that a device is in an abnormal state, and learns communication features or operation logs for each cause of the device anomaly to generate an identification model for identifying the cause of the device anomaly. The operation logs used in this technology include the ID of the executed process, the start time of the process execution, and other information related to the network.
[0005] Furthermore, a technology for malware detection by circuit-level hardware using processor information is being considered (see Non-Patent Document 1). This technology considers the implementation of a detection circuit adjacent to a core in a single LSI. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] JP 2022-117827 A [Patent Document 2] JP 2019-103069 A [Non-patent literature]
[0007] [Non-Patent Document 1] Kazuki Koike, Ryotaro Kobayashi, Masahiko Katoh. "IoT-oriented high-efficient anti-malware hardware focusing on time series metadata extractable from inside a processor core". International Journal of Information Security: 2022-02-25. Summary of the Invention [Problem to be solved by the invention]
[0008] IoT devices are exposed to two types of cyber attacks: malware and malicious communications.
[0009] The conventional techniques of Patent Documents 1 and 2 use communication features to detect malicious communication and malware as communication anomalies. The communication features are used, and detection targets are limited to IoT devices in a dedicated network. Therefore, IoT devices directly connected to the Internet cannot be detected. In addition, model learning is updated and software implementation is assumed. Since implementation built into hardware is not assumed, detection is difficult in IoT devices where software is difficult to install due to resource limitations. In addition, communication behavior is assumed, and processor information is not taken into account.
[0010] On the other hand, although there is technology for detecting malware through hardware implementation, such as that described in Non-Patent Document 1, when it comes to cyber attacks, it is necessary to assume that not only malware but also malicious communications will be targeted for detection.
[0011] The present invention has been made in consideration of the above circumstances, and has an object to provide a detection circuit in a processor that can detect different types of abnormalities even when a single discriminator is used. [Means for solving the problem]
[0012] In order to achieve the above-mentioned object, the detection circuit of the present invention is a detection circuit incorporated in a processor mounted on an equipment, and includes a selector that accepts input of processor information when a core of the processor executes a program and packet information through communication of the equipment, selects either the processor information or the packet information, and outputs a feature vector of the selected information of the processor information or the packet information to a discriminator, a discriminator that has been trained in advance to discriminate between a first event and a second event, and that uses the feature vector of the selected information as input, discriminates between the first event and the second event, and outputs a discrimination result, and a decider that compiles the discrimination results of the discriminator for a predetermined time, and determines whether or not the first event and the second event have occurred within the predetermined time. Effect of the Invention
[0013] According to the detection circuit of the present invention, an effect is obtained in that different types of abnormalities can be detected even when a single discriminator is used in a processor. [Brief description of the drawings]
[0014] [Figure 1] FIG. 1 is a diagram illustrating an example of a detection circuit incorporated in a processor. [Diagram 2] FIG. 2 shows an example of elements for each type of feature as processor information. [Diagram 3] FIG. 3 shows an example of elements for each type of feature amount as packet information. [Figure 4A] FIG. 4A is a diagram illustrating an example of a feature vector. [Figure 4B] FIG. 4B shows a case where there are many feature elements in either the packet information or the processor information, and the missing feature elements in the other information are filled in. [Diagram 5] FIG. 5 is an example of a scatter plot of the feature quantities of the processor information and packet information. [Figure 6] FIG. 6 shows a detection processing routine of the detection circuit of this embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
[0016] <Overview of the embodiment of the present invention> First, an overview of an embodiment of the present invention will be described. As described above, IoT devices are exposed to two types of cyber attacks (malware and malicious communication) and need to be dealt with. The occurrence of malware is an example of a first event of the present disclosure, and the occurrence of malicious communication is an example of a second event of the present disclosure.
[0017] In this embodiment, two types of cyber attacks can be detected using a detection circuit built into a processor mounted on an IoT device. This method (1) makes it possible to detect malware and malicious communication on an IoT device without introducing software. In addition, (2) it is possible to suppress an increase in the size of the discrimination circuit. This is because, for each input (feature) of the discriminator, a feature vector of different characteristics is input to one discriminator according to the selection of processor information and packet information. Normally, for the input of the discriminator, if the information has different characteristics, it is assumed that an input for each element of the feature is prepared for each piece of information. Therefore, normally, inputs are prepared for each element of the processor information and each element of the packet information, and the number of inputs is the number of elements. On the other hand, in this method, the elements of the input feature vector are different depending on the selection. Therefore, the input of the discriminator is reduced, and the hardware scale can be reduced. This makes it possible to meet the cost reduction required for IoT processors.
[0018] Fig. 1 is a diagram showing an example of a detection circuit incorporated in a processor. As shown in Fig. 1, a processor 10 and a communication unit 30 are mounted on a device 1. The processor 10 includes a core 20 and a detection circuit 100. The detection circuit 100 is disposed adjacent to the core 20 on the processor 10. The detection circuit 100 is connected to the core 20 and the communication unit 30 via a communication interface (I / F) 60, and receives information.
[0019] The detection circuit 100 includes a selector 110 (MP: multiplexer 110 1~N ), a discriminator 112, and a determiner 114.
[0020] The core 20 is a circuit that executes a program as a CPU and performs calculations. In this embodiment, the core 20 receives processor information during program execution from the selector 110 (multiplexer 110 1~N ) to output.
[0021] The communication unit 30 is connected to a network N such as the Internet, and transmits packet information generated by communication of the device 1 to a selector 110 (multiplexer 110 1~N ) to output.
[0022] The selector 110 receives input of processor information and packet information, selects either the processor information or the packet information, and outputs the feature vector of the selected processor information or the selected packet information to the discriminator. The selector 110 selects each of the multiplexers (110 1~N ) Each multiplexer outputs the corresponding feature element.
[0023] The processor information is generated at the level of one cycle of program execution by the core 20, and the packet information is generated when the device 1 receives data. The latter packet information is generated less frequently. Therefore, the selector 110 normally selects the processor information, and when packet information is received from the Internet, it is preferentially selected.
[0024] The discriminator 112 discriminates between malware and malicious communication using the feature vector of the selected information as input, and outputs the discrimination result to the determiner 114. The discriminator 112 is trained using the feature vector of the processor information and packet information for learning as training data by a method using a machine learning algorithm such as random forest or neural network. The discrimination result output by the discriminator 112 outputs "normal program" or "malware" as a discrimination result for program execution, and outputs "benign communication" or "malicious communication" as a discrimination result for communication. Note that the processor information and packet information are not inputted separately as the input feature vector. In this way, one of the features of this method is that the feature vector of the information selected from the processor information and packet information is used without discrimination by labels or the like at the time of input, but discrimination is possible in the discriminator 112 even without discrimination. Therefore, it is possible to use a feature vector that does not discriminate between information of different features. A verification example in which the feature vector of different information can be used for input will be described later.
[0025] Here, the elements of the feature vector will be described. The order of input of each element of the processor information during program execution and the packet information for each communication is determined by the order of input of each element of the multiplexer (110 1~N ) are defined in correspondence with each other. Examples of elements of the processor information and packet information are given below. Note that the discriminator 112 is assumed to learn by defining an arbitrary element of the feature amount among the elements of the feature amount of each of the processor information and packet information described above as an input.
[0026] FIG. 2 shows an example of elements for each type of feature quantity as processor information. As shown in FIG. 2, the types of processor information include information on instruction execution, information on instruction distance, and information on cache accuracy. For information on instruction execution, pc (program counter), insn (instruction type), op (opcode), addr (load / store address or branch destination pc), cond (conditional branch flag), rn (register number), and rv (register value) can be used as feature quantity elements. For information on instruction distance, dn (NOP instruction distance), dl (Load instruction distance), ds (Store instruction distance), dj (Jump instruction distance), and do (other instruction distance) can be used as feature quantity elements. For information on cache accuracy, direction (actual branch direction), pred_direction (direction predicted by gshare), L1_inst (accumulated hit rate of L1 instruction cache), L1_data (accumulated hit rate of L1 data cache), and L2 (accumulated hit rate of L2 cache) can be used as feature quantity elements.
[0027] Figure 3 shows an example of elements for each type of feature as packet information. Types of feature in packet information include basic information on connection, information on the number of connections, and information on the ratio of connections. For basic information on connection, Duration (length of connection (seconds)), Source bytes (length of data sent from source IP), and Duration bytes (length of data sent from destination IP) can be used as feature elements. For information on the number of connections, Count, Dst_host_count, and Dst_host_srv_count can be used as feature elements. Count is the number of connections in the last 2 seconds where the destination and source are the same as the current connection. Dst_host_count is the number of connections with the same destination IP and source IP as the current connection out of the past 100 connections. Dst_host_srv_count is the number of connections with the same destination IP and service as the current connection out of the past 100 connections. Information regarding the proportion of connections can be obtained by using the following features: Same_srv_rate, Serror_rate, Srv_serror_rate, Dst_host_same_src_port_rate, Dst_host_serror_rate, and Dst_host_srv_error_rate as feature elements. Same_srv_rate is the proportion of connections to the same service out of Count. Serror_rate is the proportion of connections with SYN errors out of Count. Srv_serror_rate is the proportion of connections with SYN errors out of Srv_Count. Srv_Count is the number of connections to the same service in the last two seconds. Dst_host_same_src_port_rate is the proportion of connections with the same source port out of Dst_host_count. Dst_host_serror_rate is the proportion of connections with SYN errors out of Dst_host_count. Dst_host_srv_error_rate is the proportion of connections with SYN errors out of Dst_host_srv_count.
[0028] According to the input specification determined for the discriminator 112, the number of input elements of the feature vector is specified to be the maximum number of elements selected from the processor information and the packet information. For example, if 7 elements of the processor information and 10 elements of the packet information are selected and specified as the input, the number of input elements of the feature vector will be 10. In this case, three missing elements of the feature vector are input as a feature vector with those elements filled in. In this way, the order of input of the elements of the processor information and the packet information for each communication during program execution is specified and arranged, and the missing elements of the feature vector are filled in.
[0029] In addition, the discriminator 112 specifies and arranges the order in which each element of the processor information during program execution and packet information for each communication is input, and learns about missing feature elements using learning data of feature vectors that fill in the missing elements.
[0030] FIG. 4 (FIG. 4A and FIG. 4B) shows an example of a feature vector. As an example, assume that the processor information uses three features (pc, L1_inst, L1_data) and the packet information uses three features (Duration, Count, Serror_rate). In this case, a frame of learning data for the three features is created as a feature vector for each row of one cycle, and the processor information and packet information are mixed and integrated to create learning data.
[0031] As shown in FIG. 4A, the order of mixing the processor information and packet information does not need to be considered when integrating data, but the order of each element of the feature of the processor information and packet information needs to be such that each element is aligned. The aaaaa row is a feature vector of the processor information. The ddddd row is a feature vector of the packet information. In this embodiment, it is assumed that the discriminator 112 is trained by collecting these feature vectors as training data.
[0032] FIG. 4B shows a case where there are many feature elements in either the packet information or the processor information, and the missing feature elements in the other one are filled. A learning data frame is created by setting the number of feature elements to match the number of feature elements on the side with the many feature elements. The learning data is integrated by filling the missing feature element parts with 0 in the information on the side with fewer feature elements. In this example, the information on the side with the many feature elements is the processor information, and the information on the side with fewer feature elements is the packet information. A learning data frame with three columns is created to match the number of features in the processor information, and the processor information is input as is. The packet information is divided into two features with Serror_rate removed, and one feature is missing from the integrated learning data frame. In this case, the missing feature (Serror_rate) part is changed to three columns of data filled with 0, and then integrated into the learning data of the feature vector. The same can be done for the feature vector input when discriminating with the discriminator 112.
[0033] The determiner 114 is a circuit that compiles the discrimination results of the discriminator 112 and finally determines whether or not a cyber attack (an attack by a program or communication) has occurred within a predetermined time. The determiner 114 only needs to execute processing at a predetermined time interval, and may be an improved version of an existing circuit that performs compilation and decision based on a threshold value.
[0034] (Verification example) We verified the elements of the features used in the feature vector. Figure 5 shows an example of the features of processor information and packet information plotted on a scatter plot. In the case of a feature vector obtained by integrating two different types of data, the difference in the feature area is considered to be the basis for distinguishing benign / malicious communication of packet information and benign / malicious communication of processor information. In Figure 5, the plot points of benign packet information are plotted as white triangles (packet_N), and the plot points of benign processor information are plotted as black triangles (trace_N). The plot points of malignant packet information are plotted as light circles (packet_A), and the plot points of malignant processor information are plotted as black circles (trace_A). The horizontal axis shows the ratio of L1_inst / Dst_host_count. The vertical axis shows the ratio of L1_data / Dst_host_serror_rate. The plotted features were selected by selecting two features with high contribution rates from each of the processor information and packet information. Looking at Figure 5, the plot points representing malicious and benign processor information are stuck around the middle of the left edge, while the plot points representing both benign and malign packet information are stuck above and below, with some data in the middle here and there. From this, it can be seen that when processor information and packet information are integrated, the respective feature regions are effectively separated, resulting in a result that is unlikely to have a negative impact on distinguishing between the data of each other. Therefore, even if different information is treated as input for feature vectors that do not distinguish between them, it is possible to distinguish between malware and malicious communications.
[0035] (action) Next, a description will be given of the operation of the detection circuit 100 according to this embodiment. The detection circuit 100 executes a detection process routine shown in FIG.
[0036] In step S100, the selector 110 receives input of processor information during program execution and packet information by communication for each reception process. For the reception process, the processor information is input for each execution of one cycle of the core, and the packet information is input for each reception of data by the communication unit 30.
[0037] Next, in step S102, the selector 110 selects either the processor information or the packet information, generates a feature vector of the selected information, either the processor information or the packet information, and outputs it to the discriminator 112. The processor information is generated every time the core executes one cycle, and the packet information is generated every time data is received by the communication unit 30. If they are received simultaneously, the packet information is given priority.
[0038] In step S104, the discriminator 112 discriminates between malware and malicious communication using the feature vector of the selected information as input each time a feature vector is received, and outputs the discrimination result to the determiner 114.
[0039] In step S106, the determiner 114 determines whether or not the detection condition is satisfied. If it is determined that the detection condition is satisfied, the process proceeds to step S108. If it is determined that the detection condition is not satisfied, the process returns to step S100 and repeats. The detection condition may be, for example, when a predetermined time has elapsed or when the number of discriminations since the start of discrimination has reached a predetermined number of times or more.
[0040] In step S108, the determiner 114 collects the discrimination results of the discriminator 112, makes a final decision as to whether or not a cyber attack (an attack by a program or communication) has occurred within a predetermined time period, and outputs a detection result.
[0041] As described above, according to the detection circuit 100 of the present embodiment, even when a single discriminator is used in a processor, it is possible to detect anomalies caused by cyber attacks of different types of malware and malicious communications.
[0042] First, the method of the present embodiment is characterized in that it can detect two types of cyber attacks: malware and malicious communications. Until now, security software (such as Virus Buster and ESET) used for personal computers could not be installed on IoT devices due to severe resource constraints. In response to this, hardware mechanisms for security measures have been developed little by little, and recently, proposals have been made on hardware that performs malware countermeasures. However, no proposals have been made on hardware that detects malicious communications. In response to this situation, the method of the present embodiment is characterized in that it improves the circuitry for detecting malware, making it possible to newly detect malicious communications as well.
[0043] Secondly, while adding a function to an existing circuit usually increases the circuit size, the method of the present embodiment has the feature of being able to suppress the increase in circuit size that accompanies the addition of a function. The reason why the circuit size can be suppressed in this way is that learning is performed so that, for the first input of the classifier, either a feature vector of processor information for detecting malware or a feature vector of packet information for detecting malicious communication can be selected and used as the input for discrimination. Usually, such learning is not performed in the field of machine learning, and this is one of the factors that make the method of the present embodiment distinctive.
[0044] As a modification, the machine learning algorithm can be changed. Machine learning is expected to combine multiple algorithms such as neural networks, naive Bayes, SVM (support vector machine), and random forest. In addition, combinations such as changing the feature amount and enabling the detection of other cyber attacks are also possible.
[0045] The advantage of this method is that it makes it possible to use a single classifier to judge events with different feature information. Therefore, in this case, the target was to judge different events, namely malware and malicious communications, but it is also possible to change this judgment to something else. For example, it is conceivable to introduce this method to other judgments, such as image recognition, voice recognition, and acoustic recognition (fault inspection, etc.), in IoT devices.
[0046] First, cyber attacks are increasing and becoming more complex every year, which will have a major social impact. Second, in terms of their scope, IoT devices have a wide range of uses. Currently, all kinds of devices are connected to the Internet and operate as IoT devices. Not only surveillance cameras, but also factories and transportation equipment such as automobiles can be considered IoT devices. Since all such devices are always equipped with a processor, if the processor itself is installed as a standard function during manufacturing, it will be possible to implement cyber attack countermeasures in all IoT devices from the start.
[0047] Furthermore, when implementing a neural network in hardware, data with a large bit width must be stored and calculations (multiplication, division, etc.) must be performed to handle floating point numbers, resulting in an extremely large and expensive hardware structure. This makes it difficult to install in IoT devices. For example, it is very difficult in terms of cost to install an LSI dedicated to an AI engine, or an FPGA equipped with an AI engine, in an inexpensive surveillance camera. On the other hand, this method realizes different discriminations using the same learning model, and any learning model can be used. In addition to neural networks, classic machine learning models such as random forests can also be used.
[0048] The present invention is not limited to the above-described embodiment, and various modifications and applications are possible without departing from the spirit and scope of the present invention. [Explanation of symbols]
[0049] 1 equipment 10 Processors 20 cores 30 Communications Department 100 Detection circuit 110 Selector 112 Discriminator 114 Determiner
Claims
1. A detection circuit incorporated in a processor installed in the device, a selector that receives input of processor information when a core of the processor executes a program and packet information by communication of the device, selects either the processor information or the packet information, and outputs a feature vector of the selected information of the processor information or the packet information to a discriminator; a classifier that is trained in advance to distinguish between a first event and a second event, the classifier receiving the feature quantity vector of the selected information, classifying between the first event and the second event, and outputting a discrimination result; a decider that collects the discrimination results of the discriminators for a predetermined time period and determines whether or not the first event and the second event have occurred for the predetermined time period; A detection circuit comprising:
2. the feature vector uses at least one of information on instruction execution time, information on instruction distance, and information on cache accuracy as a type of feature in the case of the processor information, and uses at least one of basic information on connections, information on the number of connections, and information on a ratio of connections as a type of feature in the case of the packet information; the discriminator discriminates the first event with respect to the processor information as an occurrence of malware, and the second event with respect to the packet information as an occurrence of malicious communication; 2. The detection circuit of claim 1.
3. the selector is configured as a multiplexer corresponding to each element of the feature vector; an order of input of each element of the processor information and the packet information for each communication during program execution is defined in association with each of the multiplexers; Each of the multiplexers outputs an element of the associated feature, thereby outputting the feature vector of the information selected by the classifier.
2. The detection circuit of claim 1.
4. 2. The detection circuit according to claim 1, wherein the selector specifies that, when the processor information and the packet information are received simultaneously, the packet information is selected with priority.
5. the classifier is trained using feature vectors of the processor information and the packet information for learning as training data, and the input order of each element of the processor information and the packet information for each communication during program execution is specified and arranged, and missing feature elements are filled in and used as training data for training.
2. The detection circuit of claim 1.
Citation Information
Patent Citations
Specific system, specific method and specific program
JP2019103069A
Abnormality detection device, abnormality detection program, and abnormality detection method
JP2022117827A
