Safety assessment method, device and model training method, device

By performing multiple processes on the installation package feature information and inputting it into the machine learning model, vulnerability identifications are directly obtained for security assessment, which solves the problems of low efficiency and poor accuracy in the existing technology and achieves efficient and accurate security assessment of the installation package.

CN115134153BActive Publication Date: 2024-09-06CHINA TELECOM CORP LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202210759948.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2024-09-06
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

The existing technology is inefficient in rapidly iterating installation package versions and cannot detect uncollected vulnerabilities, resulting in inaccurate security assessment results.

Method used

By obtaining multiple characteristic information of the installation package, perform different processing methods to generate input data, and input it into the trained machine learning model to obtain vulnerability identification, conduct security assessment, and avoid using the vulnerability's Proof of Concept (PoC) to attempt attacks. verify.

Benefits of technology

It improves the efficiency and accuracy of security assessment of installation packages, enables efficient and accurate security assessment of firmware installation packages without physical equipment, and reduces assessment costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115134153B
    Figure CN115134153B
Patent Text Reader

Abstract

The present disclosure provides a security assessment method, device and model training method, device, and relates to the field of security assessment technology. The security assessment method includes: obtaining multiple feature information of a first installation package; performing N different processing on each feature information to obtain corresponding N input data, N≥2; inputting the nth group of input data into a trained nth machine learning model to obtain an nth group of output results, 1≤n≤N, wherein the nth group of input data includes the nth input data of the N input data corresponding to each feature information, and the nth group of output results includes an identifier of at least one vulnerability of the first installation package; and performing a security assessment on the first installation package according to at least one group of output results in the N groups of output results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of security assessment, and in particular to a security assessment method, device, and model training method, device. Background Art

[0002] With the development of information technology, the iteration speed of various installation packages is increasing. In order to ensure network information security, it is necessary to conduct security assessments on each version of the installation package.

[0003] In the related art, proof of concept (PoC) of each vulnerability in the collected vulnerability library is used to attempt attack verification to achieve security assessment of the installation package. Summary of the invention

[0004] However, this method is inefficient and cannot meet the needs of high-speed iteration of installation package versions. In addition, since the PoCs of many vulnerabilities have not been collected, these vulnerabilities cannot be detected when attempting to attack and verify, which leads to inaccurate security assessment results of the installation package.

[0005] In order to solve the above problems, the embodiments of the present disclosure propose the following solutions.

[0006] According to one aspect of an embodiment of the present disclosure, a security assessment method is provided, comprising: obtaining multiple feature information of a first installation package; performing N different processing on each feature information to obtain corresponding N input data, N≥2; inputting the nth group of input data into a trained nth machine learning model to obtain an nth group of output results, 1≤n≤N, wherein the nth group of input data includes the nth input data of the N input data corresponding to each feature information, and the nth group of output results includes an identification of at least one vulnerability of the first installation package; and performing a security assessment on the first installation package according to at least one group of output results of the N groups of output results.

[0007] In some embodiments, performing N different processing on each feature information includes: performing a first processing on each feature information based on a text expression algorithm to obtain the first input data of the corresponding N input data; and performing dimensionality reduction processing on the rth input data of the N input data corresponding to each feature information to obtain the r+1th input data of the corresponding N input data, 1≤r≤N-1.

[0008] In some embodiments, the method further includes: under a first evaluation mode, determining the similarity between the i-th group of input data and each group of input data in the N-1 groups of input data except the i-th group of input data in the N groups of input data, wherein the i-th group of input data is a group of input data with the largest data volume in the N groups of input data; wherein, performing a security evaluation on the first installation package based on at least one group of output results in the N groups of output results includes: when the similarity between the i-th group of input data and at least one j-th group of input data is greater than a preset threshold, performing a security evaluation on the first installation package based on a j-th group of output results; and when the similarity between the i-th group of input data and each group of input data in the N-1 groups of input data is not greater than the preset threshold, performing a security evaluation on the first installation package based on the i-th group of output results.

[0009] In some embodiments, determining the similarity between the i-th group of input data and each group of input data in the N-1 groups of input data includes: determining the Euclidean distance between the i-th input data and the k-th input data in the N input data corresponding to each feature information to obtain multiple Euclidean distances between the i-th group of input data and the k-th group of input data, wherein the k-th group of input data is each group of input data in the N-1 groups of input data; and determining the average value of the multiple Euclidean distances as the similarity between the i-th group of input data and the k-th group of input data.

[0010] In some embodiments, when the at least one j-th group of input data includes multiple j-th groups of input data, a security assessment is performed on the first installation package based on a j-th group of output results with the smallest data volume.

[0011] In some embodiments, the method also includes: determining a detection mode of the first installation package under a second evaluation mode; wherein, performing a security assessment on the first installation package based on at least one set of output results in the N sets of output results includes: when the detection mode is the first mode, performing a security assessment on the first installation package based on the identifier of each vulnerability in the N sets of output results; and when the detection mode is the second mode, performing a security assessment on the first installation package based on the identifier of the vulnerability included in each set of data results in the N sets of output results.

