Batch scanning method, device, equipment and medium combined with external samples
By traversing the call information in the static vector feature, the call samples outside the scan list are obtained, and combined with the preset strategy and the number of call layers threshold, the problem of missed reports in traditional batch scanning methods is solved, and the accuracy of malicious sample detection and batch scanning are improved. efficiency.
Patent Information
- Application Number
- CN202410890054.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-07-04
AI Technical Summary
Traditional batch scanning methods only detect the sample itself, which is prone to missed reports, especially when the called sample is outside the scan list, malicious samples cannot be effectively detected.
By traversing the call information in the static vector feature, obtain the call samples located outside the scan list, and determine the final detection results based on the scan results of the call samples, including obtaining the download link, file path or registry information of the call samples, using the preset Determine the strategy and call the layer threshold to comprehensively determine the final detection result of the sample.
Improve the detection ability of white plus black events in white samples calling black samples, improve the accuracy of batch scans, reduce the rate of missed reports, and obtain dynamic behavior through static scans without running samples, improving the accuracy of black judgment Rate.
Smart Images

Figure CN118427824B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of anti-malicious code technology, and in particular to a batch scanning method, device, equipment and medium combined with external samples. Background Art
[0002] In the process of scanning each sample in the scan list in sequence, the traditional batch scanning method only detects each sample itself and gives a judgment result, without considering whether the sample will call a black sample. Especially when the called sample is outside the scan list, this method of detecting the sample itself alone is prone to missed reports.
[0003] Therefore, a batch scanning method combined with external samples is urgently needed. Summary of the invention
[0004] In order to solve the problem that the traditional batch scanning method only detects the sample itself and is prone to underreporting, the embodiments of the present invention provide a batch scanning method, device, equipment and medium combined with external samples.
[0005] On the one hand, an embodiment of the present invention provides a batch scanning method combined with an external sample, comprising:
[0006] For each sample in the scan list, execute:
[0007] Scan to obtain the static vector features and initial scanning results of the current sample;
[0008] When the initial scanning result is a white sample, traverse the call information in the static vector feature to obtain a call sample; wherein the call sample is a sample outside the scanning list;
[0009] Based on the acquisition result of the calling sample and the scanning result of the calling sample, a final detection result of the current sample is determined.
[0010] In a possible design, the calling information includes at least a download link, a file path or registry information of the calling sample.
[0011] In a possible design, determining a final detection result of the current sample based on the acquisition result of the calling sample and the scanning result of the calling sample includes:
[0012] If the calling sample is not obtained, the final detection result of the current sample is determined as a white sample;
[0013] If at least one of the call samples is obtained and the scanning result of at least one of the call samples is a black sample, the final detection result of the current sample is determined to be that the current sample call behavior is malicious, and information of the malicious call sample is fed back;
[0014] If at least one of the called samples is acquired and the scanning results of all the called samples are white samples, the final detection result of the current sample is determined based on a preset determination strategy.
[0015] In a possible design, determining the final detection result of the current sample based on a preset determination strategy includes:
[0016] Record the call layer as 0, and obtain a call layer threshold; wherein the call layer is used to indicate the layer number of the current sample as which call the current call is recorded, and the call layer threshold is greater than or equal to 1;
[0017] Update the number of call layers;
[0018] Determine whether the number of call layers is less than the call layer threshold;
[0019] If it is not less than, determining that the final detection result of the current sample is a white sample;
[0020] If it is less than, traverse the call information in the static vector features of all the call samples, obtain new call samples, and scan to determine the black judgment result of each new call sample;
[0021] If no new calling sample is obtained, the final detection result of the current sample is determined as a white sample;
[0022] If at least one new call sample is obtained and at least one new call sample is a black sample, directly determine that the final detection result of the current sample is that the call behavior of the current sample is malicious, and feedback the information of the malicious call sample;
[0023] If at least one new calling sample is obtained and the scanning results of all new calling samples are white samples, the process jumps to execute the updating of the calling layer number.
[0024] In one possible design, the calling sample also includes samples in the scan list;
[0025] The update call layer number includes:
[0026] Determine whether all currently called samples are samples in the scan list;
[0027] If all the called samples are samples in the scan list, the number of calling layers remains unchanged;
[0028] If at least one called sample is a sample outside the scan list, the number of called layers is increased by 1.
[0029] In a possible design, the current sample and / or the calling sample are scanned in the following manner:
[0030] Acquire a pre-established static-dynamic correspondence table; wherein the static-dynamic correspondence table contains a plurality of output rules, and the output rule is a correspondence relationship between at least one static vector feature and a dynamic behavior;
[0031] Scan and obtain the static vector features of the sample, and use a plurality of static vector features of the sample to combine and match the output rules in the static-dynamic correspondence table to obtain the dynamic behavior of the sample;
[0032] A scanning result is determined based on the static vector feature and the dynamic behavior of the sample.
[0033] In another aspect, a static scanning device capable of acquiring dynamic behavior is provided, comprising:
[0034] The scanning unit is used to perform, for each sample in the scanning list: scanning to obtain the static vector features and initial scanning results of the current sample;
[0035] A calling unit, configured to traverse the calling information in the static vector feature to obtain a calling sample when the initial scanning result is a white sample; wherein the calling sample is a sample outside the scanning list;
[0036] The determination unit is used to determine the final detection result of the current sample based on the acquisition result of the calling sample and the scanning result of the calling sample.
[0037] On the other hand, a computing device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of the present specification is implemented.
[0038] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method described in any embodiment of the present specification.
[0039] On the other hand, a computer program product is provided, comprising a computer program, wherein the computer program implements the steps of the above method when executed by a processor.
[0040] The embodiment of the present invention provides a batch scanning method, device, equipment and medium combined with external samples, which can detect malicious samples outside the scan list by traversing the call information in the static vector feature and obtaining the call sample to determine the final detection result, and comprehensively judge each sample in the scan list based on the call sample outside the scan list. Therefore, this solution can improve the detection capability of white plus black events where white samples call black samples, and improve the accuracy of batch scanning. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] 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, the drawings described below are 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.
[0042] Figure 1 is a flow chart of a batch scanning method combined with external samples provided by an embodiment of the present invention;
[0043] Figure 2 is a hardware architecture diagram of an electronic device provided by an embodiment of the present invention;
[0044] Figure 3 It is a structural diagram of a batch scanning device combined with external samples provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in 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.
[0046] The specific implementation of the above concept is described below.
[0047] Please refer to Figure 1 , an embodiment of the present invention provides a batch scanning method combined with external samples, the method comprising:
[0048] Step 100: For each sample in the scan list, execute:
[0049] Scan to obtain the static vector features and initial scanning results of the current sample;
[0050] Step 102: When the initial scanning result is a white sample, traverse the call information in the static vector feature to obtain a call sample; wherein the call sample is a sample outside the scan list;
[0051] Step 104: Determine the final detection result of the current sample based on the acquisition result of the called sample and the scanning result of the called sample.
[0052] In the embodiment of the present invention, by traversing the call information in the static vector feature and obtaining the call sample to determine the final detection result, malicious samples outside the scan list can be detected, and each sample in the scan list can be comprehensively judged based on the call sample outside the scan list. Therefore, this solution can improve the detection capability of white plus black events where white samples call black samples and improve the accuracy of batch scanning.
[0053] Described below Figure 1 How the various steps are performed.
[0054] For step 100 and step 102:
[0055] In some implementations, the call information includes at least a download link, a file path, or registry information of the call sample.
[0056] By obtaining the calling samples based on the calling information in the static vector features of the white samples in the scan list, it is possible to obtain only the calling samples outside the scan list. Since the samples in the scan list will be scanned in sequence, if the calling path is the same as a sample path in the scan list, the sample will not be called to avoid repeated scanning.
[0057] Regarding step 104:
[0058] In some implementations, step 104 may include:
[0059] If the calling sample is not obtained, the final detection result of the current sample is determined as a white sample;
[0060] If at least one call sample is obtained and the scanning result of at least one call sample is a black sample, the final detection result of the current sample is determined to be malicious in the call behavior of the current sample, and information of the malicious call sample is fed back;
[0061] If at least one calling sample is obtained and the scanning results of all calling samples are white samples, the final detection result of the current sample is determined based on a preset determination strategy.
[0062] In this embodiment, when no calling sample is obtained based on the calling information of sample A located in the scan list, it means that sample A does not call a black sample, and the final detection result of sample A can be determined to be a white sample; when at least one calling sample is obtained and the scanning result of at least one calling sample is a black sample, it can be determined that the final detection result of sample A is that the calling behavior of sample A is malicious, and the information of the malicious calling sample is fed back; and when at least one calling sample is obtained and the scanning results of all calling samples are white samples, but the calling sample still has the possibility of calling a black sample, the judgment strategy can be preset according to the time margin and the accuracy of black judgment. When the time margin is small, sample A can be directly determined to be a white sample. When the time margin is large, the calling information in the static vector feature of the calling sample can be used to call the lower layer. Therefore, this embodiment can not only improve the detection capability of white plus black events where white samples call black samples and improve the accuracy of batch scanning, but also further improve the accuracy of batch scanning according to the time margin.
[0063] In some embodiments, the step of “determining the final test result of the current sample based on a preset determination strategy” may include:
[0064] The call layer number is recorded as 0, and the call layer number threshold is obtained; wherein the call layer number is used to indicate the layer number of the current sample that the current call is recorded as, and the call layer number threshold is greater than or equal to 1;
[0065] Update the number of call layers;
[0066] Determine whether the number of call layers is less than the call layer threshold;
[0067] If it is not less than, the final test result of the current sample is determined to be a white sample;
[0068] If it is less than, then traverse the call information in the static vector features of all call samples, obtain new call samples, and scan to determine the black judgment result of each new call sample;
[0069] If no new call sample is obtained, the final detection result of the current sample is determined as a white sample;
[0070] If at least one new call sample is obtained and at least one new call sample is a black sample, the final detection result of the current sample is directly determined to be malicious, and information about the malicious call sample is fed back;
[0071] If at least one new call sample is obtained and the scanning results of all new call samples are white samples, the execution is jumped to update the call layer number.
[0072] For example, the call layer threshold is set to 1, and the initial call layer is recorded as 0. In step 104, based on the result of the first acquisition of the call sample of sample A in the scan list, at least one call sample is acquired and the scanning results of all call samples are white samples, the call layer is first determined to be increased by 1 and become 1; then, since the call layer is the same as the call layer threshold, the final detection result of sample A is directly determined to be a white sample. It can be seen that since the call layer threshold is 1, only one layer is called from sample A to determine the final detection result.
[0073] Taking another example, the call layer threshold is set to 2, and the initial call layer is recorded as 0. In step 104, based on the result of obtaining the call sample for the first time based on sample A in the scan list, at least one call sample is obtained and the scanning results of all call samples are white samples, the call layer is first determined to be increased by 1 and become 1; then, since the call layer is less than the call layer threshold, the next layer of call samples can be obtained based on the static vector features of all call samples obtained for the first time, and the final detection result of sample A can be determined based on the acquisition results and scanning results of the second layer of call samples, until a malicious call sample is detected or the call layer threshold is reached. If a malicious call sample has not been detected when the call layer threshold is reached, the final detection result is determined to be a white sample.
[0074] Therefore, by setting a call layer number threshold, this embodiment can detect multiple layers of call samples without detecting malicious call samples until malicious call samples are detected or the call layer number threshold is reached, thereby improving the batch scanning accuracy as much as possible according to the time margin.
[0075] In some implementations, calling the sample further comprises scanning the samples in the list;
[0076] Update the call layers, including:
[0077] Determine whether all currently called samples are samples in the scan list;
[0078] If all the called samples are samples in the scan list, the number of call layers remains unchanged;
[0079] If at least one of the called samples is a sample outside the scan list, the number of call levels increases by 1.
[0080] In this embodiment, when only samples outside the scan list are obtained, each sample in the scan list needs to be detected in turn, and the samples in the front order in the scan list are likely to call the samples in the back order in the scan list. Since a calling layer threshold is set for the white-to-white situation, multi-layer calls can be made, which greatly reduces the omission of black samples. The calling samples in the scan list can be obtained during the calling process of the samples in the front order, so as to judge multiple samples in the scan list at the same time, saving the time wasted in sequential scanning.
[0081] However, if the call layer threshold is set to 1 or 2, if all call samples are samples in the scan list, it is easy to cause the call samples in the scan list to have too shallow call layers. Therefore, when all call samples are samples in the scan list, the call layer number remains unchanged and does not occupy the threshold quota. This can reduce time waste while ensuring the accuracy of batch scanning.
[0082] In some implementations, the current sample and / or each layer of the called sample are scanned in the following manner:
[0083] Obtaining a pre-established static-dynamic correspondence table; wherein the static-dynamic correspondence table contains a plurality of output rules, and the output rule is a correspondence relationship between at least one static vector feature and a dynamic behavior;
[0084] Scan and obtain the static vector features of the sample, and use several static vector features of the sample to combine and match the output rules in the dynamic and static correspondence table to obtain the dynamic behavior of the sample;
[0085] The scanning result is determined based on the static vector features and dynamic behavior of the sample.
[0086] Since batch scanning mainly uses static scanning, anti-virus scanning of samples is performed based on static feature rules. Without running the samples, dynamic behaviors cannot be obtained. Running samples in a sandbox in real time takes a long time. Therefore, this method of running samples at the moment and detecting based on dynamic behaviors belongs to dynamic scanning, and does not fall into the category of static scanning.
[0087] In this embodiment, the dynamic behavior of the sample can be determined without running the sample, only by matching the static vector features obtained by static scanning with the pre-acquired static-dynamic correspondence table. Compared with the defect that the traditional batch scanning method can only use static vector features to judge black, this solution can determine more accurate scanning results based on static vector features and dynamic behavior, so as to further improve the accuracy of black judgment in batch scanning.
[0088] Next, the process of establishing the dynamic-static correspondence table is described in detail.
[0089] In some implementations, the dynamic-static correspondence table is established in the following manner:
[0090] Run each training sample in the training set and monitor the binary code position corresponding to the dynamic behavior of each training sample to establish a dynamic behavior code position table;
[0091] Scan each training sample to obtain the static vector features of each training sample and the binary code position corresponding to each static vector feature, and establish a static vector feature code position table;
[0092] Traversing the dynamic behavior code position table, if the binary code position of the dynamic behavior is located in the binary code position of the static vector feature of the corresponding training sample in the static vector feature code position table, it is indicated that the static vector feature contains the binary code required for the dynamic behavior, so as to establish a corresponding relationship between the static vector feature and the dynamic behavior;
[0093] Based on the threshold setting strategy, the output rules are determined from all the corresponding relations in the training set, and a dynamic and static correspondence table is established.
[0094] In this embodiment, since the binary code corresponding to the static vector feature contains the necessary binary code required for the execution of dynamic behavior, data mining can be performed in the background using a sandbox, an isolated physical machine, or a virtual machine, and the dynamic behavior of the training sample and the binary code position of the static vector feature can be used to establish a correspondence between the static vector feature and the dynamic behavior.
[0095] For example, training sample A is run in the background, the dynamic behavior (D1, D2, D3...Dn) of the training sample A is obtained, and the binary code segment position (T1, T2, T3...Tn) executed by the dynamic behavior corresponding to the training sample A is recorded; where T1 is the binary code segment position corresponding to the dynamic behavior of D1.
[0096] Perform static scanning on the training sample to obtain the static vector features (J1, J2, J3...Jn) of the sample; obtain the binary code segment position (t1, t2, t3...tn) corresponding to the static vector features; wherein t1 is the binary code segment position corresponding to the J1 static vector feature.
[0097] Traverse the binary code segment positions (T1, T2, T3...Tn) corresponding to the dynamic behavior of the sample, and determine whether T1-Tn is located in any binary code segment position (t1, t2, t3...tn). If so, establish a correspondence between the dynamic behavior and the matching static vector feature.
[0098] For example, T1 is compared with t1, t2, t3...tn in sequence. If T1 is not located in any position among t1, t2, t3...tn, then the dynamic behavior D1 corresponding to T1 does not have a matching static vector feature. If T1 is located in t3, then the dynamic behavior D1 corresponding to T1 establishes a corresponding relationship with the static vector J3 corresponding to t3.
[0099] However, determining all established correspondences as output rules is likely to result in a high false alarm rate. Therefore, it is necessary to set a threshold strategy for the correspondences and only determine the correspondences that meet the threshold strategy as output rules to reduce the false alarm rate of batch scanning.
[0100] In some implementations, the threshold includes an occurrence count threshold and an occurrence probability threshold of the corresponding relationship in the training set.
[0101] It is understandable that when the sample size or sample collection method of the training set changes, the number of occurrences of the same correspondence is likely to vary greatly. If only the occurrence threshold is set, the output rules generated by the dynamic and static correspondence table will be more random, which is not conducive to subsequent scanning.
[0102] Therefore, in this embodiment, an occurrence probability threshold is also set. Only when the two thresholds are satisfied at the same time can it be used as an output rule, thereby reducing the randomness of the output rule and improving the accuracy of black judgment in batch scanning.
[0103] In some embodiments, the step of "determining output rules from all correspondences in the training set based on a set threshold strategy and establishing a dynamic-static correspondence table" includes:
[0104] Perform statistical analysis on the correspondence between static vector features and dynamic behaviors in the training set to determine the number of occurrences and probability of each correspondence;
[0105] The corresponding relationship in which the number of occurrences and the probability of occurrence are respectively greater than or equal to the number of occurrences threshold and the probability of occurrence threshold is determined as the output rule to obtain a dynamic and static correspondence table.
[0106] In this embodiment, by counting the number of occurrences and the probability of occurrence of each corresponding relationship established by the training samples of the training set, the output rules are determined based on the number of occurrence thresholds and the probability of occurrence thresholds, which can reduce the randomness of the output rules and obtain a more accurate and effective dynamic and static correspondence table.
[0107] The embodiment of the present invention provides two methods for calculating the occurrence probability, and the two methods are described below respectively.
[0108] Method 1:
[0109] In method 1, the probability of occurrence of the corresponding relationship is calculated by the following formula:
[0110]
[0111] In the formula, is the occurrence probability of the corresponding relationship, is the number of occurrences of the corresponding relationship between the current static vector feature and the current dynamic behavior in the training set, is the total number of occurrences of all corresponding relations in the training set.
[0112] In the first method, the reliability of the corresponding relationship is determined by calculating the occurrence probability of the current corresponding relationship in the training set, which can effectively reduce the randomness of the output rules and obtain a more accurate and effective dynamic and static corresponding table.
[0113] Method 2:
[0114] In the second method, the occurrence probability of the corresponding relationship is calculated by the following formula:
[0115]
[0116] In the formula, is the occurrence probability of the corresponding relationship, is the number of occurrences of the corresponding relationship between the current static vector feature and the current dynamic behavior in the training set, is the total number of occurrences of corresponding relations containing the current static vector feature in the training set.
[0117] In this second method, since the same static vector feature may correspond to multiple dynamic behaviors, by calculating the probability of the current static vector feature corresponding to the current dynamic behavior in the training set, compared with method one, the reliability of the output rules can be further improved, and the accuracy of black judgment in batch scanning can be further improved.
[0118] In some embodiments, the threshold is dynamically adjusted as follows:
[0119] For each adjustment, perform:
[0120] Acquire a first sample set collected in a first time period and a second sample set collected in a second time period; the second time period is later than the first time period;
[0121] Run each sample in the first sample set, and perform static scanning on each sample in the first sample set to respectively establish a dynamic behavior code position table and a static vector feature code position table corresponding to the first sample set;
[0122] Traversing the dynamic behavior code position table corresponding to the first sample set, to establish a correspondence between the static vector feature corresponding to the first sample set and the dynamic behavior based on whether the binary code position of the dynamic behavior in the first sample set is located within the binary code position corresponding to the static vector feature in the static vector feature code position table;
[0123] Based on the current threshold, determine the output rule from all the corresponding relationships of the first sample set, and establish a target dynamic and static correspondence table;
[0124] Performing static scanning on each sample in the second sample set respectively, so as to utilize a plurality of static vector features of the sample, combine and match the output rules in the target static-dynamic correspondence table, and determine the dynamic behavior of the sample;
[0125] When the false alarm rate of the dynamic behavior in the second sample set is greater than the expected false alarm rate, the current threshold is increased;
[0126] When the false alarm rate of the dynamic behavior in the second sample set is less than the expected false alarm rate, the current threshold is reduced.
[0127] In this embodiment, with the continuous development of anti-virus engines, viruses will become more complex and diverse. A fixed threshold will cause the dynamic and static correspondence table to be unusable for a long time, so the threshold needs to be dynamically adjusted.
[0128] Specifically, by running each sample of the most recently collected first sample set in a sandbox, an isolated physical machine or a virtual machine, the current threshold is reused to generate a new target static-dynamic correspondence table; then, each sample in the second sample set is statically scanned using the target static-dynamic correspondence table, so as to detect the dynamic behavior of each sample in the second sample set using the target static-dynamic correspondence table; then, the validity of the current threshold is verified based on the false alarm rate of the dynamic behavior in the second sample set, and the current threshold is adjusted using the expected false alarm rate; when the false alarm rate of the dynamic behavior in the second sample set is greater than the expected false alarm rate, it means that the accuracy of the target static-dynamic correspondence table generated using the current threshold does not meet the expected standard, and the current threshold needs to be increased. By verifying and adjusting the threshold in the above manner, the static-dynamic correspondence table can be continuously updated as the virus develops, thereby ensuring the accuracy of black judgment in batch scanning.
[0129] like Figure 2 , Figure 3 As shown, an embodiment of the present invention provides a batch scanning device combined with an external sample. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, Figure 2 As shown, it is a hardware architecture diagram of a computing device where a batch scanning device combined with an external sample is provided in an embodiment of the present invention. Figure 2In addition to the processor, memory, network interface, and non-volatile memory shown in the figure, the computing device in which the device is located in the embodiment may also generally include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, Figure 3 As shown, as a device in a logical sense, the CPU of the computing device in which it is located reads the corresponding computer program in the non-volatile memory into the internal memory and runs it.
[0130] like Figure 3 As shown, this embodiment provides a batch scanning device combined with an external sample, including:
[0131] The scanning unit 301 is used to perform, for each sample in the scanning list: scanning to obtain the static vector features and initial scanning results of the current sample;
[0132] A calling unit 302, configured to traverse the calling information in the static vector feature to obtain a calling sample when the initial scanning result is a white sample; wherein the calling sample is a sample outside the scanning list;
[0133] The determination unit 303 is used to determine the final detection result of the current sample based on the acquisition result of the calling sample and the scanning result of the calling sample.
[0134] In one embodiment of the present invention, the calling information in the calling unit 302 at least includes a download link, a file path or a registry information of the calling sample.
[0135] In one embodiment of the present invention, the determining unit 303 is configured to execute:
[0136] If the calling sample is not obtained, the final detection result of the current sample is determined as a white sample;
[0137] If at least one call sample is obtained and the scanning result of at least one call sample is a black sample, the final detection result of the current sample is determined to be malicious in the call behavior of the current sample, and information of the malicious call sample is fed back;
[0138] If at least one calling sample is obtained and the scanning results of all calling samples are white samples, the final detection result of the current sample is determined based on a preset determination strategy.
[0139] In one embodiment of the present invention, when the determination unit 303 determines the final detection result of the current sample based on the preset determination strategy, it is used to:
[0140] The call layer number is recorded as 0, and the call layer number threshold is obtained; wherein the call layer number is used to indicate the layer number of the current sample that the current call is recorded as, and the call layer number threshold is greater than or equal to 1;
[0141] Update the number of call layers;
[0142] Determine whether the number of call layers is less than the call layer threshold;
[0143] If it is not less than, the final test result of the current sample is determined to be a white sample;
[0144] If it is less than, then traverse the call information in the static vector features of all call samples, obtain new call samples, and scan to determine the black judgment result of each new call sample;
[0145] If no new call sample is obtained, the final detection result of the current sample is determined as a white sample;
[0146] If at least one new call sample is obtained and at least one new call sample is a black sample, the final detection result of the current sample is directly determined to be malicious, and information about the malicious call sample is fed back;
[0147] If at least one new call sample is obtained and the scanning results of all new call samples are white samples, the execution is jumped to update the call layer number.
[0148] In one embodiment of the present invention, the calling sample in the calling unit 302 also includes samples in the scan list; when the determining unit 303 executes the updating of the calling layer number, it is used to:
[0149] Determine whether all currently called samples are samples in the scan list;
[0150] If all the called samples are samples in the scan list, the number of call layers remains unchanged;
[0151] If at least one of the called samples is a sample outside the scan list, the number of call levels increases by 1.
[0152] In one embodiment of the present invention, the scanning unit 301 and / or the determining unit 303 scans the current sample and / or the called sample in the following manner:
[0153] Obtaining a pre-established static-dynamic correspondence table; wherein the static-dynamic correspondence table contains a plurality of output rules, and the output rule is a correspondence relationship between at least one static vector feature and a dynamic behavior;
[0154] Scan and obtain the static vector features of the sample, and use several static vector features of the sample to combine and match the output rules in the dynamic and static correspondence table to obtain the dynamic behavior of the sample;
[0155] The scanning result is determined based on the static vector features and dynamic behavior of the sample.
[0156] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on a batch scanning device combined with an external sample. In other embodiments of the present invention, a batch scanning device combined with an external sample may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0157] The information interaction, execution process and other contents between the units in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.
[0158] An embodiment of the present application further provides a computing device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a batch scanning method combined with external samples in any embodiment of the present invention is implemented.
[0159] An embodiment of the present application also provides a computer-readable storage medium, on which is stored 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 and executed by a processor to implement the batch scanning method combined with external samples provided in the above-mentioned method embodiments.
[0160] An embodiment of the present application also provides a computer program product, which includes a computer program. A processor of a computer device reads the computer program from a computer-readable storage medium, and the processor executes the computer program, so that the computer device executes any of the batch scanning methods combined with external samples described in the above embodiments.
[0161] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0162] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0163] Finally, it should be noted that, in this article, relational terms such as first, second, third and fourth 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 statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0164] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A batch scanning method combined with external samples, characterized in that: include: For each sample in the scan list, execute: Scan to obtain the static vector features and initial scanning results of the current sample; When the initial scanning result is a white sample, traverse the call information in the static vector feature to obtain a call sample; wherein the call sample is a sample outside the scanning list; Determining a final detection result of the current sample based on the acquisition result of the calling sample and the scanning result of the calling sample; The determining, based on the acquisition result of the calling sample and the scanning result of the calling sample, a final detection result of the current sample includes: If the calling sample is not obtained, the final detection result of the current sample is determined as a white sample; If at least one of the call samples is obtained and the scanning result of at least one of the call samples is a black sample, the final detection result of the current sample is determined to be that the current sample call behavior is malicious, and information of the malicious call sample is fed back; If at least one of the calling samples is obtained and the scanning results of all the calling samples are white samples, then based on a preset determination strategy, a final detection result of the current sample is determined; The method of determining the final detection result of the current sample based on the preset determination strategy includes: Record the call layer as 0, and obtain a call layer threshold; wherein the call layer is used to indicate the layer number of the current sample as which call the current call is recorded, and the call layer threshold is greater than or equal to 1; Update the number of call layers; Determine whether the number of call layers is less than the call layer threshold; If it is not less than, determining that the final detection result of the current sample is a white sample; If it is less than, traverse the call information in the static vector features of all the call samples, obtain new call samples, and scan to determine the black judgment result of each new call sample; If no new calling sample is obtained, the final detection result of the current sample is determined as a white sample; If at least one new call sample is obtained and at least one new call sample is a black sample, directly determine that the final detection result of the current sample is that the call behavior of the current sample is malicious, and feedback the information of the malicious call sample; If at least one new calling sample is obtained and the scanning results of all new calling samples are white samples, the process jumps to execute the updating of the calling layer number.
2. The method according to claim 1, characterized in that The calling information at least includes a download link, a file path or a registry information of the calling sample.
3. The method according to claim 1, characterized in that The calling samples also include samples in the scan list; The update call layer number includes: Determine whether all currently called samples are samples in the scan list; If all the called samples are samples in the scan list, the number of calling layers remains unchanged; If at least one called sample is a sample outside the scan list, the number of called layers is increased by 1.
4. The method according to any one of claims 1 to 3, characterized in that The current sample and / or the calling sample are scanned in the following manner: Acquire a pre-established static-dynamic correspondence table; wherein the static-dynamic correspondence table contains a plurality of output rules, and the output rule is a correspondence relationship between at least one static vector feature and a dynamic behavior; Scan and obtain the static vector features of the sample, and use a plurality of static vector features of the sample to combine and match the output rules in the static-dynamic correspondence table to obtain the dynamic behavior of the sample; A scanning result is determined based on the static vector feature and the dynamic behavior of the sample.
5. A batch scanning device combined with an external sample, used to implement the method according to any one of claims 1 to 4, characterized in that: include: The scanning unit is used to perform, for each sample in the scanning list: scanning to obtain the static vector feature and the initial scanning result of the current sample; A calling unit, configured to traverse the calling information in the static vector feature to obtain a calling sample when the initial scanning result is a white sample; wherein the calling sample is a sample outside the scanning list; The determination unit is used to determine the final detection result of the current sample based on the acquisition result of the calling sample and the scanning result of the calling sample.
6. A computing device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 4.
8. A computer program product, characterized in that The method comprises a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
