A behavior detection method, device, equipment and storage medium
By building a process tree and calculating the process's dangerous value, detecting and intercepting potential malicious behaviors, the problem of malicious programs in the existing technology that cannot detect virus files is improved, and system security is improved.
Patent Information
- Application Number
- CN202210177209.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-25
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2042-02-25
AI Technical Summary
The existing technology is difficult to detect malicious programs when malicious programs do not generate virus files, resulting in threats to system security and unable to effectively prevent malicious behavior.
By monitoring process creation behavior, building process trees, calculating the dangerous value of the target process, determining whether there are preset behaviors to be identified, and then pre-detecting and intercepting potential malicious behaviors.
It improves the security of the system, reduces the loss of malicious behavior to the system, and can detect and intercept malicious behavior before it occurs, preventing potential harm.
Smart Images

Figure CN114595452B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer security, and in particular to a behavior detection method, device, equipment and storage medium. Background Art
[0002] With the rapid development of Internet communication technology, there are more and more ways to obtain computer programs, but there are also more and more malicious programs targeting the system (for example, virus programs, Trojan programs, etc.). If users run malicious programs, the malicious behavior generated will threaten system security.
[0003] In the current related technologies, anti-virus software is usually used to detect and kill malicious programs. The anti-virus software detects malicious programs by matching the hash value or feature code of the virus file. However, some malicious programs can evade the detection of anti-virus software by disguising themselves. For example, when the malicious program does not generate a virus file, the anti-virus software cannot detect the malicious program. Once the malicious program is used maliciously, it may cause immeasurable losses to the user.
[0004] Therefore, how to detect whether malicious behavior exists before it occurs and improve system security is a technical problem that urgently needs to be solved. Summary of the invention
[0005] In order to solve the above technical problems, the embodiments of the present disclosure provide a behavior detection method, which can detect in advance whether there is a preset behavior to be identified by calculating the risk value corresponding to a preset second type process that calls a preset first type process, thereby reducing the loss to the system caused by the preset behavior to be identified, thereby improving the system security.
[0006] In a first aspect, the present disclosure provides a behavior detection method, the method comprising:
[0007] When a process creation behavior is detected, determining the process created by the process creation behavior as a first process, and determining a process type to which the first process belongs;
[0008] Updating the process type and the first process into a process tree; wherein the process tree includes a plurality of nodes and edges for connecting the nodes, the nodes are used to identify processes, the nodes are configured with node information including the process type to which the corresponding process belongs, and the edges are used to identify dependency relationships between nodes;
[0009] If it is determined that the process type to which the first process belongs is a preset first process type, determining based on the process tree whether there is a node whose node information includes a preset second process type among the nodes to which the node corresponding to the first process directly or indirectly depends; wherein the correlation degree values between the preset first process type and the preset second process type and the preset behavior to be identified are both greater than a preset threshold value;
[0010] If it is determined that there is a node whose node information includes the preset second process type, determining the process corresponding to the node as the target process;
[0011] Based on the process tree, calculate the risk value corresponding to the target process; wherein the risk value is calculated based on the preset risk values of the processes corresponding to the nodes having the node corresponding to the target process as the parent node, and the preset risk value is used to characterize the association probability between the corresponding process and the preset behavior to be identified;
[0012] Based on the risk value corresponding to the target process, determine whether the preset behavior to be identified currently exists.
[0013] In an optional implementation manner, when a process creation behavior is monitored, determining the process created by the process creation behavior as a first process, and determining the process type to which the first process belongs includes:
[0014] When the process creation behavior is detected, program information of the first process corresponding to the process creation behavior is obtained; wherein the program information includes at least one of the directory where the program file is located, the company name of the program file attribute, and the digital signature of the program file, as well as the process file information;
[0015] The preset configuration table is queried based on the program information to determine the process type to which the first process belongs; wherein the preset configuration table includes program information corresponding to processes belonging to the preset first process type and program information corresponding to processes belonging to the preset second process type.
[0016] In an optional implementation manner, calculating the risk value corresponding to the target process based on the process tree includes:
[0017] Based on the process tree, determine, among the processes corresponding to the nodes having the node corresponding to the target process as the parent node, processes belonging to the preset first process type as the processes to be calculated;
[0018] A value obtained by accumulating the preset risk values corresponding to the processes to be calculated is determined as the risk value corresponding to the target process.
[0019] In an optional implementation manner, calculating the risk value corresponding to the target process based on the process tree includes:
[0020] Based on the process tree, determine whether there is a process whose preset danger value is greater than or equal to a preset danger threshold among the processes corresponding to each node having the node corresponding to the target process as a parent node; wherein the process whose preset danger value is greater than or equal to the preset danger threshold includes a process whose startup parameter carries a preset statement;
[0021] If it is determined that there is a process whose preset risk value is greater than or equal to the preset risk threshold, the preset risk value corresponding to the process is determined as the risk value corresponding to the target process.
[0022] In an optional implementation manner, the preset behavior to be identified includes suspicious behavior and dangerous behavior, and the determining whether the preset behavior to be identified currently exists based on the risk value corresponding to the target process includes:
[0023] If it is determined that the risk value corresponding to the target process is greater than 0 and less than a preset risk threshold, it is determined that the suspicious behavior currently exists;
[0024] If it is determined that the risk value corresponding to the target process is not less than the preset risk threshold, it is determined that the dangerous behavior currently exists.
[0025] In an optional implementation manner, after determining whether the preset behavior to be identified currently exists based on the risk value corresponding to the target process, the method further includes:
[0026] If it is determined that the dangerous behavior currently exists, intercept the dangerous behavior and display a system notification; wherein the system notification is used to inform the user that the dangerous behavior currently exists;
[0027] or,
[0028] If it is determined that the dangerous behavior currently exists, the danger value corresponding to the target process and a preset option window are displayed; wherein the preset option window is used to determine whether to intercept the dangerous behavior.
[0029] In a second aspect, the present disclosure provides a behavior detection device, the device comprising:
[0030] a first determining module, configured to, when a process creation behavior is detected, determine a process created by the process creation behavior as a first process, and determine a process type to which the first process belongs;
[0031] An updating module, configured to update the process type and the first process into a process tree; wherein the process tree includes a plurality of nodes and edges for connecting the nodes, the nodes are used to identify processes, the nodes are configured with node information including the process type to which the corresponding process belongs, and the edges are used to identify dependencies between the nodes;
[0032] a second determination module, configured to, if it is determined that the process type to which the first process belongs is a preset first process type, determine, based on the process tree, whether there is a node whose node information includes a preset second process type among the nodes to which the node corresponding to the first process directly or indirectly depends; wherein the correlation degree values between the preset first process type and the preset second process type and the preset behavior to be identified are both greater than a preset threshold;
[0033] A third determining module is configured to determine the process corresponding to the node as the target process if it is determined that there is a node whose node information includes the preset second process type;
[0034] A calculation module, configured to calculate a risk value corresponding to the target process based on the process tree; wherein the risk value is calculated based on preset risk values of processes corresponding to respective nodes having the node corresponding to the target process as a parent node, and the preset risk value is used to characterize the association probability between the corresponding process and the preset behavior to be identified;
[0035] The fourth determination module is used to determine whether the preset behavior to be identified currently exists based on the risk value corresponding to the target process.
[0036] In a third aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the above method.
[0037] In a fourth aspect, the present disclosure provides a behavior detection device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the computer program.
[0038] In a fifth aspect, the present disclosure provides a computer program product, wherein the computer program product comprises a computer program / instructions, and the computer program / instructions implement the above method when executed by a processor.
[0039] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has at least the following advantages:
[0040] The embodiment of the present disclosure provides a behavior detection method. First, when a process creation behavior is monitored, the process type to which the first process corresponding to the process creation behavior belongs is determined, and the process type and the first process are updated to a process tree, wherein the process tree includes a plurality of nodes and edges for connecting nodes, the nodes are used to identify processes, the nodes are configured with node information including the process type to which the corresponding process belongs, and the edges are used to identify the dependency relationship between nodes. If it is determined that the process type to which the first process belongs is a preset first process type, then it is determined based on the process tree whether there is a node whose node information includes a preset second process type among the nodes to which the node corresponding to the first process directly or indirectly depends, and if it is determined that there is a node whose node information includes a preset second process type, then the process corresponding to the node is determined as a target process, wherein the correlation degree values between the preset first process type and the preset second process type and the preset behavior to be identified are both greater than a preset threshold. Then, based on the process tree, the danger value corresponding to the target process is calculated, wherein the danger value is calculated based on the preset danger value of the process corresponding to each node with the node corresponding to the target process as the parent node, and the preset danger value is used to characterize the probability of association between the corresponding process and the preset behavior to be identified. Furthermore, based on the danger value corresponding to the target process, it is determined whether there is a preset behavior to be identified at present. It can be seen that the embodiment of the present disclosure can detect in advance whether there is a preset behavior to be identified by calculating the risk value corresponding to the preset second type process that calls the preset first type process, thereby reducing the loss to the system caused by the preset behavior to be identified, thereby improving the system security. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] Figure 1 A flow chart of a behavior detection method provided by an embodiment of the present disclosure;
[0044] Figure 2 A schematic diagram of a process tree provided by an embodiment of the present disclosure;
[0045] Figure 3 A schematic diagram of the structure of a behavior detection device provided in an embodiment of the present disclosure;
[0046] Figure 4A schematic diagram of the structure of a behavior detection device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0047] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0048] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0049] With the rapid development of Internet communication technology, there are more and more ways to obtain computer programs, but there are also more and more malicious programs targeting the system (for example, virus programs, Trojan programs, etc.). If users run malicious programs, the malicious behavior generated will threaten system security.
[0050] In the current related technologies, anti-virus software is usually used to detect and kill malicious programs. The anti-virus software detects malicious programs by matching the hash value or feature code of the virus file. However, some malicious programs can evade the detection of anti-virus software by disguising themselves. For example, when the malicious program does not generate a virus file, the anti-virus software cannot detect the malicious program. Once the malicious program is used maliciously, it may cause immeasurable losses to the user.
[0051] Therefore, how to detect whether malicious behavior exists before it occurs and improve system security is a technical problem that urgently needs to be solved.
[0052] In order to improve the security of the system, the embodiment of the present disclosure provides a behavior detection method. First, when a process creation behavior is monitored, the process type to which the first process corresponding to the process creation behavior belongs is determined, and the process type and the first process are updated to a process tree, wherein the process tree includes a plurality of nodes and edges for connecting nodes, the nodes are used to identify processes, the nodes are configured with node information including the process type to which the corresponding process belongs, and the edges are used to identify the dependency relationship between nodes. If it is determined that the process type to which the first process belongs is a preset first process type, then based on the process tree, it is determined whether there is a node whose node information includes a preset second process type among the nodes to which the node corresponding to the first process directly or indirectly depends, if it is determined that there is a node whose node information includes a preset second process type, then the process corresponding to the node is determined as a target process, wherein the correlation degree values between the preset first process type and the preset second process type and the preset behavior to be identified are both greater than a preset threshold. Then, based on the process tree, the danger value corresponding to the target process is calculated, wherein the danger value is calculated based on the preset danger value of the process corresponding to each node with the node corresponding to the target process as the parent node, and the preset danger value is used to characterize the association probability between the corresponding process and the preset behavior to be identified. Then, based on the danger value corresponding to the target process, it is determined whether there is currently a preset behavior to be identified. It can be seen that the embodiment of the present disclosure can detect in advance whether there is a preset behavior to be identified by calculating the danger value corresponding to the preset second type process that calls the preset first type process, thereby reducing the loss of the system caused by the generation of the preset behavior to be identified, thereby improving the security of the system.
[0053] Based on this, the present disclosure provides a behavior detection method, referring to Figure 1 , is a flow chart of a behavior detection method provided by an embodiment of the present disclosure, the method comprising:
[0054] S101: When a process creation behavior is monitored, a process created by the process creation behavior is determined as a first process, and a process type to which the first process belongs is determined.
[0055] In actual applications, a process is an execution activity of a program on a computer. When a program is run, a process creation behavior will occur. The process creation behavior can correspond to the creation of a process. The process file is generally named with the ending of .exe. Processes can be divided into system processes and user processes. Among them, system processes can be used to complete various functions of the operating system. For example, system processes can include svchost.exe (used to support normal operation of the system), spoolsv.exe (used to manage all local and network print queues and control all print jobs), services.exe (used to manage starting and stopping services), etc.; user processes are processes started by users. For example, user processes can include application software processes (such as Microsoft Word's main program winword.exe, Microsoft Excel's main program excel.exe, etc.). Usually, you can right-click the blank area of the taskbar and select "Task Manager" to view the processes in it.
[0056] In the embodiment of the present disclosure, when a process creation behavior is monitored, a first process corresponding to the process creation behavior is generated, and the process type to which the first process belongs can be determined based on the correspondence between the process and the process type to which it belongs. The process type may include a common process type, a preset first process type, a preset second process type, etc., wherein the preset first process type and the preset second process type are respectively associated with the preset behavior to be identified. For example, when the system is invaded due to a vulnerability, malicious code will be implanted in the process corresponding to the preset second process type, thereby generating the preset behavior to be identified, and when executing the preset behavior to be identified, the process corresponding to the preset first process type will be used.
[0057] In the disclosed embodiment, the preset first process type may be named as an easily exploitable process type, wherein the process corresponding to the easily exploitable process type may be a process used to execute system commands or script commands, etc., for example, it may include sc.exe, reg.exe, cmd.exe, powershell.exe, etc.; the preset second process type may be named as an easily attacked process type, wherein the process corresponding to the easily attacked process type may be a process providing system services, for example, it may include svchost.exe, spoolsv.exe, services.exe, etc., and the process corresponding to the easily attacked process type may also be an application software process, for example, it may include winword.exe, excel.exe, etc.; the process corresponding to the ordinary process type may be other system processes or user processes except easily attacked processes and easily exploited processes.
[0058] It should be noted that the preset first process type in the embodiment of the present disclosure can be named as an easily exploitable process type, or it can be named as other process type names; the preset second process type can be named as an easily attacked process type, or it can be named as other process type names; and so on. The embodiment of the present disclosure does not limit the names of the preset first process type and the preset second process type.
[0059] In the embodiment of the present disclosure, according to the correspondence between a process and the process type to which it belongs, if the first process has a correspondence with a normal process type, it can be determined that the process type to which the first process belongs is a normal process; if the first process has a correspondence with a vulnerable process type, it can be determined that the process type to which the first process belongs is a vulnerable process; if the first process has a correspondence with an easily exploitable process type, it can be determined that the process type to which the first process belongs is an easily exploitable process.
[0060] In an optional implementation manner, the process type to which the first process corresponding to the process creation behavior belongs may be determined according to the following steps A1-A2.
[0061] Step A1: when a process creation behavior is detected, program information of a first process corresponding to the process creation behavior is obtained.
[0062] The program information includes at least one of the following information: the directory where the program file is located, the company name of the program file attribute, the digital signature of the program file, and the process file information.
[0063] In the disclosed embodiment, when a process creation behavior is monitored, a first process corresponding to the process creation behavior is generated, and program information corresponding to the first process is obtained. The program information corresponding to the process includes process file information. Based on the process file information, the correspondence between the process corresponding to the process file information and the process type to which it belongs can be queried, so that the process type to which the process corresponding to the process file information belongs can be known. For example, the process file information included in the program information of the first process is winword.exe. Based on the above example, it can be queried that the process corresponding to winword.exe has a correspondence with the vulnerable process type, and it can be determined that the process type to which the first process belongs is a vulnerable process.
[0064] Since system processes can be copied or forged, if the process type of a process is determined based only on the process file information corresponding to the process, there may be an inaccurate determination problem. Therefore, the program information may also include at least one of the following information: the directory where the program file is located, the company name of the program file attribute, and the digital signature of the program file. Thus, the process type of a process can be determined based on the process information corresponding to the process with higher accuracy.
[0065] Step A2: querying a preset configuration table based on the program information to determine the process type to which the first process belongs.
[0066] The preset configuration table includes program information corresponding to processes belonging to a preset first process type and program information corresponding to processes belonging to a preset second process type.
[0067] In the disclosed embodiment, first, based on the program information corresponding to the process, the process type to which the process belongs is determined, and then, the program information corresponding to the process and the process type to which the process belongs are saved in a preset configuration table.
[0068] For example, assuming that the program information A corresponding to process A includes process file information and directory information where the program file is located, wherein the process file information corresponding to process A is sc.exe, based on the program information A, it can be determined that process A is a process that starts a service from the system command line, then process A can be determined as a process of the preset first process type (or named as an easily exploitable process type), and process A belonging to the preset first process type and process information A corresponding to process A are saved in the preset configuration table; similarly, assuming that the program information B corresponding to process B includes process file information and program file attribute company name information, wherein the process file information corresponding to process B is winword.exe, based on the program information B, it can be determined that process B is the main program of Microsoft Word, then process B can be determined as a process of the preset second process type (or named as an easily exploited process type), and process B belonging to the preset second process type and process information B corresponding to process B are saved in the preset configuration table; and so on, the obtained preset configuration table includes program information corresponding to processes belonging to the preset first process type and program information corresponding to processes belonging to the preset second process type.
[0069] In the embodiment of the present disclosure, after obtaining the program information of the first process corresponding to the process creation behavior, the pre-configured preset configuration table is queried based on the program information to determine the process type to which the first process belongs. For example, based on step A1, the process file information included in the program information of the first process is obtained as winword.exe, and the program file attribute company name information is Microsoft Corp. Then, based on the above pre-configured preset configuration table, it can be determined that the process type to which the first process belongs is the preset second process type (or named as vulnerable process type).
[0070] S102: Update the determined process type and the first process into the process tree.
[0071] The process tree includes a plurality of nodes and edges for connecting the nodes. The nodes are used to identify the processes. The nodes are configured with node information including the process type to which the corresponding processes belong. The edges are used to identify the dependency relationships between the nodes.
[0072] In the disclosed embodiment, a process tree is established based on a data structure of a "one-to-many" tree relationship between processes, wherein the process tree includes multiple nodes, one node is used to identify a process, each node is configured with node information, the node information includes the process type to which the process corresponding to the node belongs, and the node information may also include the process file name, process file path, and other information of the process corresponding to the node. The process tree also includes edges for connecting nodes, and the edges are used to identify the dependency relationship between nodes.
[0073] like Figure 2 As shown, it is a schematic diagram of a process tree provided by an embodiment of the present disclosure, wherein the process tree includes 9 nodes (node A, node B, node C, node D, node E, node F, node G, node I, node H), which respectively identify 9 processes, and node A is the root node. The process tree also includes 8 edges for connecting nodes. For example, edge a is used to identify the parent-child dependency relationship between node A and node C, wherein node A is the parent node of node C, and node C is the child node of node A; similarly, edge b is used to identify the parent-child dependency relationship between node C and node E; edge c is used to identify the parent-child dependency relationship between node C and node F; and so on.
[0074] In the embodiment of the present disclosure, based on the above S101, a first process is created, and a process type corresponding to the first process is determined, and the determined process type and the first process are updated to the process tree. For example, assuming that the first process is process I, the process type of process I and process I are updated to the process tree to obtain an updated process tree. Figure 2 Node I in , node I identifies process I, and node I is configured with node information including the process type to which process I belongs, edge d identifies the parent-child dependency relationship between node E and node I, wherein node E is the parent node of node I, and node I is the child node of node E.
[0075] S103: If it is determined that the process type to which the first process belongs is a preset first process type, determine based on the process tree whether there is a node whose node information includes a preset second process type among the nodes directly or indirectly dependent on the node corresponding to the first process.
[0076] The correlation values between the preset first process type and the preset second process type and the preset behavior to be identified are both greater than a preset threshold.
[0077] In the disclosed embodiment, the correlation degree between a process and a preset behavior to be identified can be quantified as a correlation degree value. When the process is classified into types, a preset threshold value of the correlation degree between the process and the preset behavior to be identified can be set in advance, wherein the correlation degree values between the preset first process type and the preset second process type and the preset behavior to be identified are respectively greater than the preset threshold value of the correlation degree.
[0078] In the embodiment of the present disclosure, based on the above S101, the process type to which the first process belongs is determined. If it is determined that the process type to which the first process belongs is the preset first process type, then based on the process tree updated in the above S102, it is determined whether there is a node whose node information includes a node of the preset second process type among the nodes on which the node corresponding to the first process directly or indirectly depends.
[0079] For example, taking the first process type as a vulnerable process type and the second process type as a vulnerable process type as an example, assuming that the first process is process I, based on the above S101, it is determined that the process type to which process I belongs is a vulnerable process type, and then based on Figure 2 In the process tree shown, it is determined that the nodes directly dependent on node I corresponding to process I include node E, and the nodes indirectly dependent on node I include node C and node A, then it is determined whether there are corresponding node information including nodes of vulnerable process types in nodes A, C and E. For example, assuming that process A corresponding to node A belongs to the common process type, process C corresponding to node C belongs to the vulnerable process type, and process E corresponding to node E belongs to the easily exploited process type, then it can be determined that there is a node of vulnerable process type in nodes A, C and E, which is node C; assuming that process A corresponding to node A belongs to the common process type, process C corresponding to node C belongs to the vulnerable process type, and process E corresponding to node E belongs to the vulnerable process type, then it can be determined that there are nodes of vulnerable process type in nodes A, C and E, which are nodes C and E; and so on.
[0080] S104: If it is determined that there is a node whose node information includes a preset second process type, then a process corresponding to the node is determined as a target process.
[0081] In the disclosed embodiment, based on the above S103, if it is determined that there is a node whose node information includes a preset second process type, the process corresponding to the node is determined as the target process, wherein the node corresponding to the target process includes one or more child nodes, and at least one of the one or more child nodes has a process corresponding to a child node belonging to the preset first process type (easily exploitable process type). For example, based on the above example, it is determined that there is a node of an easily attacked process type among nodes A, C, and E, which is node C, and then process C corresponding to node C is determined as the target process.
[0082] In the embodiment of the present disclosure, if it is determined that there is no node whose node information includes the preset second process type, there is no target process, and the process creation behavior continues to be monitored. Figure 2 After determining that the process type of the first process (such as process B) is the preset first process type (easily exploitable process type), based on the process tree, it can be determined that the node that node B corresponding to process B directly depends on is node A. Assuming that process A corresponding to node A belongs to the ordinary process type, it can be determined that node A is not a node whose node information includes the preset second process type (easily attacked process type), then there is no target process, and the process creation behavior continues to be monitored.
[0083] S105: Based on the process tree, calculate the risk value corresponding to the target process.
[0084] Among them, the danger value is calculated based on the preset danger values of the processes corresponding to each node with the node corresponding to the target process as the parent node. The preset danger value is used to characterize the association probability between the corresponding process and the preset behavior to be identified.
[0085] In the disclosed embodiment, the preset danger value is used to characterize the probability of association between the corresponding process and the preset behavior to be identified. For example, if the probability of association between the process and the preset behavior to be identified is 0, it means that the degree of association between the process and the preset behavior to be identified is extremely low (such as a process of an ordinary type), and the preset danger value corresponding to the ordinary type process can be set to 0; if the probability of association between the process and the preset behavior to be identified is greater than the preset probability value (such as the probability of being exploited when executing the preset behavior to be identified is 70%), the preset danger value of the process corresponding to this type (such as a process type that is easily exploited) can be set to 30; and so on.
[0086] It should be noted that the specific numerical value of the preset danger value of the process can be pre-set based on the security level of the system and the probability of association between the process and the preset behavior to be identified, and the preset danger values corresponding to processes belonging to the same process type can be the same or different. The embodiment of the present disclosure does not limit the specific numerical value of the preset danger value of the process.
[0087] In the disclosed embodiment, after determining the target process based on the above S104, based on the process tree, each node that has the node corresponding to the target process as a direct parent node and each node that is an indirect parent node are determined, and the preset danger values of the processes corresponding to each of the above nodes are obtained, and each preset danger value is accumulated to obtain the danger value corresponding to the target process.
[0088] For example, based on the above example, refer to Figure 2, assuming that the process C corresponding to the node C is a vulnerable process, the process E corresponding to the node E is an easily exploited process, the process F corresponding to the node F is a common process, and the process I corresponding to the node I is an easily exploited process, based on the above S104, the process C corresponding to the node C is determined to be the target process. Based on the process tree, it is determined that the nodes with the node corresponding to the process C as the direct parent node include the node E and the node F, and the nodes with the node corresponding to the process C as the indirect parent node include the node I. According to the security level of the system and the association probability between the process and the preset behavior to be identified, the preset danger value of the common process can be preset to 0, and the preset danger value of the easily exploited process can be preset to 30, and the calculated danger value corresponding to the target process (process C) can be 60.
[0089] In an optional implementation, the risk value corresponding to the target process may be calculated according to the following steps B1-B2.
[0090] Step B1, based on the process tree, determine the processes of the preset first process type among the processes corresponding to the nodes having the node corresponding to the target process as the parent node, as the processes to be calculated.
[0091] In this step, based on the process tree, each node that has the node corresponding to the target process as a direct parent node and each node that is an indirect parent node are determined, and the processes corresponding to the above nodes are determined to be processes of a preset first process type (such as an easily exploitable process type). For example, based on the above example, among the processes (including process E, process F, and process I) corresponding to the nodes that have the node corresponding to the target process (process C) as a parent node, the processes that belong to the easily exploitable process type include process E and process I, and process E and process I can be used as processes to be calculated.
[0092] Step B2: The value obtained by accumulating the preset risk values corresponding to each process to be calculated is determined as the risk value corresponding to the target process.
[0093] In this step, for example, based on the above example, the value obtained by accumulating the preset danger values corresponding to process E and process I is determined as the danger value corresponding to the target process (process C). Assuming that the preset danger value of the vulnerable process is pre-set to 30, the danger value corresponding to process C is determined to be 60 (30+30).
[0094] In another optional implementation, the risk value corresponding to the target process may be calculated according to the following steps C1-C2.
[0095] Step C1, based on the process tree, determine whether there is a process whose preset danger value is greater than or equal to a preset danger threshold among the processes corresponding to each node having a node corresponding to the target process as a parent node.
[0096] Among them, the process whose preset risk value is greater than or equal to the preset risk threshold includes the process whose startup parameter carries a preset statement.
[0097] In this step, based on the process tree, each node with the node corresponding to the target process as a direct parent node and each node as an indirect parent node is determined, and it is determined whether there is a process including a startup parameter carrying a preset statement among the processes corresponding to the above nodes, wherein the process with the startup parameter carrying the preset statement is used to indicate that the process will directly bring security risks to the system when it is used. If it is determined that there is a process with a startup parameter carrying a preset statement, the preset danger value corresponding to the process is greater than or equal to the preset danger threshold, wherein the preset danger threshold is pre-set based on the security level of the system, and the preset danger threshold can be 30, 60, etc. The higher the system security level, the smaller the preset danger threshold can be set.
[0098] For example, assuming that when the startup parameter of the process vssadmin.exe carries the statement Delete Shadows, such as vssadmin.exe Delete Shadows / All / Quiet, it means deleting the system's shadow copy to prevent the system from being restored. Then the process vssadmin.exe with the startup parameter carrying the statement Delete Shadows can be a process whose preset danger value is greater than the preset danger threshold; assuming that when the startup parameter of the process wbadmin.exe carries the statement Delete system statebackup, such as wbadmin.exe Delete system state backup, it means deleting the backup or configuration to prevent the system from being restored. Then the process wbadmin.exe with the startup parameter carrying the statement Delete system state backup can be a process whose preset danger value is greater than the preset danger threshold; and so on.
[0099] Step C2: If it is determined that there is a process whose preset danger value is greater than or equal to the preset danger threshold, the preset danger value corresponding to the process is determined as the danger value corresponding to the target process.
[0100] In this step, based on step C1, if it is determined that there is a process whose preset danger value is greater than or equal to the preset danger threshold, the preset danger value corresponding to the process can be directly determined as the danger value corresponding to the target process, without calculating the cumulative value of the preset danger values of the processes corresponding to other nodes that have the node corresponding to the target process as the parent node.
[0101] To illustrate, based on the above example, in the processes (including process E, process F, and process I) corresponding to each node with the node corresponding to the target process (process C) as the parent node, if process I is determined to be a process whose startup parameters carry a preset statement, and it is determined that the preset danger value of process I is greater than the preset danger threshold, then the preset danger value corresponding to process I (such as 100) can be directly determined as the danger value corresponding to process C, that is, the danger value of the target process is 100.
[0102] The disclosed embodiment can improve the efficiency of calculating the danger value corresponding to the target process by setting a special preset danger value (such as setting it to a value greater than a preset danger threshold) for the process whose startup parameters carry preset statements.
[0103] S106: Based on the risk value corresponding to the target process, determine whether there is a preset behavior to be identified.
[0104] In the embodiment of the present disclosure, based on the danger value corresponding to the target process calculated in S105 above, it can be determined whether there is a preset behavior to be identified. Generally speaking, the larger the danger value corresponding to the target process, the higher the possibility that there is a preset behavior to be identified.
[0105] In an optional implementation, the preset behaviors to be identified include suspicious behaviors and dangerous behaviors. If it is determined that the risk value corresponding to the target process is greater than 0 and less than the preset risk threshold, it is determined that suspicious behaviors currently exist; if it is determined that the risk value corresponding to the target process is not less than the preset risk threshold, it is determined that dangerous behaviors currently exist.
[0106] In the embodiment of the present disclosure, the preset behaviors to be identified may include suspicious behaviors and dangerous behaviors, wherein the degree of harm to the system caused by suspicious behaviors may be lower than the degree of harm to the system caused by dangerous behaviors. Assuming that the preset danger threshold is 60, if it is determined that the danger value corresponding to the target process (such as 30) is greater than 0 and less than the preset danger threshold, it is determined that suspicious behaviors currently exist; if it is determined that the danger value corresponding to the target process (such as 60) is equal to the preset danger threshold or it is determined that the danger value corresponding to the target process (such as 100) is greater than the preset danger threshold, it is determined that dangerous behaviors currently exist.
[0107] In an optional implementation, based on the risk value corresponding to the target process, if it is determined that dangerous behavior currently exists, the dangerous behavior is intercepted and a system notification is displayed, wherein the system notification is used to inform the user that dangerous behavior currently exists.
[0108] In the disclosed embodiment, based on the comparison between the danger value corresponding to the target process calculated in S105 above and the preset danger threshold, if it is determined that dangerous behavior currently exists, the system automatically intercepts the dangerous behavior and displays a system notification to inform the user that dangerous behavior currently exists, wherein the system notification can be displayed in the form of a pop-up window.
[0109] In the disclosed embodiment, since the degree of harm to the system caused by suspicious behavior is lower than that of dangerous behavior, the harm caused to the system may not be great. Therefore, if it is determined that suspicious behavior exists based on the risk value corresponding to the target process, the suspicious behavior can be let go and not intercepted.
[0110] In another optional implementation, based on the risk value corresponding to the target process, if it is determined that dangerous behavior currently exists, the risk value corresponding to the target process and a preset option window are displayed, wherein the preset option window is used to determine whether to intercept the dangerous behavior.
[0111] In the embodiment of the present disclosure, based on the comparison between the danger value corresponding to the target process calculated in the above S105 and the preset danger threshold, if it is determined that one or more suspicious behaviors and dangerous behaviors currently exist, the danger value corresponding to the target process and the preset option window for determining whether to intercept can be displayed. Then, the user can choose whether to intercept the currently existing suspicious behavior or dangerous behavior in the preset option window based on the danger value corresponding to the target process, wherein the preset option window can be displayed in the form of a pop-up window, and if the user selects "Yes", the corresponding suspicious behavior or dangerous behavior can be intercepted; if the user selects "No", the corresponding suspicious behavior or dangerous behavior can be passed.
[0112] In the behavior detection method provided by the embodiment of the present disclosure, first, when a process creation behavior is monitored, the process type to which the first process corresponding to the process creation behavior belongs is determined, and the process type and the first process are updated to a process tree, wherein the process tree includes a plurality of nodes and edges for connecting nodes, the nodes are used to identify processes, the nodes are configured with node information including the process type to which the corresponding process belongs, and the edges are used to identify the dependency relationship between nodes. If it is determined that the process type to which the first process belongs is a preset first process type, then based on the process tree, it is determined whether there is a node including a preset second process type in the node to which the node corresponding to the first process directly or indirectly depends, if it is determined that there is a node including a preset second process type in the node information, then the process corresponding to the node is determined as a target process, wherein the correlation degree values between the preset first process type and the preset second process type and the preset behavior to be identified are both greater than a preset threshold. Then, based on the process tree, the danger value corresponding to the target process is calculated, wherein the danger value is calculated based on the preset danger value of the process corresponding to each node with the node corresponding to the target process as the parent node, and the preset danger value is used to characterize the association probability between the corresponding process and the preset behavior to be identified. Then, based on the danger value corresponding to the target process, it is determined whether there is currently a preset behavior to be identified. It can be seen that the embodiment of the present disclosure can detect in advance whether there is a preset behavior to be identified by calculating the danger value corresponding to the preset second type process that calls the preset first type process, thereby reducing the loss of the system caused by the generation of the preset behavior to be identified, thereby improving the security of the system.
[0113] Based on the same inventive concept as the above embodiment, the present disclosure also provides a behavior detection device, referring to Figure 3 , is a schematic diagram of the structure of a behavior detection device provided in an embodiment of the present disclosure, wherein the behavior detection device 300 comprises:
[0114] A first determination module 301 is used for, when a process creation behavior is monitored, determining a process created by the process creation behavior as a first process, and determining a process type to which the first process belongs;
[0115] An updating module 302, configured to update the process type and the first process into a process tree; wherein the process tree includes a plurality of nodes and edges for connecting the nodes, the nodes are used to identify processes, the nodes are configured with node information including the process type to which the corresponding process belongs, and the edges are used to identify dependencies between the nodes;
[0116] A second determination module 303 is configured to determine, if it is determined that the process type to which the first process belongs is a preset first process type, whether there is a node whose node information includes a preset second process type among the nodes to which the node corresponding to the first process directly or indirectly depends based on the process tree; wherein the correlation degree values between the preset first process type and the preset second process type and the preset behavior to be identified are both greater than a preset threshold value;
[0117] A third determining module 304 is configured to determine the process corresponding to the node as the target process if it is determined that there is a node whose node information includes the preset second process type;
[0118] A calculation module 305 is used to calculate the risk value corresponding to the target process based on the process tree; wherein the risk value is calculated based on the preset risk values of the processes corresponding to the nodes having the node corresponding to the target process as the parent node, and the preset risk value is used to characterize the association probability between the corresponding process and the preset behavior to be identified;
[0119] The fourth determination module 306 is used to determine whether the preset behavior to be identified currently exists based on the risk value corresponding to the target process.
[0120] In an optional implementation manner, the first determining module 301 includes:
[0121] An acquisition submodule, for acquiring program information of a first process corresponding to the process creation behavior when the process creation behavior is detected; wherein the program information includes at least one of the directory where the program file is located, the company name of the program file attribute, and the digital signature of the program file, as well as the process file information;
[0122] The first determination submodule is used to query the preset configuration table based on the program information to determine the process type to which the first process belongs; wherein the preset configuration table includes program information corresponding to processes belonging to the preset first process type and program information corresponding to processes belonging to the preset second process type.
[0123] In an optional implementation manner, the calculation module 305 includes:
[0124] A second determination submodule is used to determine, based on the process tree, processes that belong to the preset first process type among the processes corresponding to the nodes that have the node corresponding to the target process as a parent node, as processes to be calculated;
[0125] The accumulation submodule is used to accumulate the preset danger values corresponding to the processes to be calculated, and determine the value obtained as the danger value corresponding to the target process.
[0126] In an optional implementation manner, the calculation module 305 includes:
[0127] A third determination submodule is used to determine, based on the process tree, whether there is a process whose preset danger value is greater than or equal to a preset danger threshold among the processes corresponding to each node having the node corresponding to the target process as a parent node; wherein the process whose preset danger value is greater than or equal to the preset danger threshold includes a process whose startup parameter carries a preset statement;
[0128] The fourth determination submodule is used to determine the preset danger value corresponding to the process as the danger value corresponding to the target process if it is determined that there is a process whose preset danger value is greater than or equal to the preset danger threshold.
[0129] In an optional implementation manner, the preset behaviors to be identified include suspicious behaviors and dangerous behaviors, and the fourth determination module 306 includes:
[0130] A fifth determination submodule, configured to determine that the suspicious behavior currently exists if it is determined that the risk value corresponding to the target process is greater than 0 and less than a preset risk threshold;
[0131] The sixth determination submodule is used to determine that the dangerous behavior currently exists if it is determined that the danger value corresponding to the target process is not less than the preset danger threshold.
[0132] In an optional implementation, the device further includes:
[0133] An interception module, for intercepting the dangerous behavior and displaying a system notification if it is determined that the dangerous behavior currently exists; wherein the system notification is used to inform the user that the dangerous behavior currently exists;
[0134] or,
[0135] The display module is used to display the risk value corresponding to the target process and a preset option window if it is determined that the dangerous behavior currently exists; wherein the preset option window is used to determine whether to intercept the dangerous behavior.
[0136] In the behavior detection device provided by the embodiment of the present disclosure, first, when a process creation behavior is monitored, the process type to which the first process corresponding to the process creation behavior belongs is determined, and the process type and the first process are updated to a process tree, wherein the process tree includes a plurality of nodes and edges for connecting nodes, the nodes are used to identify processes, the nodes are configured with node information including the process type to which the corresponding process belongs, and the edges are used to identify the dependency relationship between nodes. If it is determined that the process type to which the first process belongs is a preset first process type, then based on the process tree, it is determined whether there is a node including a preset second process type in the node to which the node corresponding to the first process directly or indirectly depends, and if it is determined that there is a node including a preset second process type in the node information, then the process corresponding to the node is determined as a target process, wherein the correlation degree values between the preset first process type and the preset second process type and the preset behavior to be identified are both greater than a preset threshold. Then, based on the process tree, the danger value corresponding to the target process is calculated, wherein the danger value is calculated based on the preset danger value of the process corresponding to each node with the node corresponding to the target process as the parent node, and the preset danger value is used to characterize the association probability between the corresponding process and the preset behavior to be identified. Then, based on the danger value corresponding to the target process, it is determined whether there is currently a preset behavior to be identified. It can be seen that the embodiment of the present disclosure can detect in advance whether there is a preset behavior to be identified by calculating the danger value corresponding to the preset second type process that calls the preset first type process, thereby reducing the loss of the system caused by the generation of the preset behavior to be identified, thereby improving the security of the system.
[0137] In addition to the above-mentioned method and apparatus, the embodiments of the present disclosure further provide a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device implements the behavior detection method described in the embodiments of the present disclosure.
[0138] The embodiment of the present disclosure further provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the behavior detection method described in the embodiment of the present disclosure is implemented.
[0139] In addition, the present disclosure also provides a behavior detection device 400, see Figure 4 As shown, it may include:
[0140] Processor 401, memory 402, input device 403 and output device 404. The number of processors 401 in the behavior detection device can be one or more. Figure 4 In some embodiments of the present disclosure, the processor 401, the memory 402, the input device 403 and the output device 404 may be connected via a bus or other means, wherein: Figure 4The example of connecting through bus is taken in the following.
[0141] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing of the behavior detection device by running the software programs and modules stored in the memory 402. The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc. In addition, the memory 402 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. The input device 403 can be used to receive input digital or character information, and generate signal input related to user settings and function control of the behavior detection device.
[0142] Specifically in this embodiment, the processor 401 will load the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 will run the applications stored in the memory 402, thereby realizing the various functions of the above-mentioned behavior detection device.
[0143] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0144] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A behavior detection method, characterized in that: The method comprises: When a process creation behavior is detected, determining the process created by the process creation behavior as a first process, and determining a process type to which the first process belongs; Updating the process type and the first process into a process tree; wherein the process tree includes a plurality of nodes and edges for connecting the nodes, the nodes are used to identify processes, the nodes are configured with node information including the process type to which the corresponding process belongs, and the edges are used to identify dependency relationships between nodes; If it is determined that the process type to which the first process belongs is a preset first process type, determining based on the process tree whether there is a node whose node information includes a preset second process type among the nodes to which the node corresponding to the first process directly or indirectly depends; wherein the correlation degree values between the preset first process type and the preset second process type and the preset behavior to be identified are both greater than a preset threshold value; If it is determined that there is a node whose node information includes the preset second process type, determining the process corresponding to the node as the target process; Based on the process tree, calculate the risk value corresponding to the target process; wherein the risk value is calculated based on the preset risk values of the processes corresponding to the nodes having the node corresponding to the target process as the parent node, and the preset risk value is used to characterize the association probability between the corresponding process and the preset behavior to be identified; Based on the risk value corresponding to the target process, determine whether the preset behavior to be identified currently exists.
2. The method according to claim 1, characterized in that When a process creation behavior is detected, determining the process created by the process creation behavior as a first process, and determining a process type to which the first process belongs, includes: When the process creation behavior is detected, program information of the first process corresponding to the process creation behavior is obtained; wherein the program information includes at least one of the directory where the program file is located, the company name of the program file attribute, and the digital signature of the program file, as well as the process file information; Based on the program information, a preset configuration table is queried to determine the process type to which the first process belongs; wherein the preset configuration table includes program information corresponding to processes belonging to the preset first process type and program information corresponding to processes belonging to the preset second process type.
3. The method according to claim 1, characterized in that The calculating, based on the process tree, a risk value corresponding to the target process includes: Based on the process tree, determine, among the processes corresponding to the nodes having the node corresponding to the target process as the parent node, processes belonging to the preset first process type as the processes to be calculated; A value obtained by accumulating the preset risk values corresponding to the processes to be calculated is determined as the risk value corresponding to the target process.
4. The method according to claim 1, characterized in that: The calculating, based on the process tree, a risk value corresponding to the target process includes: Based on the process tree, determine whether there is a process whose preset danger value is greater than or equal to a preset danger threshold among the processes corresponding to each node having the node corresponding to the target process as a parent node; wherein the process whose preset danger value is greater than or equal to the preset danger threshold includes a process whose startup parameter carries a preset statement; If it is determined that there is a process whose preset risk value is greater than or equal to the preset risk threshold, the preset risk value corresponding to the process is determined as the risk value corresponding to the target process.
5. The method according to claim 1, characterized in that The preset behaviors to be identified include suspicious behaviors and dangerous behaviors, and determining whether the preset behaviors to be identified currently exist based on the danger value corresponding to the target process includes: If it is determined that the risk value corresponding to the target process is greater than 0 and less than a preset risk threshold, it is determined that the suspicious behavior currently exists; If it is determined that the risk value corresponding to the target process is not less than the preset risk threshold, it is determined that the dangerous behavior currently exists.
6. The method according to claim 5, characterized in that After determining whether the preset behavior to be identified currently exists based on the risk value corresponding to the target process, the method further includes: If it is determined that the dangerous behavior currently exists, intercept the dangerous behavior and display a system notification; wherein the system notification is used to inform the user that the dangerous behavior currently exists; or, If it is determined that the dangerous behavior currently exists, the danger value corresponding to the target process and a preset option window are displayed; wherein the preset option window is used to determine whether to intercept the dangerous behavior.
7. A behavior detection device, characterized in that: The device comprises: a first determining module, configured to, when a process creation behavior is detected, determine a process created by the process creation behavior as a first process, and determine a process type to which the first process belongs; An updating module, configured to update the process type and the first process into a process tree; wherein the process tree includes a plurality of nodes and edges for connecting the nodes, the nodes are used to identify processes, the nodes are configured with node information including the process type to which the corresponding process belongs, and the edges are used to identify dependencies between the nodes; a second determination module, configured to, if it is determined that the process type to which the first process belongs is a preset first process type, determine, based on the process tree, whether there is a node whose node information includes a preset second process type among the nodes to which the node corresponding to the first process directly or indirectly depends; wherein the correlation degree values between the preset first process type and the preset second process type and the preset behavior to be identified are both greater than a preset threshold; A third determining module is configured to determine the process corresponding to the node as the target process if it is determined that there is a node whose node information includes the preset second process type; A calculation module, configured to calculate a risk value corresponding to the target process based on the process tree; wherein the risk value is calculated based on preset risk values of processes corresponding to respective nodes having the node corresponding to the target process as a parent node, and the preset risk value is used to characterize the association probability between the corresponding process and the preset behavior to be identified; The fourth determination module is used to determine whether the preset behavior to be identified currently exists based on the risk value corresponding to the target process.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the method according to any one of claims 1 to 6.
9. A behavior detection device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program / instruction, and when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Container escape detection method and device and electronic equipment
CN111881453A
Data processing method and device
CN113282456A