[0012] In some embodiments, the method also includes: obtaining multiple sample feature information of a second installation package as a sample; determining vulnerability information of each sample feature information, the vulnerability information indicating whether the sample feature information is associated with a vulnerability, and, in the case of an associated vulnerability, also including an identifier of the associated vulnerability; performing the N types of processing on each sample feature information to obtain corresponding N sample input data respectively; and training the nth machine learning model using the nth sample input data of the N sample input data corresponding to each sample feature information as input and the vulnerability information of the sample feature information as output.

[0013] In some embodiments, the method also includes: determining at least one component called by the second installation package based on the multiple sample feature information; and obtaining vulnerability feature information of the at least one component; wherein, determining the vulnerability information of each sample feature information includes: matching each sample feature information with the vulnerability feature information to determine the vulnerability information of the sample feature information.

[0014] In some embodiments, the plurality of feature information includes at least one of syntax feature information, dependency feature information, directory feature information, function feature information, parameter feature information, and version feature information.

[0015] In some embodiments, the nth machine learning model comprises a decision tree model.

[0016] In some embodiments, the first installation package includes a firmware installation package.

[0017] According to another aspect of an embodiment of the present disclosure, a model training method is provided, comprising: obtaining multiple sample feature information of an installation package as a sample; determining vulnerability information of each sample feature information, the vulnerability information indicating whether the sample feature information is associated with a vulnerability, and, in the case of an associated vulnerability, also including an identifier of the associated vulnerability; performing N different types of processing on each sample feature information to obtain corresponding N sample input data, respectively, N≥2; and taking the nth sample input data of the N sample input data corresponding to each sample feature information as input and the vulnerability information of the sample feature information as output, to train the nth machine learning model, 1≤n≤N.

[0018] In some embodiments, performing N different processing on each sample feature information includes: performing a first processing on each sample feature information based on a text expression algorithm to obtain the first sample input data of the corresponding N sample input data; and performing dimensionality reduction processing on the rth sample input data of the N sample input data corresponding to each sample feature information to obtain the r+1th sample input data of the corresponding N sample input data, 1≤r≤N-1.

[0019] According to another aspect of an embodiment of the present disclosure, a security assessment device is provided, including: an acquisition module, configured to acquire multiple feature information of a first installation package; a processing module, configured to perform N different types of processing on each feature information to obtain corresponding N input data, N≥2; an input module, configured to input the nth group of input data into a trained nth machine learning model to obtain an nth group of output results, 1≤n≤N, wherein the nth group of input data includes the nth input data of the N input data corresponding to each feature information, and the nth group of output results includes an identification of at least one vulnerability of the first installation package; and an assessment module, configured to perform a security assessment on the first installation package according to at least one group of output results among the N groups of output results.

[0020] According to another aspect of an embodiment of the present disclosure, a security assessment device is provided, including: a memory; and a processor coupled to the memory, configured to execute the security assessment method described in any one of the above embodiments based on instructions stored in the memory.

[0021] According to another aspect of an embodiment of the present disclosure, a model training device is provided, comprising: an acquisition module, configured to acquire multiple sample feature information of an installation package as a sample; a determination module, configured to determine vulnerability information of each sample feature information, wherein the vulnerability information indicates whether the sample feature information is associated with a vulnerability, and, in the case of an associated vulnerability, also includes an identifier of the associated vulnerability; a processing module, configured to perform N different types of processing on each sample feature information to obtain corresponding N sample input data, respectively, where N≥2; and a training module, configured to use the nth sample input data of the N sample input data corresponding to each sample feature information as input and the vulnerability information of the sample feature information as output, to train the nth machine learning model, where 1≤n≤N.

[0022] According to another aspect of an embodiment of the present disclosure, a model training device is provided, comprising: a memory; and a processor coupled to the memory, configured to execute the model training method described in any one of the above embodiments based on instructions stored in the memory.

[0023] According to another aspect of the embodiments of the present disclosure, there is provided a safety assessment system, comprising: the safety assessment device described in any one of the above embodiments; and the model training device described in any one of the above embodiments.

[0024] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, comprising computer program instructions, wherein when the computer program instructions are executed by a processor, the security assessment method or model training method described in any one of the above embodiments is implemented.

[0025] According to another aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the security assessment method or model training method described in any one of the above embodiments is implemented.

[0026] In the disclosed embodiment, multiple feature information of the first installation package is processed in N ways, and the nth group of input data obtained by performing the nth processing on each feature information is input into the trained nth machine learning model to obtain N groups of output results corresponding to the N machine learning models. Then, the first installation package is security evaluated based on the identification of the vulnerability included in at least one group of output results in the N groups of output results, and there is no need to use the PoC of the vulnerability to attempt attack verification. In this way, the efficiency of the security evaluation of the installation package can be improved, and the accuracy of the security evaluation of the installation package can be improved.

