Program recognition model training and program recognition method, device, equipment and medium
By extracting and utilizing program behavior features and signature randomness features, and using machine learning methods to identify malicious programs, the problem of low efficiency and accuracy in identifying malicious programs in the existing technology is solved, and more efficient multi-angle feature extraction and discrimination are achieved. .
Patent Information
- Application Number
- CN202110997676.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-27
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-08-27
AI Technical Summary
The existing technology only uses simple features for identification of malicious programs, and is unable to extract and identify multi-angle features of applications, resulting in low identification efficiency and accuracy.
By obtaining the behavioral characteristic information and certificate signature information of the sample program, the program behavioral characteristics and signature randomness characteristics are extracted and input into the program identification model as training data. Machine learning methods are used for multi-feature extraction and discrimination to improve the efficiency of malicious program identification. and accuracy.
It achieves multi-angle feature extraction and discrimination of applications, significantly improves the efficiency and accuracy of malicious program identification, and can identify malicious programs more effectively.
Smart Images

Figure CN113742726B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a program recognition model training and program recognition method, device, equipment and medium. Background Art
[0002] In the prior art, malicious programs can usually be identified by judging static features such as the program's API (Application Programming Interface) calls, permissions, and startup items, or by judging dynamic features such as the program's call sequence, registry behavior, and file behavior. It can also be identified by obtaining the program's internal information and matching it with existing malicious information in the database.
[0003] However, the above methods provided by the prior art only use simple feature identification to identify malicious programs, and cannot achieve multi-angle feature extraction and identification of application programs. The efficiency and accuracy of malicious program identification are low. Summary of the invention
[0004] The embodiments of the present invention provide a program recognition model training and program recognition method, device, equipment and medium to realize multi-angle feature extraction and discrimination of application programs based on machine learning methods, thereby improving the efficiency and accuracy of malicious program recognition.
[0005] In a first aspect, an embodiment of the present invention provides a program recognition model training method, comprising:
[0006] Obtain behavioral feature information and certificate signature information of each sample program;
[0007] Acquire program behavior characteristics of each of the sample programs according to the behavior characteristic information;
[0008] Obtaining the randomness of the character string of the certificate signature information, and obtaining the signature randomness characteristics of each of the sample programs;
[0009] The program behavior feature and the signature randomness feature are input into a program recognition model as sample training data to train the program recognition model.
[0010] In a second aspect, an embodiment of the present invention further provides a program identification method, comprising:
[0011] Obtaining behavioral feature information and certificate signature information of the program to be identified;
[0012] Acquire program behavior characteristics of the program to be identified according to the behavior characteristic information;
[0013] Obtaining the randomness of the character string of the certificate signature information to obtain the randomness feature of the signature of the program to be identified;
[0014] The program behavior characteristics and the signature randomness characteristics are input into a program recognition model as the detection data of the program to be recognized, so as to obtain a program recognition result of the program to be recognized; wherein, the program recognition model is trained by the program recognition model training method described in any embodiment of the present invention.
[0015] In a third aspect, an embodiment of the present invention further provides a program recognition model training device, comprising:
[0016] The sample information acquisition module is used to obtain the behavior characteristic information and certificate signature information of each sample program;
[0017] A sample behavior feature acquisition module, used to acquire program behavior features of each of the sample programs according to the behavior feature information;
[0018] A sample signature feature acquisition module, used to acquire the randomness of the character string of the certificate signature information, and obtain the signature randomness feature of each sample program;
[0019] The program recognition model training module is used to input the program behavior characteristics and the signature randomness characteristics as sample training data into the program recognition model to train the program recognition model.
[0020] In a fourth aspect, an embodiment of the present invention further provides a program identification device, including:
[0021] The module for obtaining information to be identified is used to obtain the behavior characteristic information and certificate signature information of the program to be identified;
[0022] A module for acquiring behavior characteristics to be identified, used for acquiring program behavior characteristics of the program to be identified according to the behavior characteristic information;
[0023] A signature feature acquisition module to be identified, used to obtain the randomness of the string of the certificate signature information, and obtain the signature randomness feature of the program to be identified;
[0024] A program identification module is used to input the program behavior characteristics and the signature randomness characteristics as the detection data of the program to be identified into a program identification model to obtain a program identification result of the program to be identified; wherein the program identification model is trained by the program identification model training method described in any embodiment of the present invention.
[0025] In a fifth aspect, an embodiment of the present invention further provides a computer device, the computer device comprising:
[0026] one or more processors;
[0027] A storage device for storing one or more programs;
[0028] When the one or more programs are executed by the one or more processors, the one or more processors implement the program recognition model training method or program recognition method provided by any embodiment of the present invention.
[0029] In a sixth aspect, an embodiment of the present invention further provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, the program recognition model training method or program recognition method provided by any embodiment of the present invention is implemented.
[0030] The embodiment of the present invention obtains behavioral characteristic information and certificate signature information of sample programs, obtains program behavioral characteristics of each sample program based on the behavioral characteristic information, and obtains signature randomness characteristics of each sample program based on the certificate signature information, thereby inputting the program behavior characteristics and signature randomness characteristics as sample training data into a program recognition model to train it, so as to obtain a model for malicious program detection based on multiple features, and realizes multi-angle feature extraction and discrimination of application programs based on machine learning methods, thereby improving the efficiency and accuracy of malicious program identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A flowchart of a program recognition model training method provided in Example 1 of the present invention.
[0032] Figure 2 A flowchart of a program recognition model training method provided in Embodiment 2 of the present invention.
[0033] Figure 3 A structural diagram of a feature extraction model provided in Embodiment 2 of the present invention.
[0034] Figure 4 A flowchart of a program recognition model training method provided in Embodiment 2 of the present invention.
[0035] Figure 5 This is a flowchart of a program identification method provided in Embodiment 3 of the present invention.
[0036] Figure 6 A schematic diagram of the structure of a program recognition model training device provided in Embodiment 4 of the present invention.
[0037] Figure 7 A schematic diagram of the structure of a program recognition device provided in Embodiment 5 of the present invention.
[0038] Figure 8 A schematic diagram of the structure of a computer device provided in Embodiment 6 of the present invention. DETAILED DESCRIPTION
[0039] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention.
[0040] It should also be noted that, for ease of description, only the part relevant to the present invention but not all content is shown in the accompanying drawings. It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processing or methods depicted as flow charts. Although the flow chart describes each operation (or step) as sequential processing, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the processing can be terminated, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to methods, functions, procedures, subroutines, subprograms, etc.
[0041] Embodiment 1
[0042] Figure 1 is a flowchart of a method for training a program recognition model provided in the first embodiment of the present invention. This embodiment is applicable to the case where a model is trained so that it can be used to identify malicious programs. The method can be executed by a program recognition model training device provided in the embodiment of the present invention. The device can be implemented by software and / or hardware and can generally be integrated in a computer device. Figure 1 As shown, the method includes the following operations:
[0043] S110: Obtain behavioral feature information and certificate signature information of each sample program.
[0044] The sample program may be a malicious program or a non-malicious program, and the number of sample programs may be preset as needed. The behavior characteristic information may include information generated by the behavior of the program, which may be used to reflect the behavior of the program. The certificate signature information may be a digital signature in the digital certificate of the program.
[0045] Accordingly, a sufficient number of sample programs can be acquired in advance as needed, including a certain number of malicious programs and a certain number of non-malicious programs. In each sample program, its behavioral feature information can be acquired in any manner, for example, it can include decompiling the sample program to obtain static feature information such as application components, permissions, APIs, etc. of the sample program; it can also include acquiring dynamic feature information such as log information, file access, and database during the running of the sample program.
[0046] Furthermore, a digital certificate is an electronic file used in public key infrastructure to prove the identity of the public key owner. The certification authority uses its own private key to digitally sign the public key to be certified and generate a certificate. Therefore, the certificate signature information can be obtained from the digital certificate of the sample program.
[0047] Exemplarily, the certificate signature information may include a CN (Common Name) field, an O (Organization Name) field, an OU (Organization Unit) field, an L (Locality) field, an S (State / Province) field, and a C (Country) field. For the signature of a malicious program, the field content includes a randomly generated string to hide the real information of the malicious program developer, such as the signature "CN = So, OU = wq, O = dqoindwei, L = at, ST = th, C = China", while in the signature of a non-malicious program, the content of each field has a certain meaning, such as the website domain name in the CN field, the unit name in the O field, the organizational unit name in the OU field, the city name in the L field, the province name in the S field, and the country name or code in the C field, such as the signature "CN = Android QZone Team, OU = Tencent Company, O = QZoneTeam of Tencent Company, L = Beijing City, ST = Beijing City, C = 86".
[0048] S120: Acquire program behavior characteristics of each of the sample programs according to the behavior characteristic information.
[0049] The program behavior feature may be a feature obtained by distinguishing the behavior of the program reflected by the behavior feature information based on the behavior difference between malicious programs and non-malicious programs.
[0050] Correspondingly, the behavior of each sample program can be known based on the behavior feature information, so that each behavior of the sample program can be identified to obtain its program behavior feature.
[0051] Exemplarily, when it is determined that the behavior of the sample program reflected by the behavior characteristic information conforms to the behavior characteristics of a malicious program, the program behavior characteristics of the sample program can be determined as a characteristic value of 1; when it is determined that the behavior of the sample program reflected by the behavior characteristic information conforms to the behavior characteristics of a non-malicious program, the program behavior characteristics of the sample program can be determined as a characteristic value of 0.
[0052] S130: Obtain the randomness of the character string of the certificate signature information, and obtain the signature randomness characteristics of each of the sample programs.
[0053] The string randomness may be information describing whether the string is randomly generated. The signature randomness feature may be a feature obtained by determining whether the digital signature in the digital certificate of the program is a randomly generated string.
[0054] Accordingly, the randomness of the string of the certificate signature information can be obtained by judging whether the certificate signature information is a randomly generated string. For any sample program, when its certificate signature information is a randomly generated string, it can be said that its signature randomness feature is a random signature; when its certificate signature information is not a randomly generated string but a string with a specific meaning, it can be said that its signature randomness feature is a non-random signature. Optionally, the random signature can be determined as a feature value of 1, and the non-random signature can be determined as a feature value of 0.
[0055] It should be noted that there is no limitation on the execution order of S120 and S130 , and they can be executed successively or simultaneously, and both can be executed after S110 and before S140 .
[0056] S140: Input the program behavior feature and the signature randomness feature as sample training data into a program recognition model to train the program recognition model.
[0057] The sample training data may be data used for model training. The program identification model may be a model used to identify malicious programs.
[0058] Accordingly, the program behavior characteristics and signature randomness characteristics of all sample programs are used as sample training data to train the program recognition model, so that the trained program recognition model can determine whether the program is a malicious program based on the program behavior characteristics and signature randomness characteristics of the input program.
[0059] Correspondingly, the program recognition model can be a LightGBM (Light Gradient Boosting Machine, high-performance gradient boosting decision tree) model.
[0060] Among them, Table 1 is a training effect record table of the program recognition model provided by an embodiment of the present invention, which records the accuracy, precision and recall of different types of program recognition models trained using the static features and signature random features of the sample program as sample training data. As shown in Table 1, in the tests using algorithms including CatBoost, XGBoost, LightGBM, logistic regression, MLP (Multilayer Perceptron), KNN (K-NearestNeighbor, nearest neighbor algorithm) and random forest algorithm, the LightGBM model is the best in terms of final test accuracy and training efficiency, so the LightGBM model is selected as the program recognition model.
[0061] Table 1
[0062]
[0063] An embodiment of the present invention provides a method for training a program recognition model, which obtains behavioral feature information and certificate signature information of a sample program, obtains the program behavior features of each sample program based on the behavioral feature information, and obtains the signature randomness features of each sample program based on the certificate signature information, thereby inputting the program behavior features and signature randomness features as sample training data into a program recognition model to train it, so as to obtain a model for malicious program detection based on multiple features, and implements multi-angle feature extraction and recognition of application programs based on machine learning methods, thereby improving the efficiency and accuracy of malicious program detection.
[0064] Embodiment 2
[0065] Figure 2 A flowchart of a program recognition model training method provided for Embodiment 2 of the present invention. The embodiment of the present invention is specific based on the above embodiment, and in the embodiment of the present invention, a specific optional implementation method for obtaining the randomness of the string of the certificate signature information and obtaining the signature randomness characteristics of each sample program is provided.
[0066] like Figure 2 As shown, the method of the embodiment of the present invention specifically includes:
[0067] S210: Obtain behavioral feature information and certificate signature information of each sample program.
[0068] S220: Obtain program behavior characteristics of each of the sample programs according to the behavior characteristic information.
[0069] S230: Obtain the randomness of the character string of the certificate signature information, and obtain the signature randomness characteristics of each of the sample programs.
[0070] In an optional embodiment of the present invention, S230 may specifically include:
[0071] S231. Obtain character string features of each certificate signature information according to a known signature character string.
[0072] The known signature string may include a string that is determined to be a digital signature and / or a string that is determined not to be a digital signature. The string feature may be a feature obtained by distinguishing the character arrangement rule that the certificate signature information complies with based on the character arrangement rule of the known signature string, and may describe whether the string complies with the character arrangement rule that the digital signature determined based on the known signature string should comply with.
[0073] Correspondingly, the character arrangement rule that the digital signature should comply with can be determined through the known signature string, and thus the character string characteristics of the certificate signature information can be determined based on whether the certificate signature information complies with the character arrangement rule.
[0074] Optionally, the known signature character string may include a certain number of collected digital signatures and English words of non-malicious programs, and a certain number of random character strings synthesized by random encoding based on the digital signatures and English words of the non-malicious programs.
[0075] In an optional embodiment of the present invention, obtaining the string features of the certificate signature information based on the known signature string may include: inputting the certificate signature information into a pre-trained feature extraction model to obtain the string features output by the feature extraction model.
[0076] The feature extraction model is obtained by training with the known signature character string as a sample, and is used to obtain the character string features of the input information.
[0077] Accordingly, the feature extraction model can be used to obtain the string features of the certificate signature information. The feature extraction model can be any machine learning model, which is pre-trained using a known signature string as a sample, so that it can learn the character arrangement rules of the known signature string, and then obtain the string features of the input information based on the learned character arrangement rules of the known signature string.
[0078] In an optional embodiment of the present invention, before obtaining the string features of the certificate signature information based on the known signature strings, the method may also include: obtaining a first preset number of known signature strings; marking the string features of each of the known signature strings; inputting the marked known signature strings as samples into a feature extraction model, and training the feature extraction model.
[0079] The trained feature extraction model is used to extract the character string features of the certificate signature information.
[0080] Specifically, the first preset number may be the total number of samples required for training the feature extraction model, which may be determined as needed and is not limited here. Feature marking may be an operation of marking the corresponding string features in each known signature string.
[0081] Accordingly, the known signature string is used as a sample to train the feature extraction model, so that the feature extraction model can learn the character arrangement rules of each string in the known signature string and its corresponding string features. Therefore, when any string is input into the feature extraction model, it can output the string features of the string, that is, it can determine whether the input string meets the features that the digital signature determined according to the known signature string should meet.
[0082] For example, if it is determined that the digital signature of a non-malicious program can use existing English words or original words that conform to the spelling rules of English words, such as the English name of the program operator, the trained feature extraction model can determine whether the input string conforms to the spelling rules of English words, and thus output the corresponding string features.
[0083] In an optional embodiment of the present invention, the obtaining of a first preset number of known signature strings may include: obtaining a second preset number of legal signature strings; performing random encoding processing on the legal signature strings to obtain the second preset number of random strings; determining the legal signature strings and the random strings as the known signature strings; the feature marking of the string features of each of the known signature strings may include: marking legal string features in the legal signature string; marking illegal string features in the random string.
[0084] Among them, the second preset number can be half of the first preset number and can be determined based on the first preset number. The legal signature string can be a string that is determined to be able to be used as a digital signature in an application digital certificate. The random encoding process can be an operation of generating a random string based on the legal signature string. The random string can be a string that is determined not to be able to be used as a digital signature in an application digital certificate, and it does not conform to any specific character arrangement rule. The legal string feature can be used to describe that the string conforms to the character arrangement rule of the legal signature string. The illegal string feature can describe that the string does not conform to the character arrangement rule of the legal signature string.
[0085] Correspondingly, by obtaining a second preset number of legal signature strings and then randomly encoding the legal signature strings to obtain a second preset number of random strings, a training sample can be obtained in which half of the black and white samples are half, so that the model can be trained using the sample to enable the model to learn the corresponding string features of the legal signature strings and random strings and their labels.
[0086] Optionally, the feature extraction model may be a Bi-LSTM (Bidirectional Long Short Term Memory) model.
[0087] For example, Figure 3 A structural diagram of a feature extraction model provided by an embodiment of the present invention. Figure 3 As shown, the first is Input_layer, which can load each training sample into the model. The second is Embedding, which can map each word and each letter into a word vector. For example, when embedding the word Apple, each letter of Apple becomes a 100-dimensional vector, and finally the entire word becomes a 5*100-dimensional vector. The Bi-LSTM model can be trained by combining the information of the input sample in both the forward and backward directions. Dropout is to discard some neurons during the training process to prevent overfitting. Optionally, the value of Dropout is set to 0.5. Dense is used to flatten the vector after obtaining the output vector and enter the fully connected layer, and then get the final Output after passing the activation function TANH of the Activation layer. The Output result can be passed through the Softmax function (normalized exponential function) to get its string features.
[0088] Optionally, the second preset number of legal signature strings may include 370,000 signature values and English words, and then the data is synthesized to generate 370,000 random strings according to random coding, and a total of 740,000 known signature strings are obtained as samples.
[0089] S232: When it is determined that the character string feature is a legal character string feature, the certificate signature information is determined to be a non-random character string, and the signature randomness feature of the sample program corresponding to the certificate signature information is obtained to be a non-random signature.
[0090] Among them, the legal string feature can describe that the string conforms to the character arrangement rule that the digital signature should conform to according to the known signature string. The signature non-randomness can describe that the digital signature of the program is not a randomly generated string.
[0091] Correspondingly, if the string feature is a legal string feature, it can be explained that the certificate signature information conforms to the character arrangement rule that the digital signature determined based on the known signature string should conform to, and it can be determined that it is a non-random string, thereby determining that the digital signature of the corresponding sample program is not randomly generated, that is, its signature randomness feature is a non-random signature.
[0092] In an optional embodiment of the present invention, after obtaining the string feature of the certificate signature information according to the known signature string, it may also include: in the case where it is determined that the string feature is an illegal string feature, matching the certificate signature information in a pre-generated string comparison library; in the case where it is determined that the certificate signature information is successfully matched in the string comparison library, determining that the certificate signature information is a non-random string, and obtaining the signature randomness feature of the sample program corresponding to the certificate signature information is a signature non-random; in the case where it is determined that the certificate signature information fails to match in the string comparison library, determining that the certificate signature information is a random string, and obtaining the signature randomness feature of the sample program corresponding to the certificate signature information is a signature random.
[0093] Among them, the illegal string feature can describe that the string does not conform to the character arrangement rule that the digital signature determined based on the known signature string should conform to. The string comparison library can be a database for storing strings, where the stored strings can include strings that can be used as digital signatures and conform to specific character arrangement rules. Signature randomness can describe that the digital signature of the program is a randomly generated string.
[0094] Correspondingly, if the string feature of the certificate signature information is an illegal string feature, it can be explained that it does not conform to the character arrangement rule that the digital signature determined according to the known signature string should conform to. Since the character arrangement rule determined according to the known signature string does not make all non-random strings conform to it, for example, according to the known signature string composed of English words, only the character arrangement rule of English words can be determined. If the digital signature of the program uses other languages, such as Chinese pinyin, or includes English abbreviations, etc., then according to the character arrangement rule determined by English words, such non-random strings will be misjudged as random strings. Therefore, a string comparison library can be generated in advance, in which strings that conform to specific character arrangement rules are stored. If the certificate signature information is successfully matched in the string comparison library, it can also be explained that the certificate signature information is a non-random string, and the signature randomness feature of the corresponding sample program is signature non-random; if the certificate signature information fails to match in the string comparison library, it can be explained that the certificate signature information does not conform to the specific character arrangement rule, and the certificate signature information is determined to be a random string, and the signature randomness feature of the corresponding sample program is signature random.
[0095] For example, if Chinese pinyin appears in the certificate signature information, such as "CN=wangjun, OU=xindognfang", in this case, the signature content does not belong to English words, and if it is judged according to the character rules of English words, it will be judged as a random string. Therefore, the pinyin of Chinese characters can be constructed into a string comparison library in advance, such as the pinyin of single Chinese characters such as "ai", "wo", and "chen", and then through the greedy algorithm, when a string such as "xindongfang" can be enumerated and matched in the string comparison library, it can be determined to be Chinese pinyin, not a random string. Optionally, the string comparison library can be composed of the pinyin of 408 Chinese characters.
[0096] In the above implementation provided by the embodiment of the present invention, the feature extraction model based on Bi-LSTM model training and the discrimination of pinyin can perfectly judge whether the character string is randomly generated. After testing, the discrimination accuracy is close to 100%. At the same time, the method is applied to the data for testing. Among the 700,000 malicious virus software, more than 500,000 random character strings are detected in the signatures, while among the 110,000 normal software, only more than 1,000 signatures have random character strings. This result confirms the feasibility of the solution.
[0097] S240: Input the program behavior feature and the signature randomness feature as sample training data into a program recognition model to train the program recognition model.
[0098] Figure 4FIG. 1 is a flow chart of a method for training a program recognition model provided by Embodiment 2 of the present invention. In a specific example, Figure 4 As shown, the original sample can be input into the trained feature extraction model to determine whether its certificate signature information is a random string. If it is determined according to the feature extraction model that its certificate signature information is not a random string, then the signature randomness feature of the sample can be directly determined to be a non-random signature. If it is determined according to the feature extraction model that its certificate signature information is a random string, then it can be further determined whether it is pinyin. In the case where it is determined that the certificate signature information is not pinyin either, the signature randomness feature of the sample can be determined to be a random signature. In the case where it is determined that the certificate signature information is pinyin, the signature randomness feature of the sample can be determined to be a non-random signature. Therefore, the signature randomness feature of the sample can be extracted and put into the program recognition model together with the program behavior feature of the sample for model training.
[0099] An embodiment of the present invention provides a method for training a program recognition model, which obtains behavioral feature information and certificate signature information of a sample program, obtains program behavior features of each sample program based on the behavioral feature information, and obtains signature randomness features of each sample program based on the certificate signature information, thereby inputting the program behavior features and signature randomness features as sample training data into a program recognition model to train it, so as to obtain a model for malicious program detection based on multiple features, and implements multi-angle feature extraction and discrimination of application programs based on machine learning methods, thereby improving the efficiency and accuracy of malicious program identification.
[0100] Embodiment 3
[0101] Figure 5 is a flowchart of a program identification method provided by the third embodiment of the present invention. This embodiment is applicable to the case of identifying malicious programs. The method can be executed by the program identification device provided by the embodiment of the present invention. The device can be implemented by software and / or hardware and can generally be integrated in a computer device. Figure 5 As shown, the method includes the following operations:
[0102] S310: Obtain behavioral feature information and certificate signature information of the program to be identified.
[0103] The program to be identified may be any application program that needs to be identified as a malicious program.
[0104] S320: Obtain program behavior characteristics of the program to be identified according to the behavior characteristic information.
[0105] S330: Obtain the randomness of the character string of the certificate signature information to obtain the randomness feature of the signature of the program to be identified.
[0106] S340: Input the program behavior feature and the signature random feature as the detection data of the program to be identified into a program identification model to obtain a program identification result of the program to be identified.
[0107] Wherein, the program recognition model is trained by the program recognition model training method described in any embodiment of the present invention.
[0108] Accordingly, the descriptions used in the embodiments of the present invention have the same meanings as those in any embodiments of the present invention and are not repeated here.
[0109] In an optional embodiment of the present invention, the step of obtaining the string randomness of the certificate signature information to obtain the signature randomness feature of the program to be identified includes: obtaining the string feature of each certificate signature information based on a known signature string; when it is determined that the string feature is a legal string feature, determining that the certificate signature information is a non-random string, and obtaining the signature randomness feature of the program to be identified corresponding to the certificate signature information as a non-random signature.
[0110] In an optional embodiment of the present invention, after obtaining the string feature of the certificate signature information according to the known signature string, it also includes: in the case where it is determined that the string feature is an illegal string feature, matching the certificate signature information in a pre-generated string comparison library; in the case where it is determined that the certificate signature information is successfully matched in the string comparison library, determining that the certificate signature information is a non-random string, and obtaining the signature randomness feature of the program to be identified corresponding to the certificate signature information is a signature non-random; in the case where it is determined that the certificate signature information fails to match in the string comparison library, determining that the certificate signature information is a random string, and obtaining the signature randomness feature of the program to be identified corresponding to the certificate signature information is a signature random.
[0111] In an optional embodiment of the present invention, the step of obtaining the string features of the certificate signature information based on the known signature string includes: inputting the certificate signature information into a pre-trained feature extraction model to obtain the string features output by the feature extraction model; wherein the feature extraction model is trained using the known signature string as a sample, and is used to obtain the string features of the input information.
[0112] In an optional embodiment of the present invention, before obtaining the string features of the certificate signature information based on the known signature strings, it also includes: obtaining a first preset number of known signature strings; feature marking the string features of each of the known signature strings; inputting the known signature strings after the feature marking as samples into a feature extraction model, and training the feature extraction model; wherein the trained feature extraction model is used to extract the string features of the certificate signature information.
[0113] In an optional embodiment of the present invention, the obtaining of a first preset number of known signature strings includes: obtaining a second preset number of legal signature strings; performing random encoding processing on the legal signature strings to obtain the second preset number of random strings; determining the legal signature strings and the random strings as the known signature strings; and marking the string features of each of the known signature strings includes: marking legal string features in the legal signature string; and marking illegal string features in the random string.
[0114] An embodiment of the present invention provides a program identification method, which obtains behavioral feature information and certificate signature information of a program to be identified, obtains program behavior features of the program to be identified based on the behavioral feature information, and obtains signature randomness features of the program to be identified based on the certificate signature information, thereby inputting the program behavior features and signature randomness features into a program identification model to obtain an identification result, and realizes multi-angle feature extraction and identification of application programs based on a machine learning method, thereby improving the efficiency and accuracy of malicious program detection.
[0115] Embodiment 4
[0116] Figure 6 A schematic diagram of the structure of a program recognition model training device provided in Embodiment 4 of the present invention is shown in FIG. Figure 6 As shown, the device includes: a sample information acquisition module 410, a sample behavior feature acquisition module 420, a sample signature feature acquisition module 430 and a program recognition model training module 440.
[0117] The sample information acquisition module 410 is used to acquire the behavior characteristic information and certificate signature information of each sample program.
[0118] The sample behavior feature acquisition module 420 is used to acquire the program behavior feature of each of the sample programs according to the behavior feature information.
[0119] The sample signature feature acquisition module 430 is used to acquire the randomness of the character string of the certificate signature information, and obtain the signature randomness feature of each of the sample programs.
[0120] The program recognition model training module 440 is used to input the program behavior characteristics and the signature randomness characteristics as sample training data into the program recognition model to train the program recognition model.
[0121] In an optional implementation of an embodiment of the present invention, the sample signature feature acquisition module 430 may include: a sample string feature acquisition submodule, used to obtain the string feature of each certificate signature information based on a known signature string; a first sample non-random determination submodule, used to determine that the certificate signature information is a non-random string when the string feature is determined to be a legal string feature, and obtain the signature randomness feature of the sample program corresponding to the certificate signature information as a non-random signature.
[0122] In an optional implementation of the embodiment of the present invention, the sample signature feature acquisition module 430 may also include: a sample signature matching submodule, which is used to match the certificate signature information in a pre-generated string comparison library when it is determined that the string feature is an illegal string feature; a second sample non-random determination submodule, which is used to determine that the certificate signature information is a non-random string when it is determined that the certificate signature information is successfully matched in the string comparison library, and obtain the signature randomness feature of the sample program corresponding to the certificate signature information as signature non-random; a sample random determination submodule, which is used to determine that the certificate signature information is a random string when it is determined that the certificate signature information fails to match in the string comparison library, and obtain the signature randomness feature of the sample program corresponding to the certificate signature information as signature random.
[0123] In an optional implementation of an embodiment of the present invention, the sample string feature acquisition submodule can be specifically used to: input the certificate signature information into a pre-trained feature extraction model to obtain the string features output by the feature extraction model; wherein the feature extraction model is trained using the known signature string as a sample, and is used to obtain the string features of the input information.
[0124] In an optional implementation of an embodiment of the present invention, the sample signature feature acquisition module 430 may also include: a model training submodule, used to obtain a first preset number of known signature strings; feature marking the string features of each of the known signature strings; inputting the known signature strings after the feature marking as samples into a feature extraction model, and training the feature extraction model; wherein the trained feature extraction model is used to extract the string features of the certificate signature information.
[0125] In an optional implementation of an embodiment of the present invention, the model training submodule can be specifically used to: obtain a second preset number of legal signature strings; perform random encoding processing on the legal signature strings to obtain the second preset number of random strings; determine the legal signature strings and the random strings as the known signature strings; mark legal string features in the legal signature strings; and mark illegal string features in the random strings.
[0126] The above-mentioned device can execute the program recognition model training method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the program recognition model training method.
[0127] An embodiment of the present invention provides a program recognition model training device, which obtains behavioral feature information and certificate signature information of a sample program, obtains the program behavior features of each sample program based on the behavioral feature information, and obtains the signature randomness features of each sample program based on the certificate signature information, thereby inputting the program behavior features and signature randomness features as sample training data into a program recognition model to train it, so as to obtain a model for malicious program detection based on multiple features, and implements multi-angle feature extraction and discrimination of application programs based on machine learning methods, thereby improving the efficiency and accuracy of malicious program identification.
[0128] Embodiment 5
[0129] Figure 7 A schematic diagram of the structure of a program identification device provided in Embodiment 5 of the present invention is shown in FIG. Figure 7 As shown, the device includes: an information acquisition module 510 to be identified, a behavior feature acquisition module 520 to be identified, a signature feature acquisition module 530 to be identified, and a program identification module 540.
[0130] The to-be-identified information acquisition module 510 is used to acquire the behavior feature information and certificate signature information of the to-be-identified program.
[0131] The to-be-identified behavior feature acquisition module 520 is used to acquire the program behavior feature of the to-be-identified program according to the behavior feature information.
[0132] The signature feature acquisition module 530 to be identified is used to obtain the randomness of the character string of the certificate signature information to obtain the signature randomness feature of the program to be identified.
[0133] The program identification module 540 is used to input the program behavior characteristics and the signature randomness characteristics as the detection data of the program to be identified into the program identification model to obtain the program identification result of the program to be identified.
[0134] Wherein, the program recognition model is trained by the program recognition model training method described in any embodiment of the present invention.
[0135] In an optional implementation of an embodiment of the present invention, the signature feature acquisition module 530 to be identified may include: a string feature acquisition submodule to be identified, used to obtain the string feature of each certificate signature information based on a known signature string; a first non-random determination submodule to be identified, used to determine that the certificate signature information is a non-random string when the string feature is determined to be a legal string feature, and obtain the signature randomness feature of the program to be identified corresponding to the certificate signature information as a non-random signature.
[0136] In an optional implementation of the embodiment of the present invention, the signature feature acquisition module 530 to be identified may also include: a signature matching submodule to be identified, which is used to match the certificate signature information in a pre-generated string comparison library when it is determined that the string feature is an illegal string feature; a second non-random determination submodule to be identified, which is used to determine that the certificate signature information is a non-random string when it is determined that the certificate signature information is successfully matched in the string comparison library, and obtain the signature randomness feature of the program to be identified corresponding to the certificate signature information as a non-random signature; a random determination submodule to be identified, which is used to determine that the certificate signature information is a random string when it is determined that the certificate signature information fails to match in the string comparison library, and obtain the signature randomness feature of the program to be identified corresponding to the certificate signature information as a random signature.
[0137] In an optional implementation of an embodiment of the present invention, a submodule for acquiring features of a string to be identified can be specifically used to: input the certificate signature information into a pre-trained feature extraction model to obtain the string features output by the feature extraction model; wherein the feature extraction model is trained using the known signature string as a sample, and is used to obtain the string features of the input information.
[0138] In an optional implementation of an embodiment of the present invention, the signature feature acquisition module 530 to be identified may also include: a model training submodule, used to obtain a first preset number of known signature strings; feature marking the string features of each of the known signature strings; inputting the known signature strings after the feature marking as samples into a feature extraction model, and training the feature extraction model; wherein the trained feature extraction model is used to extract the string features of the certificate signature information.
[0139] In an optional implementation of an embodiment of the present invention, the model training submodule can be specifically used to: obtain a second preset number of legal signature strings; perform random encoding processing on the legal signature strings to obtain the second preset number of random strings; determine the legal signature strings and the random strings as the known signature strings; mark legal string features in the legal signature strings; and mark illegal string features in the random strings.
[0140] The above-mentioned device can execute the program identification method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the program identification method.
[0141] An embodiment of the present invention provides a program identification device, which obtains behavioral feature information and certificate signature information of a program to be identified, obtains program behavior features of the program to be identified based on the behavioral feature information, and obtains signature random features of the program to be identified based on the certificate signature information, thereby inputting the program behavior features and signature random features into a program identification model to obtain an identification result, and realizes multi-angle feature extraction and identification of application programs based on machine learning methods, thereby improving the efficiency and accuracy of malicious program detection.
[0142] Embodiment 6
[0143] Figure 8 A schematic diagram of the structure of a computer device provided in Embodiment 6 of the present invention. Figure 8 A block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 8 The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0144] like Figure 8 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors 16, a memory 28, and a bus 18 that connects various system components (including the memory 28 and the processor 16).
[0145] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0146] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0147] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 not shown, usually called a "hard drive"). Although Figure 8 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0148] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0149] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with the other modules of the computer device 12 via the bus 18. It should be understood that although Figure 8Not shown, other hardware and / or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0150] The processor 16 executes various functional applications and data processing by running the program stored in the memory 28 to implement the program recognition model training method provided by the embodiment of the present invention: obtaining the behavior feature information and certificate signature information of each sample program; obtaining the program behavior feature of each sample program according to the behavior feature information; obtaining the string randomness of the certificate signature information to obtain the signature randomness feature of each sample program; inputting the program behavior feature and the signature randomness feature as sample training data into the program recognition model to train the program recognition model; or,
[0151] Program identification method: obtain behavioral characteristic information and certificate signature information of a program to be identified; obtain program behavioral characteristics of the program to be identified based on the behavioral characteristic information; obtain the string randomness of the certificate signature information to obtain the signature randomness characteristics of the program to be identified; input the program behavioral characteristics and the signature randomness characteristics as the detection data of the program to be identified into a program identification model to obtain a program identification result of the program to be identified; wherein the program identification model is trained by the program identification model training method provided in any embodiment of the present invention.
[0152] Embodiment 7
[0153] Embodiment 7 of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program recognition model training method provided by the embodiment of the present invention is implemented: obtaining behavior feature information and certificate signature information of each sample program; obtaining program behavior features of each sample program according to the behavior feature information; obtaining the string randomness of the certificate signature information to obtain the signature randomness features of each sample program; inputting the program behavior features and the signature randomness features as sample training data into a program recognition model to train the program recognition model; or,
[0154] Program identification method: obtain behavioral characteristic information and certificate signature information of a program to be identified; obtain program behavioral characteristics of the program to be identified based on the behavioral characteristic information; obtain the string randomness of the certificate signature information to obtain the signature randomness characteristics of the program to be identified; input the program behavioral characteristics and the signature randomness characteristics as the detection data of the program to be identified into a program identification model to obtain a program identification result of the program to be identified; wherein the program identification model is trained by the program identification model training method provided in any embodiment of the present invention.
[0155] Any combination of one or more computer-readable media can be used. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0156] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0157] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0158] Computer program code for performing the operation of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or computer device. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0159] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A program recognition model training method, characterized in that: include: Obtain behavioral feature information and certificate signature information of each sample program; Acquire program behavior characteristics of each of the sample programs according to the behavior characteristic information; Obtaining the randomness of the character string of the certificate signature information, and obtaining the signature randomness characteristics of each of the sample programs; Inputting the program behavior feature and the signature randomness feature as sample training data into a program recognition model to train the program recognition model; The step of obtaining the randomness of the character string of the certificate signature information and obtaining the signature randomness characteristics of each of the sample programs includes: Obtaining character string features of each of the certificate signature information according to the known signature character string; In the case where it is determined that the character string feature is a legal character string feature, the certificate signature information is determined to be a non-random character string, and the signature randomness feature of the sample program corresponding to the certificate signature information is obtained to be a non-random signature; The step of obtaining the string feature of the certificate signature information according to the known signature string includes: Inputting the certificate signature information into a pre-trained feature extraction model to obtain the string features output by the feature extraction model; The feature extraction model is obtained by training with the known signature character string as a sample, and is used to obtain the character string features of the input information.
2. The method according to claim 1, characterized in that: After obtaining the character string feature of the certificate signature information according to the known signature character string, the method further includes: In the case where it is determined that the character string feature is an illegal character string feature, matching the certificate signature information in a pre-generated character string comparison library; In the case where it is determined that the certificate signature information is successfully matched in the string comparison library, determining that the certificate signature information is a non-random string, and obtaining the signature randomness feature of the sample program corresponding to the certificate signature information as a non-random signature; When it is determined that the certificate signature information fails to match in the string comparison library, the certificate signature information is determined to be a random string, and the signature randomness feature of the sample program corresponding to the certificate signature information is obtained as a random signature.
3. The method according to claim 1, characterized in that Before obtaining the character string feature of the certificate signature information according to the known signature character string, the method further includes: Obtaining a first preset number of known signature strings; Performing feature marking on the character string features of each of the known signature character strings; Inputting the known signature string after the feature marking as a sample into a feature extraction model to train the feature extraction model; The trained feature extraction model is used to extract the character string features of the certificate signature information.
4. The method according to claim 3, characterized in that The step of obtaining a first preset number of known signature strings includes: Obtain a second preset number of legal signature strings; Performing random encoding processing on the legal signature character string to obtain the second preset number of random character strings; Determine the legal signature string and the random string as the known signature string; The step of marking the character string features of each of the known signature character strings includes: Marking a legal string feature in the legal signature string; Illegal character string features are marked in the random character string.
5. A program identification method, characterized in that: include: Obtaining behavioral feature information and certificate signature information of the program to be identified; Acquire program behavior characteristics of the program to be identified according to the behavior characteristic information; Obtaining the randomness of the character string of the certificate signature information to obtain the randomness feature of the signature of the program to be identified; The program behavior characteristics and the signature randomness characteristics are input into a program recognition model as the detection data of the program to be recognized, so as to obtain a program recognition result of the program to be recognized; wherein, the program recognition model is trained by the program recognition model training method described in any one of claims 1-4.
6. A program recognition model training device, characterized in that: include: The sample information acquisition module is used to obtain the behavior characteristic information and certificate signature information of each sample program; A sample behavior feature acquisition module, used to acquire program behavior features of each of the sample programs according to the behavior feature information; A sample signature feature acquisition module, used to acquire the randomness of the character string of the certificate signature information, and obtain the signature randomness feature of each sample program; A program recognition model training module, used for inputting the program behavior characteristics and the signature randomness characteristics as sample training data into a program recognition model to train the program recognition model; The sample signature feature acquisition module includes: A sample character string feature acquisition submodule, used to acquire the character string features of each of the certificate signature information according to the known signature character string; A first sample non-random determination submodule is used to determine that the certificate signature information is a non-random string when the string feature is determined to be a legal string feature, and obtain that the signature randomness feature of the sample program corresponding to the certificate signature information is a signature non-random; The sample character string feature acquisition submodule is specifically used for: Inputting the certificate signature information into a pre-trained feature extraction model to obtain the string features output by the feature extraction model; The feature extraction model is obtained by training with the known signature character string as a sample, and is used to obtain the character string features of the input information.
7. A program recognition device, characterized in that: include: The module for obtaining information to be identified is used to obtain the behavior characteristic information and certificate signature information of the program to be identified; A module for acquiring behavior characteristics to be identified, used for acquiring program behavior characteristics of the program to be identified according to the behavior characteristic information; A signature feature acquisition module to be identified, used to obtain the randomness of the string of the certificate signature information, and obtain the signature randomness feature of the program to be identified; A program identification module is used to input the program behavior characteristics and the signature randomness characteristics as the detection data of the program to be identified into a program identification model to obtain a program identification result of the program to be identified; wherein the program identification model is trained by the program identification model training method described in any one of claims 1-4.
8. A computer device, characterized in that: The computer device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the program recognition model training method as described in any one of claims 1 to 4 or the program recognition method as described in claim 5.
9. A computer storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the program recognition model training method described in any one of claims 1 to 4 or the program recognition method described in claim 5 is implemented.
