Backdoor detection device, backdoor detection method, and backdoor detection program
The backdoor detection device automates the identification of backdoors in firmware by analyzing control flow graphs to detect sources and sinks, extracting and prioritizing function operation flows, thereby reducing manual effort and time.
Patent Information
- Application Number
- JP2024522218
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2021-10-14
- Publication Date
- 2024-10-10
- Estimated Expiration
- 2041-10-14
AI Technical Summary
Current methods for detecting backdoors in firmware require significant manual effort and time due to the complexity of modern computer systems, necessitating a more efficient and automated approach.
A backdoor detection device and method that utilize a control flow graph to identify sources and sinks, extract function operation flows, and prioritize these flows based on threat levels, reducing the need for manual analysis.
This approach minimizes the time and labor costs for security operators by automating the detection process, focusing on critical execution paths and potential backdoors.
Smart Images

Figure 2024537345000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a backdoor detection device, a backdoor detection method, and a backdoor detection program. [Background technology]
[0002] It is becoming increasingly important to detect backdoor functions in order to reduce the risk of damage to corporate resources and information. Today's computer systems are becoming more complex, making it difficult to configure them using only products from a single company. Therefore, it is common to procure products from outside and configure a system by combining the procured products. In this supply chain, the importance of detecting backdoors is increasing, so the manufacturer is responsible.
[0003] However, in order to detect backdoors in firmware without source code, it is necessary to disassemble and decompile the firmware, analyze suspicious functions and execution paths in detail, and manually screen for backdoors, which requires a lot of time and effort.Therefore, there is a demand for computer-assisted technology for the work involved in detecting backdoors (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0004] [Patent Document 1] International Publication No. 2021 / 028989 Summary of the Invention [Problem to be solved by the invention]
[0005] The disclosures of the above-mentioned prior art documents are incorporated herein by reference. The following analysis has been carried out by the present inventors.
[0006] Incidentally, even in the conventional technology, it was possible to identify functions that should be analyzed carefully and the execution paths that call them from within a program, which are often used by backdoors. However, regardless of the presence of a backdoor, the execution path often includes library functions or functions that define system calls. In the end, it was necessary for a human to perform manual analysis of the execution path.
[0007] In view of the above-mentioned problems, an object of the present invention is to provide a backdoor detection device, a backdoor detection method, and a backdoor detection program that contribute to minimizing the time and labor costs of security managers. [Means for solving the problem]
[0008] In a first aspect of the present invention, there is provided a backdoor detection device including a detection unit that detects a source, which is a function that accepts external input, and a sink, which is a predetermined function that is considered to have an effect on a machine, from a control flow graph of a program, an extraction unit that extracts a function operation flow, which is an execution path from the source to the sink, from the control flow graph, and a prioritization unit that prioritizes the function operation flows based on a threat level.
[0009] In a second aspect of the present invention, there is provided a backdoor detection method including: detecting sources, which are functions that accept external inputs, and sinks, which are predetermined functions considered to have an effect on a machine, from a control flow graph of a program; extracting function operation flows, which are execution paths from the sources to the sinks, from the control flow graph; and prioritizing the function operation flows based on a threat level.
[0010] In a third aspect of the present invention, there is provided a backdoor detection program including a detection process for detecting a source, which is a function that accepts an external input, and a sink, which is a predetermined function that is considered to affect a machine, from a control flow graph of a program, an extraction process for extracting a function operation flow, which is an execution path from the source to the sink, from the control flow graph, and a prioritization process for prioritizing the function operation flow based on a threat level. This program can be recorded in a computer-readable storage medium. The storage medium can be a non-transient medium such as a semiconductor memory, a hard disk, a magnetic recording medium, or an optical recording medium. The present invention can also be embodied as a computer program product.
[0011] According to each aspect of the present invention, it is possible to provide a backdoor detection device, a backdoor detection method, and a backdoor detection program that contribute to minimizing the time and labor costs of a security administrator. [Brief description of the drawings]
[0012] [Figure 1] FIG. 1 is a schematic diagram for explaining a backdoor detection device. [Diagram 2] FIG. 2 is a diagram showing an example of a sub-call graph including execution paths from sources and sinks. [Diagram 3] FIG. 3 is a diagram illustrating an example of a process for obtaining a function operation flow. [Figure 4] FIG. 4 is a flowchart outlining the backdoor detection method. [Diagram 5] FIG. 5 is a diagram illustrating an example of a hardware configuration of the backdoor detection device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. However, the present invention is not limited to the embodiment described below. In addition, in each drawing, the same or corresponding elements are appropriately assigned the same reference numerals. Furthermore, it should be noted that the drawings are schematic, and the dimensional relationship of each element, the ratio of each element, etc. may differ from the actual ones. There may also be parts in which the dimensional relationship and ratio differ between the drawings.
[0014] 1 is a schematic diagram for explaining a backdoor detection device 100. As shown in FIG. 1, the backdoor detection device 100 includes a detection unit 110, an extraction unit 120, and a prioritization unit .
[0015] The detection unit 110 detects sources and sinks from the control flow graph of a program. A source is a function that accepts external input, and a sink is a predetermined function that is considered to have an effect on the machine. Within a system, there are functions such as system calls and library functions that have a greater effect in causing malicious threats. These are called "sinks." Attackers use functions triggered by external input to launch backdoors and perform malicious operations. Functions that accept external input are called "sources."
[0016] The control flow graph of a program is a representation of all the possible paths that the program can take when it is executed. In this graph, the nodes represent contiguous sequences of code that contain no branches or destinations, and the directed edges connecting one node to another represent jump targets from one block to another. Control flow graphs are obtained by conventional static analysis tools.
[0017] The extraction unit 120 extracts function operation flows from the control flow graph. A function operation flow is an execution path from a source to a sink. As mentioned above, an attacker usually uses a source to trigger a sink to launch a backdoor and perform malicious operations. The extraction unit 120 searches for execution paths that an attacker may exploit.
[0018] The prioritization unit 130 prioritizes the functional operational flows based on the level of threat. The prioritization unit 130 eliminates the need to perform a full binary search, making the analysis more efficient.
[0019] The processes performed by the detection unit 110, the extraction unit 120, and the prioritization unit 130 will now be described in detail.
[0020] The detection unit 110 detects sources and sinks from the control flow graph of the program. In this process, the detection unit 110 may refer to a list of sources (i.e., functions that receive input from the outside) and a list of sinks (i.e., functions that have a significant effect on the system), and searches for functions described in the control flow graph of the program. The following are examples of the list of sources and the list of sinks.
[0021] List of sources Function list: {scanf, fgets, read, vscanf, ...} List of sinks Function list: {write, execve, link, rename, ...}
[0022] The extraction unit 120 extracts function operation flows from a control flow graph. First, the extraction unit 120 detects sub-call graphs including execution paths from sources and sinks in the entire control flow graph. This makes the search space extremely narrow. FIG. 2 is a diagram showing an example of a sub-call graph including execution paths from sources and sinks. For example, if the source is included in node 7 and the sink is included in node 14, the sub-graph is composed of nodes 4, 6 to 7, and 10 to 14.
[0023] Next, the extraction unit 120 searches from the source to the sink in the identified sub-call graph. If an execution path is found, the extraction unit 120 generates a function operation flow including instructions and data from external inputs. If an execution path is not found or if a function registered in the function table is not found, the backdoor is not notified.
[0024] An example of a process for obtaining a functional operation flow is shown in Figure 3. The example in Figure 3 again assumes that the source is contained in node 7 and the sink is contained in node 14.
[0025] In the procedure of searching for an execution path from the source (fgets), the extraction unit 120 creates a variable operation propagation chain in node 7. n ) is in the variable operation propagation chain in node 7, then the variable (var n ) to the calling node 4. The extraction unit 120 continues to repeat the above steps until no return variables are found and no more variables are propagated.
[0026] In the procedure of searching for an execution path to a sink (execve), the extraction unit 120 creates a conditional branch propagation chain in the node 14. The sink (execve) is protected by a branch condition. Next, the extraction unit 120 checks whether a conditional branch exists in the variable propagation chain when searching for an execution path from the above source. If a conditional branch exists in the variable propagation chain, then an execution path to the sink function has been found.
[0027] The extraction unit 120 continues to search for function operation flows for each source and sink. Then, the extraction unit 120 obtains a list of function operation flows of the analysis target program. The function operation flow includes all variables and instructions obtained from function calls that receive external inputs and lead to sinks. The following is an example of a list of function operation flows (FOFs):
[0028] FOF = { {func 7: (instruction1, data1), (instruction2, data2), ...} {func 4: (instruction1, data1), (instruction2, data2), …} … {func 14: (instruction1, data1), (instruction2, data2), …} }
[0029] The prioritization unit 130 prioritizes the function operational flows based on the threat level. To this end, the prioritization unit 130 has the following functions:
[0030] The prioritization unit 130 classifies the sinks based on the threat level. Some sinks are more threatening than others that allow the user full control. An example of a list of sinks classified based on the threat level that the prioritization unit 130 refers to is as follows:
[0031] TIFF2024537345000002.tif57143
[0032] The prioritization unit 130 prioritizes the function operation flows for each sink function based on the number of branch conditions of the external inputs in the function operation flows. The reason is that attackers always use complex branch routes to hide the actual data flow, so that the branch conditions of more external inputs may contain potential backdoor information. The following is an example of the number of branch conditions depending on the external inputs in the function operation flows that lead to sinks (open):
[0033] TIFF2024537345000003.tif31136
[0034] For each sink function, the prioritization unit 130 prioritizes the function operation flows based on the entropy of the data in the respective function operation flows. Higher entropy suggests the presence of encrypted and / or compressed data. Encrypted data is highly likely to contain passwords to circumvent authentication and therefore may have backdoor capabilities.
[0035] The entropy is calculated as follows: E = -Σ i p i log2p i Here, p i is the occurrence probability of each byte count. To calculate the function operation flow, the function operation flow is classified into instructions (opcodes) and data, and the data is converted to hexadecimal bytes. Below is an example of instructions (opcodes) and data in a function operation flow.
[0036] TIFF2024537345000004.tif96165
[0037] The values of the bytes range from 0 to 256, so the index "i" ranges from 0 to 256 and the entropy value ranges from 0 to 8. The probability of occurrence of each byte count is calculated using the formula p i =n i / n TOTAL For example, for index i=4, n i = 25, n TOTAL = 15000, the occurrence probability of each byte count is p4 = 25 / 15000.
[0038] The backdoor detection device 100 notifies the security administrator of the prioritized function operation flow. At this stage, the backdoor detection device 100 preferably includes a database containing known backdoors and an evaluation unit that compares the prioritized function operation flow with the database of known backdoors.
[0039] As described above, the backdoor detection device 100 includes the detection unit 110 that detects sources and sinks from the control flow graph of a program, the extraction unit 120 that extracts function operation flows from the control flow graph, and the prioritization unit 130 that prioritizes the function operation flows based on the threat level, thereby contributing to minimizing the time and labor costs of security administrators.
[0040] (Backdoor detection method) 4 is a flow chart showing an outline of the backdoor detection method. As shown in FIG 4, the backdoor detection method includes a detection step (S1), an extraction step (S2), and a prioritization step (S3).
[0041] In the detection step (S1), sources and sinks are detected from the control flow graph of the program. As described above, a source is a function that accepts external input, and a sink is a predetermined function that is considered to affect the machine.
[0042] In an extraction step (S2), functional operational flows are extracted from the control flow graph, where a functional operational flow is an execution path from a source to a sink.
[0043] In a prioritization step (S3), the functional operation flows are prioritized based on the threat level, where the sinks and / or functional operation flows classified based on the threat level are ordered by the number of branching conditions of their internal external inputs and / or the functional operation flows are prioritized based on the entropy of the data within each functional operation flow.
[0044] As described above, the backdoor detection method includes the detection step (S1), the extraction step (S2), and the prioritization step (S3), and contributes to minimizing the time and labor costs of security administrators.
[0045] Fig. 5 is a diagram showing an example of the hardware configuration of a backdoor detection device. The backdoor detection device 100 described above can be configured as an information processing device (computer) 200 having the hardware configuration shown in Fig. 5. However, the hardware configuration example shown in Fig. 5 is only an example of a hardware configuration that realizes each function of the backdoor detection device 100, and is not intended to limit the hardware configuration of the backdoor detection device 100. The backdoor detection device 100 can include hardware not shown in Fig. 5.
[0046] As shown in FIG. 5, a computer 200 includes a CPU (Central Processing Unit) 210, a main memory device 220, an auxiliary memory device 230, and a NIC (Network Interface Card) 240 which is a communication interface, which are interconnected by, for example, an internal bus.
[0047] The CPU 210 executes a backdoor detection program. The main storage device 220 is, for example, a RAM (Random Access Memory), and temporarily stores the backdoor detection program executed by the computer 200 so that the CPU 210 can process it.
[0048] The auxiliary storage device 230 is, for example, a hard disk drive (HDD), and is capable of storing the backdoor detection program on a medium- to long-term basis. The backdoor detection program can be provided as a computer program recorded on a non-transitory computer-readable storage medium. The auxiliary storage device 230 can be used to store the backdoor detection program recorded on the non-transitory computer-readable storage medium on a medium- to long-term basis.
[0049] The NIC 240 provides an interface to an external terminal via a network. The NIC 240 is used to receive images of the surface pattern on the tip of the cable used for connection work, the host name and port of the device, or to transmit work support information based on the results of individual item identification.
[0050] By executing the backdoor detection program by the computer 200 as described above, the computer 200 operates as the backdoor detection device 100 and realizes the backdoor detection method shown in FIG.
[0051] A part or all of the above-described embodiments can be described as, but is not limited to, the following supplementary notes. [Appendix 1] A backdoor detection device including a detection unit that detects a source, which is a function that accepts external input, and a sink, which is a predetermined function that is considered to have an effect on a machine, from a control flow graph of a program, an extraction unit that extracts a function operation flow, which is an execution path from the source to the sink, from the control flow graph, and a prioritization unit that prioritizes the function operation flows based on a threat level. [Appendix 2] The backdoor detection device according to claim 1, wherein the prioritization unit determines the priority of the function operation flow based on a conditional branch in the function operation flow that depends on an external input. [Appendix 3] The backdoor detection device according to claim 2, wherein the prioritization unit determines the priority of the function operation flows based on the number of conditional branches that depend on the external input. [Appendix 4] The backdoor detection device according to claim 1, wherein the prioritization unit determines the priority of the function operation flows based on data of the function operation flows. [Appendix 5] The backdoor detection device according to claim 4, wherein the prioritization unit prioritizes the function operation flows based on the entropy of the data. [Appendix 6] 6. The backdoor detection device of any one of Supplementary Note 1 to Supplementary Note 5, further comprising: a database including known backdoors; and an evaluation unit that compares the prioritized function operation flow with the database of known backdoors. [Appendix 7] 7. The backdoor detection device according to any one of appendices 1 to 6, wherein the function operation flow includes all variables and instructions obtained from a function call that receives an external input and leads to the sink. [Appendix 8] 8. The backdoor detection device according to claim 1, further comprising a list of the sinks classified by threat level, which is referred to by the prioritization unit. [Appendix 9] A backdoor detection method comprising: detecting sources, which are functions that accept external input, and sinks, which are predetermined functions deemed to have an effect on a machine, from a control flow graph of a program; extracting function operation flows, which are execution paths from the sources to the sinks, from the control flow graph; and prioritizing the function operation flows based on a threat level. [Appendix 10] A backdoor detection program including a detection process that detects a source, which is a function that accepts external input, and a sink, which is a predetermined function that is considered to have an effect on a machine, from a control flow graph of a program, an extraction process that extracts a function operation flow, which is an execution path from the source to the sink, from the control flow graph, and a prioritization process that prioritizes the function operation flows based on a threat level.
[0052] Although each embodiment of the present invention has been described above, within the framework of the entire disclosure of the present invention (including the scope of claims), modifications and adjustments of the embodiments or examples are possible based on the basic technical ideas. Furthermore, within the framework of the entire disclosure of the present invention, various disclosed elements (including each element of each claim, each element of each embodiment or example, each element of each drawing, etc.) can be variously combined or selected (or at least partially deleted). In other words, the present invention naturally includes various modifications and corrections that a person skilled in the art would be able to make according to the entire disclosure including the scope of claims and the technical ideas. In particular, with regard to the numerical ranges described in this specification, any numerical value or subrange included in the range should be interpreted as being specifically described even if not otherwise specified. Furthermore, the disclosures of the above cited patent documents, etc. are incorporated into this specification by reference. [Explanation of symbols]
[0053] 100 Backdoor detection device 110 Detection unit 120 Extraction part 130 Prioritization Division 200 Information processing equipment (computers) 210 CPU(Central Processing Unit) 220 Main storage 230 Auxiliary storage 240 NIC(Network Interface Card)
Claims
1. a detection unit that detects, from a control flow graph of a program, a source that is a function that receives an input from outside and a sink that is a predetermined function that is considered to have an effect on a machine; an extraction unit that extracts, from the control flow graph, a function operation flow that is an execution path from the source to the sink; a prioritization unit for prioritizing the functional operational flows based on a threat level; A backdoor detection device comprising:
2. The backdoor detection device according to claim 1 , wherein the priority assignment unit assigns priorities to the function operation flows based on conditional branches in the function operation flows that depend on external inputs.
3. The backdoor detection device according to claim 2 , wherein the prioritization unit prioritizes the function operation flows based on the number of conditional branches that depend on the external input.
4. The backdoor detection device according to claim 1 , wherein the prioritization unit prioritizes the function operation flows based on data of the function operation flows.
5. The backdoor detection device according to claim 4 , wherein the prioritization unit prioritizes the function operation flows based on the entropy of the data.
6. A database containing known backdoors, an evaluator for comparing the prioritized function operation flow with a database of known backdoors; The back door detection device according to claim 1 , further comprising:
7. The backdoor detection device according to claim 1 , wherein the function operation flow includes all variables and instructions resulting from a function call that receives an external input and leads to the sink.
8. The backdoor detection device according to claim 1 , further comprising a list of said sinks, which is referred to by said prioritization unit and which is classified by threat level.
9. Detecting sources, which are functions that accept external inputs, and sinks, which are predetermined functions that are considered to have an effect on the machine, from a control flow graph of the program; extracting from the control flow graph a function operation flow that is an execution path from the source to the sink; prioritizing said functional operational flows based on a threat level; A backdoor detection method comprising:
10. A detection process detects sources, which are functions that accept external inputs, and sinks, which are predetermined functions that are considered to have an effect on the machine, from a control flow graph of the program; an extraction process for extracting, from the control flow graph, a function operation flow that is an execution path from the source to the sink; a prioritization process that prioritizes the functional operational flows based on a threat level; Includes a backdoor detection program.
Citation Information
Patent Citations
Detection device, detection method, and detection program
WO2020240830A1
Software analysis device, software analysis method, and computer-readable medium
WO2021024476A1
Backdoor inspection device, backdoor inspection method, and non-transitory computer-readable medium
WO2021038705A1
Backdoor test device, method, and non-transitory computer-readable medium
WO2021028989A1