[0027] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present disclosure 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 only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0029] Figure 1 is a flowchart of a security assessment method according to some embodiments of the present disclosure;

[0030] Figure 2A is a flowchart of a security assessment method according to other embodiments of the present disclosure;

[0031] Figure 2B is a flowchart of a security assessment method according to some other embodiments of the present disclosure;

[0032] Figure 3 is a flowchart of a model training method according to some embodiments of the present disclosure;

[0033] Figure 4 is a schematic diagram of the structure of a safety assessment device according to some embodiments of the present disclosure;

[0034] Figure 5 is a schematic diagram of the structure of a model training device according to some embodiments of the present disclosure;

[0035] Figure 6 is a schematic diagram of the structure of an electronic device according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.

[0037] Unless specifically stated otherwise, the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure.

[0038] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0039] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.

[0040] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0041] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0042] Figure 1 It is a flowchart of a security assessment method according to some embodiments of the present disclosure.

[0043] like Figure 1 As shown, the safety assessment method includes steps 102 to 108.

[0044] In step 102, a plurality of feature information of the first installation package is obtained.

[0045] The first installation package may be any installation package selected by a user to be evaluated, for example, a software installation package, a firmware installation package, etc.

[0046] In some embodiments, the first installation package may be reverse processed to extract multiple feature information from the source code of the first installation package. The multiple feature information may include source code feature information and source code fingerprint feature information.

[0047] In some embodiments, the plurality of feature information may include at least one of syntax feature information, dependency feature information, directory feature information, function feature information, parameter feature information, and version feature information.

[0048] In step 104, N different types of processing are performed on each feature information to obtain corresponding N input data, respectively. Here, N≥2.

[0049] For example, the plurality of feature information includes function feature information A and version feature information B. Function feature information A may be processed in N ways to obtain N input data corresponding to function feature information A, and version feature information B may be processed in N ways to obtain N input data corresponding to version feature information B.

[0050] The N types of processing may include processing based on a text expression algorithm. In some embodiments, the N types of processing may also include quadrant reorganization processing, dimensionality reduction processing, etc. This will be further described below.

[0051] In step 106, the nth group of input data is input into the trained nth machine learning model to obtain the nth group of output results.

[0052] Here, the nth group of input data includes the nth input data among the N input data corresponding to each feature information, 1≤n≤N.

[0053] That is, each group of input data includes input data obtained by performing the same one of N types of processing on each of the plurality of feature information.

[0054] The example in which multiple feature information includes function feature information A and version feature information B is still used for description. Assuming N=2, the first group of input data includes the first input data corresponding to the function feature information A and the first input data corresponding to the version feature information B; the second group of input data includes the second input data corresponding to the function feature information A and the second input data corresponding to the version feature information B.

[0055] In this case, the first set of input data can be input into the first trained machine learning model to obtain the first set of output results, and the second set of input data can be input into the second trained machine learning model to obtain the second set of output results.

[0056] Here, the nth group of output results includes an identification of at least one vulnerability of the first installation package.

[0057] For example, the nth machine learning model may be a machine learning model such as a support vector machine (SVM) model or a decision tree model.

[0058] For example, the identifier of the vulnerability possessed by the first installation package may be a Common Vulnerabilities and Exposures (CVE) identifier of the vulnerability.

[0059] It should be understood that each set of output results in the N sets of output results may be the same or different.

[0060] In step 108, a security assessment is performed on the first installation package according to at least one set of output results among the N sets of output results.

[0061] For example, a security assessment may be performed on the first installation package based on one set of output results in the N sets of output results; or for another example, a security assessment may be performed on the first installation package based on the N sets of output results.

[0062] As some implementations, the identifier of each vulnerability included in at least one set of output results among the N sets of output results may be used as the security assessment result.

[0063] As other implementations, the corresponding security risk can be determined according to the identification of each vulnerability included in at least one of the N groups of output results, and a security assessment result can be obtained based on these security risks. The security assessment result can be expressed in the form of a security risk level, a security risk assessment value, etc.

[0064] In the above embodiment, multiple feature information of the first installation package is processed in N ways, and the nth group of input data obtained by performing the nth processing on each feature information is input into the trained nth machine learning model to obtain N groups of output results corresponding to the N machine learning models. Then, the first installation package is security evaluated based on the identification of the vulnerability included in at least one group of output results in the N groups of output results, and there is no need to use the PoC of the vulnerability to attempt attack verification. In this way, the efficiency of the security evaluation of the installation package can be improved, and the accuracy of the security evaluation of the installation package can be improved.

[0065] The following further describes some examples Figure 1 The safety assessment method shown.

[0066] In some embodiments, the first installation package includes a firmware installation package. In the related art, the premise of attempting to attack and verify the firmware installation package using the PoC of the vulnerability is that the firmware has been installed on the physical device. If there is no physical device, it is impossible to perform a security assessment on the firmware installation package.

[0067] In the embodiments of the present disclosure, even without a physical device, an efficient and accurate security assessment can still be performed on the firmware installation package, which can reduce the cost of performing security assessment on the firmware installation package.

