A virus analysis method, device, equipment and medium
By constructing a virus family model, the logical relationship between the new virus and family members is automatically analyzed, and the inefficiency of relying on manual reliance on virus variant identification and analysis in the existing technology is solved, and automated analysis and early warning are realized.
Patent Information
- Application Number
- CN201910672408.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-24
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2040-07-27
AI Technical Summary
In the prior art, virus variant identification and analysis rely on manual analysis, which consumes a lot of human resources and time, and is difficult to achieve automation.
By constructing a virus family model, the logical relationship between the new virus and family members is obtained, the virus family model is generated, and the automatic analysis and early warning of the new virus is achieved.
Automatic identification and analysis of virus variants is realized, manual intervention is reduced, efficiency is improved, and the types and versions of new viruses can be quickly located, providing different levels of early warning.
Smart Images

Figure CN110457903B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of security, and in particular to a virus analysis method, device, equipment and medium. Background Art
[0002] In recent years, the criminals who create virus files have shown a gang-like trend, and the development of viruses has also shown family characteristics. Virus files in the same virus family usually have similar content, functions or behaviors. In the prior art, in order to timely discover new variants of virus families, it is necessary to rely heavily on security analysts to find new variants associated with a virus file in the relevant virus family based on the association relationship between virus files, file similarity and other contents, locate the previous version of the new variant, analyze and process the new variant, generate an early warning and push the early warning to relevant personnel for processing.
[0003] The existing technology discovers new variants through manual analysis by security analysts, which has the following significant deficiencies: it relies too much on security analysts and requires them to have analysis experience in related virus families so that they can quickly confirm new variants and locate versions before the new variants. This places high demands on security analysts and wastes human resources. The same virus family may have multiple members. Every time a suspected new variant is discovered and analyzed, the security analyst needs to compare the suspected new variant with members of multiple virus families one by one to confirm the new variant and find samples corresponding to the previous version of the new variant. This process will consume a lot of energy and the time cost is too high. Summary of the invention
[0004] In order to solve the technical problem that the prior art cannot realize automatic virus variant identification and cannot automatically perform virus analysis, the embodiments of the present invention provide a virus analysis method, device, equipment and medium.
[0005] In one aspect, the present invention provides a method for analyzing viruses, comprising:
[0006] Acquire a virus family set, wherein the virus family set includes at least one virus family;
[0007] Constructing a corresponding family model for each virus family to obtain a family model set corresponding to the virus family set;
[0008] Acquire new viruses, and acquire a target virus family according to the new viruses;
[0009] Extracting a first virus family model corresponding to the target virus family from the family model set;
[0010] Acquire a logical relationship between the newly added virus and each family member in the target virus family, and add the newly added virus to the first virus family model according to the logical relationship to obtain a second virus family model;
[0011] Generate analysis results of the newly added virus according to the second virus family model.
[0012] In another aspect, the present invention provides a virus analysis device, comprising:
[0013] A virus family set acquisition module, used to acquire a virus family set, wherein the virus family set includes at least one virus family;
[0014] A family model building module, used to build a corresponding family model for each virus family, so as to obtain a family model set corresponding to the virus family set;
[0015] A virus analysis parameter acquisition module, used to acquire newly added viruses and acquire a target virus family based on the newly added viruses;
[0016] A first virus family model acquisition module, used to extract a first virus family model corresponding to the target virus family from the family model set;
[0017] A model reconstruction module, used to obtain a logical relationship between the newly added virus and each family member in the target virus family, and add the newly added virus to the first virus family model according to the logical relationship to obtain a second virus family model;
[0018] An analysis module is used to generate an analysis result of the newly added virus according to the second virus family model.
[0019] On the other hand, the present invention provides a device, characterized in that the device includes a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement a virus analysis method.
[0020] On the other hand, the present invention provides a computer storage medium, characterized in that the storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded by a processor and executes a virus analysis method.
[0021] The present invention provides a virus analysis method, device, equipment and medium. The present invention generates a virus family model that can characterize the relationship network of the virus family by modeling the members of the virus family. When a new virus is found, the position of the new virus in the virus family model can be quickly located by analyzing the relationship between the new virus and each family member of the virus family, and then the type of the new virus and its related virus version can be automatically analyzed. Furthermore, according to the results of the automatic analysis, the new virus and its related viruses can be automatically analyzed to confirm their change scope, and different degrees of early warning can be provided based on the degree of change. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 This is an implementation scenario diagram of a virus analysis method provided by the present invention;
[0024] Figure 2 It is a flow chart of a virus analysis method provided by the present invention;
[0025] Figure 3 It is a flowchart of constructing a corresponding family model for each virus family provided by the present invention;
[0026] Figure 4 It is a schematic diagram of a directed graph of a virus family provided by the present invention;
[0027] Figure 5 is a schematic diagram of another virus family directed graph provided by the present invention;
[0028] Figure 6 The present invention provides a method for clustering each element in each target set to be merged, and merging them according to the clustering results to obtain a virus family model flow chart corresponding to the virus family directed graph;
[0029] Figure 7 is a flow chart of a method for determining whether elements are similar to each other provided by the present invention;
[0030] Figure 8 It is a topological schematic diagram of the virus family model provided by the present invention;
[0031] Fig. 9 is another example diagram of the topology of a virus family model provided by the present invention;
[0032] Fig.10 The present invention provides a schematic diagram of a virus family model;
[0033] Fig.11 is a schematic diagram of the second virus family model provided by the present invention;
[0034] Fig.12 is another schematic diagram of a second virus family model provided by the present invention;
[0035] Fig.13 It is a logical schematic diagram of the technical solution in the embodiment of the present invention provided by the present invention;
[0036] Fig.14 It is a block diagram of a virus analysis device provided by the present invention;
[0037] Fig.15 It is a schematic diagram of the hardware structure of a device provided by the present invention for implementing the method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0040] In order to make the purpose, technical solution and advantages disclosed in the embodiments of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the embodiments of the present invention and are not used to limit the embodiments of the present invention.
[0041] In order to timely discover new viruses and other virus versions related to the new viruses, automatic virus analysis and early warning are realized. The embodiment of the present invention firstly discloses an implementation scenario of a virus analysis method.
[0042] See also Figure 1 The implementation scenario includes: a client 01, a business server 03, a file server 05 and a virus analysis server 07. The business server 03 and the file server 05 are in communication connection. The business server 03 provides business services to the outside world by interacting with the file server 05. The file server 05 is used to store business-related files. A database system may be run in the file server 05.
[0043] The file server 05 is in communication with the virus analysis server 07, and in a feasible embodiment, the virus analysis server 07 may also be in communication with the business server 03. The virus analysis server 07 monitors the devices accessible to it (including the business server 03 and / or the file server 05), collects files or data related to virus analysis for virus analysis, and thus discovers new viruses or new variants of known viruses.
[0044] The client 01 can communicate with the virus analysis server 07 based on the browser / server mode (B / S) or the client / server mode (C / S). If the virus analysis server 07 finds a new virus or a new variant of a known virus, the discovery result or the processing result related to the new virus or the new variant of the known virus can be sent to the client 01. The client 01 can include: physical devices such as smart phones, tablet computers, laptops, digital assistants, smart wearable devices, and vehicle terminals, and can also include software running in the physical device, such as applications. For example, the client 01 can run security software.
[0045] The business server 03, the file server 05 and the virus analysis server 07 may each include an independently operated server, or a distributed server, or a server cluster consisting of multiple servers.
[0046] The embodiment of the present invention provides a virus analysis method, such as Figure 2 As shown, the method is performed by the virus analysis server in the implementation environment, and the method specifically includes:
[0047] S101. Obtain a virus family set, wherein the virus family set includes at least one virus family.
[0048] In the embodiment of the present invention, virus files in the same virus family have similar content, behavior or function. Family members (virus files) in the same virus family can be generated by the same virus file generator, developed by the same virus gang, or attack the same or the same type of target.
[0049] In a feasible embodiment, the virus family can be obtained based on the prior knowledge of the security analyst. The security analyst clusters the viruses to obtain the virus family based on his own professional experience and the analysis results of various existing viruses.
[0050] The viruses produced by the same virus crime gang often have different virus transmission channels, such as email, text messages, web pages, social communication software, etc. However, since the same virus crime gang often has the same or similar illegal criminal purposes, for example, targeting the usage habits of the same target users to guide them to the same phishing website, the gang members have the same transmission characteristics in different transmission channels when producing viruses. For example, viruses transmitted through email, text messages, web pages, social communication software, etc. can allow infected users to automatically link to a certain website, which is the characteristic of the virus crime gang in the transmission channels such as email, text messages, web pages, social communication software, etc. Therefore, virus files can be clustered from the perspective of transmission channels, and virus families can be obtained based on the clustering results.
[0051] In a feasible embodiment, clustering of virus files from the perspective of propagation paths includes: obtaining characteristics of the virus file on at least one propagation path to obtain a characteristic value of the virus file; obtaining a characteristic bit map of the virus file based on the characteristic value of the virus file, wherein the number of bits in the characteristic bit map of the virus file is the same as the total number of characteristic values of the multiple virus files to be clustered on the propagation path, and each bit in the characteristic bit map corresponds to a characteristic value on a propagation path, and the value of the bit is related to whether the virus file has a corresponding characteristic value; clustering the multiple virus files to be clustered based on the degree of matching between the characteristic bit maps of any two virus files among the multiple virus files.
[0052] S103. Construct a corresponding family model for each virus family to obtain a family model set corresponding to the virus family set.
[0053] In a feasible embodiment, the family model set can be managed through a model library, and for each virus family, a corresponding family model is generated in the model library.
[0054] In a feasible embodiment of the present invention, the corresponding family model is constructed for each virus family, such as Figure 3 As shown, including:
[0055] S1031. Obtain the logical relationship between each family member of the virus family, wherein the family members include virus files and associated domains.
[0056] In the embodiment of the present invention, the associated domain may be a domain associated with the virus file, each domain points to a unique logical address, which may correspond to a specific device one-to-one. The association between the associated domain and the virus file may be: the virus file accesses the associated domain, and the associated domain serves as a download source for the virus file.
[0057] Please refer to Table 1, which shows the basic information of each member of a certain virus family.
[0058] Table 1
[0059] category member document FileA document FileB document FileC document FileD document FileD1 document FileD2 document FileD3 document File E document FileF Domain Domain1 Domain Domain2 Domain Domain3
[0060] As shown in Table 1, the virus family includes 9 virus files and three associated domains. The 9 virus files are FileA, FileB, FileC, FileD, FileD1, FileD2, FileD3, FileE, and FileF; the three associated domains are Domain1, Domain2, and Domain3.
[0061] Please refer to Table 2, which shows the logical relationship between the family members of a virus family. The family member corresponding to the parent node is the source of the family member corresponding to the child node. CreateFile indicates that the virus file of the child node is constructed by the virus file of the parent node, downloadFromDomain indicates that the virus file corresponding to the child node is downloaded from the associated domain corresponding to the parent node, and VisitDomain indicates that the virus file corresponding to the parent node visits the associated domain corresponding to the child node.
[0062] Table 2
[0063] Parent Node relation Child Nodes FileA CreateFile FileB FileB CreateFile FileC FileC CreateFile FileD FileC VisitDomain Domain1 Domain1 downloadFromDomain FileD1 Domain1 downloadFromDomain FileD2 Domain1 downloadFromDomain FileD3 FileD1 VisitDomain Domain2 FileD2 VisitDomain Domain2 FileD3 VisitDomain Domain3 Domain2 downloadFromDomain File E Domain3 downloadFromDomain FileF
[0064] S1033. Construct a directed graph of the virus family based on the logical relationship between each family member.
[0065] Specifically, the result of expressing the logical relationship in Table 1 above using a virus family directed graph can be referred to Figure 4 .
[0066] S1035. Traverse the virus family directed graph to obtain at least one target set to be merged, wherein the elements in the target set to be merged all have the same topology.
[0067] Specifically, the elements in the target set to be merged may be nodes or node groups. The specific form of the elements in the target set to be merged may be set according to actual needs. The number of nodes in the elements may affect the accuracy and complexity of the virus family model.
[0068] like Figure 4 As shown, the nodes FileD1 and FileD2 in the virus family directed graph have the same topology, both of which have Domain1 as the parent node and Domain2 as the child node. Therefore, FileD1 and FileD2 are in a target set to be merged.
[0069] In other embodiments, the elements of the target set to be merged may also be node groups, and a node group includes two or more adjacent nodes.
[0070] Please refer to Table 3, which shows the logical relationship between the family members of a virus family. The family member corresponding to the parent node is the source of the family member corresponding to the child node. CreateFile indicates that the virus file of the child node is constructed by the virus file of the parent node, downloadFromDomain indicates that the virus file corresponding to the child node is downloaded from the associated domain corresponding to the parent node, and VisitDomain indicates that the virus file corresponding to the parent node visits the associated domain corresponding to the child node.
[0071] Table 3
[0072]
[0073] The result of expressing the logical relationship in Table 3 using a directed graph can be referred to Figure 5 .like Figure 5 As shown in the figure, the topology of FileD1 and Domain2 as a node group is the same as the topology of FileD2 and Domain3 as a node group, both of which have Domain1 as the parent node and FileE as the child node. Therefore, FileD1 and Domain2 as a node group and FileD2 and Domain3 as a node group can be in the same target set to be merged.
[0074] S1037. Cluster each element in each target set to be merged, and merge them according to the clustering results to obtain a virus family model corresponding to the virus family directed graph.
[0075] Different elements in the target set to be merged in the embodiment of the present invention have the same topology. Therefore, they are likely to belong to different variants of the same virus. A clustering result can be obtained by clustering the elements in the target set to be merged. The elements clustered into one category in the clustering result are different variants of the same virus, and the elements that cannot be clustered are independent viruses in the virus family and have no variant relationship with other viruses.
[0076] In a feasible embodiment of the present invention, each element in each target set to be merged is clustered, and merged according to the clustering results to obtain a virus family model corresponding to the virus family directed graph, such as Figure 6 As shown, including:
[0077] S10371. Determine whether the elements in the target sets to be merged are similar, and perform clustering based on the determination result to obtain a clustering result.
[0078] In a feasible embodiment, if the element includes only one node and the node is a virus file, the similarity between the elements can be determined by comparing the similarity of the text of the virus files and / or the similarity of the functions executed by the virus files.
[0079] In a feasible embodiment, if the element includes only one node and the node is an associated domain, the similarity between the elements can be determined by comparing the position similarity of the associated domains and / or the functional similarity of the devices pointed to by the associated domains.
[0080] In a feasible embodiment, if the element includes at least two nodes, the determination of whether the elements are similar can be performed by the following method, taking the determination of whether any two elements, the first element and the second element, are similar as an example, Figure 7 As shown, including:
[0081] S1. Construct a set of node pairs to be compared based on the first element and the second element, wherein each node pair to be compared in the set includes a node in the first element and a node in the second element, and the elements in each node pair to be compared have the same depth in the virus family directed graph.
[0082] by Figure 5 For example, FileD1 and FileD2 can be used as a node pair to be compared, and Domain2 and Domain3 can be used as a node pair to be compared.
[0083] S3. Obtain the similarity comparison result of the elements in each node pair to be compared in the set of node pairs to be compared.
[0084] Specifically, if the family member of the element in the node pair to be compared is a virus file, then the similarity comparison result of the elements in each node pair to be compared in the node pair set to be compared is obtained, which can be obtained by comparing the similarity of the text of the virus file and / or comparing the similarity of the functions performed by the virus file.
[0085] If the family member of the element in the node pair to be compared is an associated domain, then the similarity comparison result of the elements in each node pair to be compared in the node pair set to be compared is obtained by comparing the position similarity of the associated domain and / or the functional similarity of the device pointed to by the associated domain.
[0086] S5. If the similarity comparison results of the elements in each pair of nodes to be compared in the set of pairs of nodes to be compared are all true, it is determined that the first element and the second element are similar.
[0087] If the two elements in the node pair to be compared are similar, the similarity comparison result is true.
[0088] S10373. Merge the elements that are clustered into one category in the clustering results into comprehensive nodes to obtain the virus family model topology corresponding to the virus family directed graph.
[0089] by Figure 4 For example, if FileD1 and FileD2 are similar, they are clustered into one category. The topology of the virus family model obtained after merging them is as follows: Figure 8 shown.
[0090] by Figure 5 For example, if FileD1 and FileD2 are similar, and Domain2 and Domain3 are similar, then FileD1, FileD2, Domain2 and Domain3 are clustered into one category. The topology of the virus family model obtained after merging them is as follows: Fig. 9 shown.
[0091] S10375. Sort the family members included in each comprehensive node according to their generation order to obtain a virus family model.
[0092] Specifically, the generation order of the family members may be sorted by generation order representation data, and the generation order representation data may be any one of the earliest discovery time of the virus file and the file stamp of the virus file.
[0093] by Figure 5 Taking the virus family pointed to as an example, the generated data representation data of FileD1 and FileD2 are shown in Table 3.
[0094] Table 3
[0095]
[0096]
[0097] According to Table 3, the generation order of FileD1 should be before FileD2. Therefore, the virus family model corresponding to its virus family model topology is as follows: Fig.10 shown.
[0098] S105. Acquire newly added viruses, and acquire a target virus family based on the newly added viruses.
[0099] Specifically, for a newly added virus, associated information of the newly added virus may be extracted, such as a storage path, an acquisition source, an attack target, etc. of the newly added virus, and a virus family related to the associated information becomes a target virus family.
[0100] S107. Extracting a first virus family model corresponding to the target virus family from the family model set.
[0101] Specifically, the virus family model corresponding to the target virus family can be directly extracted from the family model set as the first virus family model.
[0102] S109. Obtain the logical relationship between the newly added virus and each family member in the target virus family, and add the newly added virus to the first virus family model according to the logical relationship to obtain a second virus family model.
[0103] The method for constructing the second virus family model can refer to steps S1031-S1035 of the embodiment.
[0104] Specifically, the acquiring the logical relationship between the newly added virus and each family member in the target virus family, and adding the newly added virus to the first virus family model according to the logical relationship to obtain the second virus family model includes:
[0105] First, the position of the new virus in the first virus family model is located according to the logical relationship between the new virus and each family member in the target virus family, and the topology of the new virus in the first virus family model is obtained.
[0106] Specifically, the topology may be an edge relationship, and the edge relationship includes one of a parent node and a child node, or a combination thereof.
[0107] Second, a target node is obtained, where the target node has the same topology as the newly added virus.
[0108] Third, if the number of target nodes is 0, the newly added virus is directly added to the first virus family model to obtain a second virus family model; if the number of target nodes is not 0, the target node and the newly added virus are clustered, and merged according to the clustering results to obtain the second virus family model pointed to by the first virus family model.
[0109] Specifically, the method of clustering the target node and the newly added virus may refer to step S10371. The method of merging according to the clustering result may refer to S10373-S10375.
[0110] S1011. Generate analysis results of the newly added virus according to the second virus family model.
[0111] Specifically, if in the second virus family model, the newly added virus is merged into a comprehensive node, the newly added virus is determined to be a variant, and the family member in the comprehensive node whose generation order is closest to the newly added virus is the corresponding version before the newly added virus mutates; if in the second virus family model, the newly added virus and a family member are merged into a new comprehensive node, the newly added virus is determined to be a variant, and the family member is the corresponding version before the newly added virus mutates; if in the second virus family model, the newly added virus is not included in the comprehensive node, the newly added virus is a new virus belonging to the target virus family.
[0112] Take the emergence of a new virus FileN as an example. If the first virus family model of the corresponding target virus family is Fig.10 As shown in , if the new virus FileN is added to the first virus family model, the second virus family model obtained is as follows Fig.11 As shown, FileN is a variant of FileD2; if the new virus FileN is added to the first virus family model, the second virus family model obtained is as follows Fig.12 As shown, FileN is a new virus member.
[0113] In a preferred embodiment, generating the analysis result of the newly added virus further includes:
[0114] S201. If the newly added virus is a variant, the difference between the newly added virus and the corresponding version before the virus variant is analyzed.
[0115] S203. Perform virus warning based on the difference.
[0116] Specifically, different levels of warnings may be provided according to the degree of difference of the differences and the urgency of the difference contents, and the warnings may be sent to a client that is in communication with the virus analysis server.
[0117] Please refer to Fig.13 , which shows a logical schematic diagram of the technical solution in an embodiment of the present invention, records the relationship between each member of the virus family by modeling the virus family, updates the model corresponding to the known virus family by analyzing the logical relationship between the newly discovered virus and the known virus family, and realizes automatic analysis of the newly discovered virus based on the updated model, which can not only find out whether the newly discovered virus is a new virus or a variant of a known virus, but also quickly locate the version corresponding to the newly discovered virus before the variant in the scenario where the newly discovered virus is a variant of a known virus.
[0118] The embodiment of the present invention discloses a virus analysis method, which generates a virus family model that can characterize the relationship network of the virus family by modeling the members of the virus family. When a new virus is found, the position of the new virus in the virus family model can be quickly located by analyzing the relationship between the new virus and each family member of the virus family, and then the type of the new virus and its related virus version can be automatically analyzed. Furthermore, according to the results of the automatic analysis, the new virus and its related viruses can be automatically analyzed to confirm their change scope, and different degrees of early warning can be provided based on the degree of change.
[0119] The embodiment of the present invention also provides a virus analysis device, such as Fig.14 As shown, the device comprises:
[0120] A virus family set acquisition module 301 is used to acquire a virus family set, wherein the virus family set includes at least one virus family;
[0121] A family model building module 303 is used to build a corresponding family model for each virus family to obtain a family model set corresponding to the virus family set;
[0122] A virus analysis parameter acquisition module 305 is used to acquire newly added viruses and acquire a target virus family according to the newly added viruses;
[0123] A first virus family model acquisition module 307 is used to extract a first virus family model corresponding to the target virus family from the family model set;
[0124] A model reconstruction module 309 is used to obtain a logical relationship between the newly added virus and each family member in the target virus family, and add the newly added virus to the first virus family model according to the logical relationship to obtain a second virus family model;
[0125] The analysis module 3011 is used to generate an analysis result of the newly added virus according to the second virus family model.
[0126] Specifically, the virus analysis device and method embodiments described in the embodiments of the present invention are based on the same inventive concept.
[0127] The embodiment of the present invention further provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor and executing a virus analysis method according to the embodiment of the present invention, and the method at least includes the following steps:
[0128] A virus analysis method, the method comprising:
[0129] Acquire a virus family set, wherein the virus family set includes at least one virus family;
[0130] Constructing a corresponding family model for each virus family to obtain a family model set corresponding to the virus family set;
[0131] Acquire new viruses, and acquire a target virus family according to the new viruses;
[0132] Extracting a first virus family model corresponding to the target virus family from the family model set;
[0133] Acquire a logical relationship between the newly added virus and each family member in the target virus family, and add the newly added virus to the first virus family model according to the logical relationship to obtain a second virus family model;
[0134] Generate analysis results of the newly added virus according to the second virus family model.
[0135] Preferably, constructing a corresponding family model for each virus family includes:
[0136] Acquire the logical relationship between each family member of the virus family, wherein the family members include virus files and associated domains;
[0137] Construct a directed graph of the virus family based on the logical relationships between each family member;
[0138] Traversing the virus family directed graph to obtain at least one target set to be merged, wherein all elements in the target set to be merged have the same topology;
[0139] Each element in each target set to be merged is clustered, and merged according to the clustering results to obtain a virus family model corresponding to the virus family directed graph.
[0140] Preferably, clustering each element in each target set to be merged, and merging according to the clustering results to obtain a virus family model corresponding to the virus family directed graph, includes:
[0141] Determine whether the elements in the target sets to be merged are similar, and perform clustering based on the judgment results to obtain clustering results;
[0142] The elements that are clustered into one category in the clustering results are merged into comprehensive nodes to obtain the virus family model topology corresponding to the virus family directed graph;
[0143] The family members included in each comprehensive node are sorted according to the order in which they are generated to obtain a virus family model.
[0144] Preferably, the determining whether the elements in the target sets to be merged are similar and clustering them according to the determination result to obtain a clustering result includes:
[0145] If the element includes only one node and the node is a virus file, then determining whether the elements are similar to each other, and obtaining the determination result by comparing the similarity of the texts of the virus files and / or comparing the similarity of the functions executed by the virus files;
[0146] If the element includes only one node and the node is an associated domain, then it is determined whether the elements are similar, and the determination result is obtained by comparing the position similarity of the associated domains and / or the functional similarity of the devices pointed to by the associated domains.
[0147] Preferably, including:
[0148] Constructing a set of node pairs to be compared according to the first element and the second element, wherein each node pair to be compared in the set of node pairs to be compared includes a node in the first element and a node in the second element, and the elements in each node pair to be compared have the same depth in the virus family directed graph;
[0149] Obtaining a similarity comparison result of the elements in each pair of nodes to be compared in the set of pairs of nodes to be compared;
[0150] If the similarity comparison results of the elements in each pair of nodes to be compared in the set of pairs of nodes to be compared are all true, then it is determined that the first element and the second element are similar.
[0151] Preferably, the step of obtaining the logical relationship between the newly added virus and each family member in the target virus family, and adding the newly added virus to the first virus family model according to the logical relationship to obtain a second virus family model includes:
[0152] Locating the position of the newly added virus in the first virus family model according to the logical relationship between the newly added virus and each family member in the target virus family, and obtaining the topology of the newly added virus in the first virus family model;
[0153] Acquire a target node, where the target node has the same topology as the newly added virus;
[0154] If the number of target nodes is 0, the newly added virus is directly added to the first virus family model to obtain a second virus family model; if the number of target nodes is not 0, the target node and the newly added virus are clustered and merged according to the clustering results to obtain the second virus family model pointed to by the first virus family model.
[0155] Preferably, it also includes:
[0156] If the newly added virus is a variant, analyzing the difference between the newly added virus and the corresponding version before the virus variant;
[0157] Virus warning is performed based on the differences.
[0158] Further, Fig.15 A schematic diagram of the hardware structure of a device for implementing the method provided by an embodiment of the present invention is shown, and the device may participate in constituting or include the apparatus or system provided by an embodiment of the present invention. Fig.15 As shown, the device 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Fig.15 The structure shown is for illustration only and does not limit the structure of the electronic device. Fig.15 More or fewer components as shown, or with Fig.15 Different configurations are shown.
[0159] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the device 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0160] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned virus analysis method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0161] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the device 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.
[0162] The display may be, for example, a touch screen liquid crystal display (LCD) that may enable a user to interact with a user interface of device 10 (or mobile device).
[0163] It should be noted that the sequence of the embodiments of the present invention described above is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0164] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and server embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0165] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0166] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A virus analysis method, It is characterized in that The method comprises: Acquire a virus family set, wherein the virus family set includes at least one virus family; Acquire the logical relationship between each family member of each virus family, wherein the family members include virus files and associated domains; construct a virus family directed graph according to the logical relationship between each family member; traverse the virus family directed graph to obtain at least one target set to be merged, wherein the elements in the target set to be merged all have the same topology; cluster the elements in each target set to be merged, and merge them according to the clustering results to obtain a virus family model corresponding to the virus family directed graph; According to the virus family model corresponding to each of the virus families, a family model set corresponding to the virus family set is obtained; Acquire new viruses, and acquire a target virus family according to the new viruses; Extracting a first virus family model corresponding to the target virus family from the family model set; Acquire a logical relationship between the newly added virus and each family member in the target virus family, and add the newly added virus to the first virus family model according to the logical relationship to obtain a second virus family model; Generate analysis results of the newly added virus according to the second virus family model.
2. The method according to claim 1, Features: The clustering of each element in each target set to be merged and merging according to the clustering results to obtain a virus family model corresponding to the virus family directed graph includes: Determine whether the elements in the target sets to be merged are similar, and perform clustering based on the judgment results to obtain clustering results; The elements that are clustered into one category in the clustering results are merged into comprehensive nodes to obtain the virus family model topology corresponding to the virus family directed graph; The family members included in each comprehensive node are sorted according to the order in which they are generated to obtain a virus family model.
3. The method according to claim 2, It is characterized in that The step of judging whether the elements in the target sets to be merged are similar and clustering them according to the judging result to obtain the clustering result includes: If the element includes only one node and the node is a virus file, then determining whether the elements are similar to each other, and obtaining the determination result by comparing the similarity of the texts of the virus files and / or comparing the similarity of the functions executed by the virus files; If the element includes only one node and the node is an associated domain, then it is determined whether the elements are similar, and the determination result is obtained by comparing the position similarity of the associated domains and / or the functional similarity of the devices pointed to by the associated domains.
4. The method according to claim 2, It is characterized in that The step of judging whether the elements in the target sets to be merged are similar and clustering them according to the judging result to obtain the clustering result includes: Constructing a set of node pairs to be compared according to the first element and the second element, wherein each node pair to be compared in the set of node pairs to be compared includes a node in the first element and a node in the second element, and the elements in each node pair to be compared have the same depth in the directed graph of the virus family; Obtaining a similarity comparison result of the elements in each pair of nodes to be compared in the set of pairs of nodes to be compared; If the similarity comparison results of the elements in each pair of nodes to be compared in the set of pairs of nodes to be compared are all true, then it is determined that the first element and the second element are similar.
5. The method according to claim 1, It is characterized in that The obtaining of the logical relationship between the newly added virus and each family member in the target virus family, and adding the newly added virus to the first virus family model according to the logical relationship to obtain a second virus family model, includes: Locating the position of the newly added virus in the first virus family model according to the logical relationship between the newly added virus and each family member in the target virus family, and obtaining the topology of the newly added virus in the first virus family model; Acquire a target node, where the target node has the same topology as the newly added virus; If the number of target nodes is 0, the newly added virus is directly added to the first virus family model to obtain a second virus family model; if the number of target nodes is not 0, the target node and the newly added virus are clustered and merged according to the clustering results to obtain the second virus family model pointed to by the first virus family model.
6. The method according to claim 1, It is characterized in that Also includes: If the newly added virus is a variant, analyzing the difference between the newly added virus and the corresponding version before the virus variant; Virus warning is performed based on the differences.
7. A virus analysis device, It is characterized in that The device comprises: A virus family set acquisition module, used to acquire a virus family set, wherein the virus family set includes at least one virus family; A family model construction module is used to obtain the logical relationship between each family member of each virus family, wherein the family members include virus files and associated domains; construct a virus family directed graph according to the logical relationship between each family member; traverse the virus family directed graph to obtain at least one target set to be merged, wherein the elements in the target set to be merged all have the same topology; cluster each element in each target set to be merged, and merge them according to the clustering results to obtain a virus family model corresponding to the virus family directed graph; obtain a family model set corresponding to the virus family set according to the virus family model corresponding to each virus family; A virus analysis parameter acquisition module, used to acquire newly added viruses and acquire a target virus family based on the newly added viruses; A first virus family model acquisition module, used to extract a first virus family model corresponding to the target virus family from the family model set; A model reconstruction module, used to obtain a logical relationship between the newly added virus and each family member in the target virus family, and add the newly added virus to the first virus family model according to the logical relationship to obtain a second virus family model; An analysis module is used to generate an analysis result of the newly added virus according to the second virus family model.
8. A device, It is characterized in that The device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, and a code set, which are loaded and executed by the processor to implement a virus analysis method as described in any one of claims 1-6.
9. A computer storage medium, It is characterized in that The storage medium stores at least one instruction, at least one program, or a code set, which is loaded and executed by a processor as a virus analysis method according to any one of claims 1 to 6.