[0068] In some embodiments, each feature information may be processed in N different ways as follows. First, each feature information may be processed in the first way based on the text expression algorithm to obtain the first input data of the corresponding N input data. Then, the rth input data of the N input data corresponding to each feature information may be processed by dimensionality reduction to obtain the r+1th input data of the corresponding N input data. Here, 1≤r≤N-1.

[0069] It should be understood that the dimensionality reduction process is performed on the rth input data, which means that the data volume of the (r+1)th input data among the N input data corresponding to each feature information is smaller than the data volume of the rth input data.

[0070] Take function feature information A as an example. First, the function feature information A can be processed based on the text expression algorithm to convert the function feature information A in the form of a string into the corresponding first input data matrix. Then, the first input data matrix can be subjected to dimensionality reduction processing to obtain the corresponding second input data matrix. For example, assuming that the first input data matrix is ​​a 3 (row) × 3 (column) matrix, the second input data matrix can be a 3 (row) × 2 (column) matrix. The N input data matrices corresponding to each feature information can be, for example, word vectors.

[0071] In the above embodiment, the first processing is performed on each feature information based on the text expression algorithm, and then the dimension reduction processing is performed on the rth input data corresponding to each feature information. In this way, the data volume of the r+1th group of input data can be reduced, thereby reducing the processing pressure of the r+1th machine learning model and increasing the speed of obtaining the r+1th group of output results.

[0072] Figure 2A It is a flowchart of a security assessment method according to some other embodiments of the present disclosure.

[0073] like Figure 2A As shown, the security assessment method further includes step 202. In these embodiments, step 108 includes step 1082 and step 1084.

[0074] In step 202, in a first evaluation mode, the similarity between the i-th group of input data and each group of input data in N-1 groups of input data except the i-th group of input data in the N groups of input data is determined.

[0075] Here, the i-th group of input data is a group of input data with the largest data volume among the N groups of input data. For example, the i-th group of input data may be the first group of input data obtained by processing each input data based on the text expression algorithm.

[0076] The i-th group of input data has the largest amount of data, which means that the accuracy of the i-th group of output results corresponding to the i-th group of input data is the highest among the N groups of output results.

[0077] In step 1082, when the similarity between the i-th group of input data and at least one j-th group of input data is greater than a preset threshold, a security assessment is performed on the first installation package according to a j-th group of output results.

[0078] It should be understood that at least one j-th group of input data includes each group of input data whose similarity with the i-th group of input data is greater than a preset threshold in the N-1 groups of input data in step 202. That is, j can be any integer between 1 and N except i.

[0079] The similarity between the i-th group of input data and the j-th group of input data is greater than a preset threshold, which means that the i-th group of output results corresponding to the i-th group of input data and the j-th group of output results corresponding to the j-th group of input data have a high similarity. In other words, the accuracy of the j-th group of output results is similar to the accuracy of the i-th group of output results.

[0080] In this case, the security assessment of the first installation package is performed based on any j-th group of output results that are highly accurate and can be obtained quickly.

[0081] In step 1084, when the similarity between the i-th group of input data and each group of input data in the N-1 groups of input data is not greater than a preset threshold, a security assessment is performed on the first installation package according to the i-th group of output results.

[0082] The similarity between the i-th group of input data and each other group of input data is not greater than a preset threshold, which means that the i-th group of output results corresponding to the i-th group of input data and each group of output results corresponding to each other group of input data have low similarity.

[0083] In this case, a security assessment is performed on the first installation package based on the i-th group of output results with high accuracy.

[0084] Take N=2 as an example. Assume that the amount of the first group of input data is greater than the amount of the second group of input data. In this case, the activation function δ=(x, y) can be configured, and the security assessment of the first installation package can be performed based on (x×the first group of output results+y×the second group of output results).

[0085] If the similarity between the first group of input data and the second group of input data is greater than the preset threshold, then δ = (x = 0, y = 1), at this time, the first installation package is security evaluated according to the second group of output results. If the similarity between the first group of input data and the second group of input data is not greater than the preset threshold, then δ = (x = 1, y = 0), at this time, the first installation package is security evaluated according to the first group of output results.

[0086] In the above embodiment, the similarity between the i-th group of input data and each other group of input data is determined. Then, when the similarity between the j-th group of input data and the i-th group of input data is greater than a preset threshold, the first installation package is security evaluated according to the j-th group of output results; when the similarity between each other group of input data and the i-th group of input data is not greater than the preset threshold, the first installation package is security evaluated according to the i-th group of output results. In this way, the accuracy of the security evaluation of the installation package can be guaranteed while further improving the efficiency of the security evaluation of the installation package.

[0087] In some embodiments, in step 1082, when at least one j-th group of input data includes multiple j-th groups of input data, the first installation package may be security evaluated according to a j-th group of output results with the smallest data volume. In this way, the efficiency of the security evaluation of the installation package can be further improved while ensuring the accuracy of the security evaluation of the installation package.

[0088] Some implementations of step 202 are described below.

[0089] In some implementations, the Euclidean distance between the i-th input data and the k-th input data among the N input data corresponding to each feature information may be first determined to obtain multiple Euclidean distances between the i-th group of input data and the k-th group of input data.

[0090] Here, the kth group of input data is each group of input data in the N-1 groups of input data. That is, k can be any integer between 1 and N except i.

[0091] It should be understood that the i-th input data corresponding to each feature information belongs to the i-th group of input data, and the k-th input data corresponding to each feature information belongs to the k-th group of input data. The number of multiple Euclidean distances between the i-th group of input data and the k-th group of input data is equal to the number of multiple feature information of the first installation package obtained in step 102.

[0092] For example, the first group of input data includes the corresponding first input data a1 obtained by performing the first processing on the function characteristic information A, and the corresponding first input data b1 obtained by performing the first processing on the version characteristic information B. The second group of input data includes the corresponding second input data a2 obtained by performing the second processing on the function characteristic information A, and the corresponding second input data b2 obtained by performing the second processing on the version characteristic information B.

[0093] In this case, the Euclidean distance between the first input data a1 in the first group of input data and the second input data a2 in the second group of input data of the function feature information A can be determined, and the Euclidean distance between the first input data b1 in the first group of input data and the second input data b2 in the second group of input data of the version feature information B can be determined to obtain two Euclidean distances.

[0094] Then, an average value of a plurality of Euclidean distances between the i-th group of input data and the k-th group of input data may be determined as the similarity between the i-th group of input data and the k-th group of input data.

[0095] In these implementations, the similarity between every two sets of input data can be accurately calculated, thereby helping to further improve the efficiency of the security assessment of the installation package while ensuring the accuracy of the security assessment of the installation package.

[0096] Figure 2B It is a flowchart of a security assessment method according to some other embodiments of the present disclosure.

[0097] like Figure 2B As shown, the security assessment method further includes step 204. In these embodiments, step 108 includes step 1086 and step 1088.

[0098] In step 204, a detection mode of the first installation package is determined in the second evaluation mode.

[0099] As some implementations, the detection mode of the first installation package may be input by the user. For example, after the user selects the first installation package to be evaluated, the user may further select the detection mode of the first installation package.

[0100] In step 1086, when the detection mode is the first mode, a security assessment is performed on the first installation package according to the identifier of each vulnerability in the N groups of output results.

[0101] That is, when the detection mode is the first mode, the security assessment of the first installation package is performed according to the union of the N groups of output results. In this way, a comprehensive security assessment can be performed on the first installation package.

[0102] In step 1088, when the detection mode is the second mode, a security assessment is performed on the first installation package according to the identifier of the vulnerability included in each group of data results in the N groups of output results.

[0103] That is, when the detection mode is the second mode, the first installation package is security evaluated according to the intersection of the N groups of output results. In this way, a more accurate security evaluation can be performed on the first installation package.

[0104] In the above embodiment, when the detection mode is the first mode, the first installation package is security evaluated according to the identifier of each vulnerability in the N groups of output results, and when the detection mode is the second mode, the first installation package is security evaluated according to the identifier of the vulnerability included in each group of data results in the N groups of output results. In this way, a comprehensive security evaluation or an accurate security evaluation can be performed on the installation package as needed.

[0105] Figure 3 It is a flowchart of a model training method according to some embodiments of the present disclosure.

[0106] like Figure 3 As shown, the model training method includes steps 302 to 308.

[0107] In step 302, multiple sample feature information of the sample installation package is obtained.

[0108] For the convenience of explanation, the installation package used as a sample will be referred to as the second installation package hereinafter.

[0109] The second installation package may be any installation package obtained by means of a web crawler, for example, a software installation package, a firmware installation package, etc.

[0110] In some embodiments, the second installation package may be reverse processed to extract multiple sample feature information from the source code of the second installation package. The multiple feature information may include source code sample feature information and source code fingerprint sample feature information.

[0111] In some embodiments, the plurality of sample feature information may include at least one of syntax sample feature information, dependency sample feature information, directory sample feature information, function sample feature information, parameter sample feature information, and version sample feature information.

[0112] In step 304, vulnerability information of each sample feature information is determined.

[0113] Here, the vulnerability information indicates whether the sample feature information is associated with a vulnerability, and if so, also includes the identifier of the associated vulnerability. The identifier of the vulnerability associated with each sample feature information may be, for example, a CVE identifier.

[0114] As some implementations, vulnerability information of each sample feature information may be determined based on manual annotation of each sample feature information by a user. For example, a user may determine based on experience whether sample feature information is associated with a vulnerability and which vulnerabilities are associated, and perform manual annotation accordingly.

[0115] As some other implementations, at least one component called by the second installation package may be determined based on multiple sample feature information, and vulnerability feature information of the at least one component may be obtained. The vulnerability feature information of the component refers to feature information of the vulnerability of the component.

[0116] In these implementations, each sample feature information is matched with vulnerability feature information of at least one component to determine vulnerability information of the sample feature information.

[0117] For example, if the sample feature information successfully matches the vulnerability feature information of a certain vulnerability, it can be determined that the sample feature information is associated with this vulnerability; if the sample feature information does not successfully match the vulnerability feature information of each vulnerability, it can be determined that the sample feature information is not associated with the vulnerability.

[0118] Under these implementations, the vulnerability information of sample feature information can be automatically determined without the need for manual labeling by the user. This can improve the training efficiency of the model and reduce labor costs.

[0119] In step 306, N different types of processing are performed on each sample feature information to obtain corresponding N sample input data respectively.

[0120] It should be understood that the N types of processing performed on each sample feature information here are the same as the N types of processing in step 104. For the relevant parts, please refer to the above embodiments, which will not be repeated here.

[0121] In step 308, the nth sample input data among the N sample input data corresponding to each sample feature information is used as input, and the vulnerability information of the sample feature information is used as output to train the nth machine learning model.

[0122] In the above embodiment, the nth sample input data obtained by performing the nth processing on each sample feature information is used as input, and the vulnerability information of the sample feature information is used as output to train the nth machine learning model. In this way, the trained N machine learning models can be used to perform efficient and accurate security assessment on the installation package later.

[0123] The following further describes some examples Figure 3 The model training method shown.

[0124] In some embodiments, the nth machine learning model includes a decision tree model. In this way, a well-trained machine learning model with high accuracy can be obtained by training the machine learning model with a small amount of sample feature information.

[0125] In some embodiments, each sample feature information may be processed in N different ways as follows. First, each sample feature information may be processed in the first way based on a text expression algorithm to obtain the first sample input data of the corresponding N sample input data. Then, the rth sample input data of the N sample input data corresponding to each sample feature information may be processed by dimensionality reduction to obtain the r+1th sample input data of the corresponding N sample input data.

[0126] That is, the data amount of the (r+1)th sample input data among the N sample input data corresponding to each sample feature information is smaller than the data amount of the rth sample input data.

[0127] In the above embodiment, the first processing is performed on each sample feature information based on the text expression algorithm, and then the rth sample input data corresponding to each sample feature information is subjected to dimensionality reduction processing. In this way, the training efficiency of the r+1th machine learning model can be improved.

[0128] It should be understood that the security assessment method of any of the above embodiments may include one or more steps of the model training method of any of the above embodiments.

[0129] Figure 4 is a schematic diagram of the structure of a security assessment device according to some embodiments of the present disclosure.

[0130] like Figure 4 As shown, the safety assessment device 400 may include an acquisition module 401 , a processing module 402 , an input module 403 and an assessment module 404 .

[0131] The acquisition module 401 may be configured to acquire multiple feature information of the first installation package.

[0132] The processing module 402 may be configured to perform N different types of processing on each piece of feature information to obtain corresponding N input data, respectively. Here, N≥2.

[0133] The input module 403 may be configured to input the nth group of input data into the trained nth machine learning model to obtain the nth group of output results. 1≤n≤N. Here, the nth group of input data includes the nth input data among the N input data corresponding to each feature information, and the nth group of output results includes an identification of at least one vulnerability of the first installation package.

[0134] The evaluation module 404 may be configured to perform a security evaluation on the first installation package according to at least one set of output results among the N sets of output results.

[0135] It should be understood that the security assessment device 400 may also include various other modules to execute the security assessment method of any of the above embodiments.

[0136] Figure 5 It is a structural schematic diagram of a model training device according to some embodiments of the present disclosure.

[0137] like Figure 5 As shown, the model training device 500 may include an acquisition module 501 , a determination module 502 , a processing module 503 and a training module 504 .

[0138] The acquisition module 501 may be configured to acquire multiple sample feature information of the installation package as a sample.

[0139] The determination module 502 may be configured to determine vulnerability information of each sample feature information. Here, the vulnerability information indicates whether the sample feature information is associated with a vulnerability, and if so, also includes an identifier of the associated vulnerability.

[0140] The processing module 503 may be configured to perform N different types of processing on each sample feature information to obtain corresponding N sample input data, respectively. Here, N≥2.

[0141] The training module 504 may be configured to take the nth sample input data among the N sample input data corresponding to each sample feature information as input and take the vulnerability information of the sample feature information as output to train the nth machine learning model. Here, 1≤n≤N.

[0142] It should be understood that the model training device 500 may also include various other modules to execute the model training method of any of the above embodiments.

[0143] Figure 6 is a schematic diagram of the structure of an electronic device according to some embodiments of the present disclosure.

[0144] like Figure 6 As shown, the electronic device 600 includes a memory 601 and a processor 602 coupled to the memory 601 , and the processor 602 is configured to execute the security assessment method or model training method of any one of the above-mentioned embodiments based on instructions stored in the memory 601 .

[0145] The memory 601 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, and other programs.

[0146] The electronic device 600 may also include an input / output interface 603, a network interface 604, a storage interface 605, etc. These interfaces 603, 604, 605, and the memory 601 and the processor 602 may be connected, for example, via a bus 606. The input / output interface 603 provides a connection interface for input / output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 604 provides a connection interface for various networked devices. The storage interface 605 provides a connection interface for external storage devices such as an SD card and a USB flash drive.

[0147] It should be understood that when the electronic device 600 is configured to execute the security assessment method of any one of the above embodiments, it can be a security assessment device; when the electronic device 600 is configured to execute the model training method of any one of the above embodiments, it can be a model training device.

[0148] The disclosed embodiments further provide a security assessment system, comprising a security assessment device of any one of the above embodiments (eg, security assessment device 400 ), and a model training device of any one of the above embodiments (eg, model training device 500 ).

[0149] The embodiments of the present disclosure further provide a computer-readable storage medium, comprising computer program instructions, which implement the method of any one of the above embodiments when executed by a processor.

[0150] The embodiments of the present disclosure further provide a computer program product, including a computer program, which implements the method of any one of the above embodiments when executed by a processor.

[0151] So far, various embodiments of the present disclosure have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.

[0152] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0153] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0154] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present disclosure. It should be understood that the functions specified in one or more processes in the flowchart and / or one or more blocks in the block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions specified in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0155] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0156] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0157] Although some specific embodiments of the present disclosure have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be modified or some technical features may be replaced by equivalents without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.

Claims

1. A safety assessment method, comprising: Acquire multiple feature information of the first installation package; Performing N different processing on each feature information to obtain corresponding N input data, N≥2, wherein the N processing includes processing based on a text expression algorithm and dimensionality reduction processing; Inputting the nth group of input data into the trained nth machine learning model to obtain an nth group of output results, 1≤n≤N, wherein the nth group of input data includes the nth input data among the N input data corresponding to each feature information, and the nth group of output results includes an identification of at least one vulnerability of the first installation package; and Performing a security assessment on the first installation package according to at least one set of output results among the N sets of output results; Among them, the nth machine learning model is trained by taking the nth sample input data among the N sample input data corresponding to each sample feature information among multiple sample feature information of the installation package as the sample as input, and taking the vulnerability information of the sample feature information as output, wherein the N sample input data corresponding to each sample feature information is obtained by performing the N types of processing on the sample feature information, and the vulnerability information of each sample feature information indicates whether the sample feature information is associated with a vulnerability, and in the case of an associated vulnerability, also includes the identifier of the associated vulnerability.

2. The method according to claim 1, wherein: N different processing methods are performed on each feature information, including: Performing a first processing on each feature information based on a text expression algorithm to obtain the first input data of the corresponding N input data respectively; and A dimension reduction process is performed on the r-th input data among the N input data corresponding to each feature information to obtain the corresponding r+1-th input data among the N input data, 1≤r≤N-1.

3. The method according to claim 1, further comprising: In a first evaluation mode, determining the similarity between the i-th group of input data and each group of input data in N-1 groups of input data other than the i-th group of input data in the N groups of input data, wherein the i-th group of input data is a group of input data with the largest amount of data in the N groups of input data; The step of performing a security assessment on the first installation package according to at least one set of output results among the N sets of output results includes: When the similarity between the i-th group of input data and at least one j-th group of input data is greater than a preset threshold, performing a security assessment on the first installation package according to a j-th group of output results; and When the similarity between the i-th group of input data and each group of input data in the N-1 groups of input data is not greater than the preset threshold, a security assessment is performed on the first installation package according to the i-th group of output results.

4. The method according to claim 3, wherein: Determining the similarity between the i-th group of input data and each group of input data in the N-1 groups of input data includes: Determine the Euclidean distance between the i-th input data and the k-th input data in the N input data corresponding to each feature information to obtain a plurality of Euclidean distances between the i-th group of input data and the k-th group of input data, wherein the k-th group of input data is each group of input data in the N-1 groups of input data; and An average value of the plurality of Euclidean distances is determined as the similarity between the i-th group of input data and the k-th group of input data.

5. The method according to claim 3, wherein: In the case that the at least one j-th group of input data includes a plurality of j-th groups of input data, a security assessment is performed on the first installation package according to a j-th group of output results having a smallest data amount.

6. The method according to claim 1, further comprising: Under the second evaluation mode, determining a detection mode of the first installation package; The step of performing a security assessment on the first installation package according to at least one set of output results among the N sets of output results includes: When the detection mode is the first mode, performing a security assessment on the first installation package according to an identification of each vulnerability in the N groups of output results; and When the detection mode is the second mode, a security assessment is performed on the first installation package according to the identifier of the vulnerability included in each group of data results in the N groups of output results.

7. The method according to any one of claims 1 to 6, further comprising: Acquire multiple sample feature information of the second installation package as a sample; Determine vulnerability information of each sample feature information, wherein the vulnerability information indicates whether the sample feature information is associated with a vulnerability, and, if associated with a vulnerability, also includes an identifier of the associated vulnerability; Performing the N types of processing on each sample feature information to obtain corresponding N sample input data respectively; and The nth sample input data among the N sample input data corresponding to each sample feature information is taken as input, and the vulnerability information of the sample feature information is taken as output, to train the nth machine learning model.

8. The method according to claim 7, further comprising: Determining at least one component called by the second installation package according to the plurality of sample feature information; and Obtaining vulnerability feature information of the at least one component; Among them, the vulnerability information for determining each sample feature information includes: Each sample feature information is matched with the vulnerability feature information to determine the vulnerability information of the sample feature information.

9. The method according to any one of claims 1 to 6, wherein: The plurality of feature information includes at least one of syntax feature information, dependency feature information, directory feature information, function feature information, parameter feature information and version feature information.

10. The method according to any one of claims 1 to 6, wherein: The nth machine learning model includes a decision tree model.

11. The method according to any one of claims 1 to 6, wherein: The first installation package includes a firmware installation package.

12. A model training method, comprising: Acquire multiple sample feature information of the installation package as a sample; Determine vulnerability information of each sample feature information, wherein the vulnerability information indicates whether the sample feature information is associated with a vulnerability, and, if associated with a vulnerability, also includes an identifier of the associated vulnerability; Performing N different processing on each sample feature information to obtain corresponding N sample input data, N≥2, wherein the N processing includes processing based on a text expression algorithm and dimensionality reduction processing; and The nth sample input data among the N sample input data corresponding to each sample feature information is taken as input, and the vulnerability information of the sample feature information is taken as output, and the nth machine learning model is trained, 1≤n≤N, so that the trained N machine learning models are used to perform security assessment on the installation package.

13. The method according to claim 12, wherein: The N different processing methods for each sample feature information include: Performing a first processing on each sample feature information based on a text expression algorithm to obtain the first sample input data of the corresponding N sample input data; and A dimensionality reduction process is performed on the r-th sample input data among the N sample input data corresponding to each sample feature information to obtain the r+1-th sample input data among the corresponding N sample input data, 1≤r≤N-1.

14. A safety assessment device, comprising: An acquisition module, configured to acquire multiple feature information of the first installation package; A processing module is configured to perform N different processing on each feature information to obtain corresponding N input data, N≥2, wherein the N processing includes processing based on a text expression algorithm and dimensionality reduction processing; an input module configured to input an nth group of input data into an nth trained machine learning model to obtain an nth group of output results, 1≤n≤N, wherein the nth group of input data includes the nth input data of the N input data corresponding to each feature information, and the nth group of output results includes an identification of at least one vulnerability of the first installation package; and An evaluation module, configured to perform a security evaluation on the first installation package according to at least one set of output results among the N sets of output results; Among them, the nth machine learning model is trained by taking the nth sample input data of N sample input data corresponding to each sample feature information in multiple sample feature information of the installation package as a sample as input, and taking the vulnerability information of the sample feature information as output, wherein the N sample input data corresponding to each sample feature information is obtained by performing the N types of processing on the sample feature information, and the vulnerability message of each sample feature information indicates whether the sample feature information is associated with a vulnerability, and in the case of an associated vulnerability, also includes an identifier of the associated vulnerability.

15. A safety assessment device, comprising: Memory; as well as A processor coupled to the memory, configured to execute the method according to any one of claims 1 to 11 based on instructions stored in the memory.

16. A model training device, comprising: An acquisition module is configured to acquire multiple sample feature information of an installation package as a sample; A determination module is configured to determine vulnerability information of each sample feature information, wherein the vulnerability information indicates whether the sample feature information is associated with a vulnerability, and also includes an identifier of the associated vulnerability if the vulnerability is associated; A processing module is configured to perform N different types of processing on each sample feature information to obtain corresponding N sample input data, N≥2, wherein the N types of processing include processing based on a text expression algorithm and dimensionality reduction processing; and The training module is configured to take the nth sample input data among the N sample input data corresponding to each sample feature information as input and the vulnerability information of the sample feature information as output, to train the nth machine learning model, 1≤n≤N, so that the trained N machine learning models are used to perform security assessment on the installation package.

17. A model training device, comprising: Memory; as well as A processor coupled to the memory is configured to execute the method of claim 12 or 13 based on instructions stored in the memory.

18. A safety assessment system comprising: The safety assessment device according to claim 14 or 15; as well as The model training device according to claim 16 or 17.

19. A computer-readable storage medium comprising computer program instructions, wherein: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 13 is implemented.

20. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.

Citation Information

Patent Citations

  • Software installation package security detection method, software installation package security detection client, software installation package security detection server and software installation package security detection system

    CN104063664A

  • Android privilege elevation vulnerability detection method and system based on machine learning

    CN109255241A

  • Application program detection method and device and neural network system

    CN109711160A

  • Computer application software testing system and method

    CN110471855A

  • Malicious software identification method and system based on multi-model features and related device

    CN110619213A