Kernel vulnerability mining method, medium, equipment and device based on fuzz testing
By filtering the features of the input cases fed back by the fuzz testing tool, and using the feature extraction model to screen out the feature cases, the problem of low efficiency of traditional fuzz testing is solved and more efficient vulnerability mining is achieved.
Patent Information
- Application Number
- CN202011525263.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-22
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2040-12-22
AI Technical Summary
In the traditional fuzz testing method, input cases are randomly generated, resulting in inefficient fuzz testing. All codes need to be traversed to mutate abnormal data to crash the target device, thereby discovering vulnerabilities.
By filtering the features of the input cases fed back by the fuzz testing tool, using the pre-established feature extraction model to extract feature information from the crash cases, the feature cases are screened out as new input cases, thereby reducing the fuzz testing traversal cycle and improving the vulnerability mining efficiency.
Feature screening reduces the fuzz testing traversal cycle, reduces the workload, improves the efficiency of vulnerability mining, and makes vulnerability detection more efficient.
Smart Images

Figure CN112632557B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vulnerability mining, and in particular to a kernel vulnerability mining method based on fuzzy testing, a computer-readable storage medium, a computer device, and a kernel vulnerability mining device based on fuzzy testing. Background Art
[0002] With the development of science and technology, the security of software and systems has gradually attracted attention, and vulnerability mining and reporting are important links in software and system security. The existing vulnerability mining methods have evolved from static mining, binary mining to dynamic mining and then to dynamic and static mining, making the attack surface of vulnerability mining larger and the efficiency continuously improved.
[0003] In the related technologies, fuzz testing is one of the more efficient mining technologies in dynamic mining; fuzz testing is a mining technology means of gray box testing, which mainly mutates the input and allows it to execute in the program, causing the target device to crash, thereby concluding that the device contains vulnerabilities; by inputting special data into the system, vulnerability mining tools that are allowed to execute have also emerged; they feed back the code coverage of the input execution to show the performance of the tool; however, the input cases of traditional fuzz testing are randomly generated, and the generated input case seeds will traverse all the code runs in the entire fuzz test, and continuously mutate abnormal data to obtain crash information from the target device. This method will make the fuzz test inefficient. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems in the above-mentioned technology to a certain extent. To this end, one purpose of the present invention is to propose a kernel vulnerability mining method based on fuzz testing, by performing feature screening on the input cases fed back by the fuzz testing tool, so as to use the feature cases containing feature information in the crash cases as new input cases, thereby reducing the traversal cycle of the fuzz testing, reducing the workload, and thus improving the efficiency of vulnerability mining.
[0005] A second object of the present invention is to provide a computer-readable storage medium.
[0006] A third object of the present invention is to provide a computer device.
[0007] The fourth object of the present invention is to provide a kernel vulnerability mining device based on fuzzy testing.
[0008] To achieve the above-mentioned purpose, the first aspect of the embodiment of the present invention proposes a kernel vulnerability mining method based on fuzz testing, including the following steps: decompressing the corpus fed back by the fuzz testing tool to obtain test cases in the corpus, wherein the test cases include input cases and crash cases; preprocessing the crash cases and inputting them into a pre-established feature extraction model for training to obtain feature information; preprocessing the input cases and inputting them into the trained feature extraction model so as to filter out feature cases from the input cases according to the feature information; compressing the feature cases to form an input corpus for fuzz testing, and inputting the input corpus into the fuzz testing tool for vulnerability mining.
[0009] According to the kernel vulnerability mining method based on fuzz testing of an embodiment of the present invention, the corpus fed back by the fuzz testing tool is first decompressed to obtain test cases in the corpus, wherein the test cases include input cases and crash cases; then the crash cases are preprocessed and input into a pre-established feature extraction model for training to obtain feature information; then the input cases are preprocessed and input into the trained feature extraction model, so as to filter out feature cases from the input cases according to the feature information; finally, the feature cases are compressed to form an input corpus for fuzz testing, and the input corpus is input into the fuzz testing tool for vulnerability mining; thus, by performing feature screening on the input cases fed back by the fuzz testing tool, the feature cases containing feature information in the crash cases are used as new input cases, thereby reducing the traversal cycle of the fuzz testing, reducing the workload, and thus improving the efficiency of vulnerability mining.
[0010] In addition, the kernel vulnerability mining method based on fuzz testing proposed in the above embodiment of the present invention may also have the following additional technical features:
[0011] Optionally, the corpus fed back by the fuzz testing tool is decompressed to obtain test cases in the corpus, including: using the fuzz testing tool to mine vulnerabilities in the target device and obtaining the corpus fed back by the fuzz testing tool; using a decompression tool to decompress the corpus fed back by the fuzz testing tool to obtain test cases in the corpus.
[0012] Optionally, the crash case is preprocessed and then input into a pre-established feature extraction model for training to obtain feature information, including: taking the name of the system call in the crash case as a word unit to form a word sequence; one-hot encoding the word sequence to obtain a word sequence corpus, and vectorizing the word sequence corpus to obtain a vector set; inputting the vector set into a pre-established feature extraction model for training to obtain a feature vector table; converting the feature vector table into a word sequence consisting of the name of the system call, and using the word sequence consisting of the name of the system call as feature information for screening out feature cases.
[0013] Optionally, the characteristic cases are compressed to form an input corpus for fuzz testing, and the input corpus is input into a fuzz testing tool to perform vulnerability mining, including: using a compression tool to compress the characteristic cases to form an input corpus for fuzz testing; inputting the input corpus into a fuzz testing tool, and performing fuzz testing using the input corpus as a mutation seed to complete vulnerability mining.
[0014] To achieve the above-mentioned objectives, the second aspect of the present invention proposes a computer-readable storage medium on which a kernel vulnerability mining program based on fuzz testing is stored. When the kernel vulnerability mining program based on fuzz testing is executed by a processor, the kernel vulnerability mining method based on fuzz testing as described above is implemented.
[0015] According to the computer-readable storage medium of an embodiment of the present invention, by storing a kernel vulnerability mining program based on fuzz testing, the kernel vulnerability mining program based on fuzz testing implements the kernel vulnerability mining method based on fuzz testing as described above when executed by a processor, thereby reducing the traversal loop of the fuzz testing, reducing the workload, and thereby improving the efficiency of vulnerability mining.
[0016] To achieve the above-mentioned purpose, the third aspect of the present invention proposes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the kernel vulnerability mining method based on fuzzy testing as described above is implemented.
[0017] According to the computer device of an embodiment of the present invention, a kernel vulnerability mining program based on fuzz testing is stored in a memory, so that when the kernel vulnerability mining program based on fuzz testing is executed by a processor, the above-mentioned kernel vulnerability mining method based on fuzz testing is implemented, thereby reducing the traversal cycle of the fuzz test, reducing the workload, and thus improving the efficiency of vulnerability mining.
[0018] To achieve the above-mentioned purpose, the fourth aspect of the embodiment of the present invention proposes a kernel vulnerability mining device based on fuzz testing, including: a decompression module, used to decompress the corpus fed back by the fuzz testing tool to obtain test cases in the corpus, wherein the test cases include input cases and crash cases; a training module, used to pre-process the crash cases and input them into a pre-established feature extraction model for training to obtain feature information; a screening module, used to pre-process the input cases and input them into the trained feature extraction model so as to filter out feature cases from the input cases according to the feature information; a vulnerability mining module, used to compress the feature cases to form an input corpus for fuzz testing, and input the input corpus into the fuzz testing tool for vulnerability mining.
[0019] According to the kernel vulnerability mining device based on fuzz testing of the embodiment of the present invention, the corpus fed back by the fuzz testing tool is decompressed by a decompression module to obtain test cases in the corpus, wherein the test cases include input cases and crash cases, and the crash cases are pre-processed by a training module and input into a pre-established feature extraction model for training to obtain feature information, and then the input cases are pre-processed by a screening module and input into the trained feature extraction model so as to screen out feature cases from the input cases according to the feature information, and finally the feature cases are compressed by a vulnerability mining module to form an input corpus for fuzz testing, and the input corpus is input into the fuzz testing tool for vulnerability mining; thus, by performing feature screening on the input cases fed back by the fuzz testing tool, the feature cases containing feature information in the crash cases are used as new input cases, thereby reducing the traversal cycle of the fuzz test, reducing the workload, and thus improving the efficiency of vulnerability mining.
[0020] In addition, the kernel vulnerability mining device based on fuzzy testing proposed in the above embodiment of the present invention may also have the following additional technical features:
[0021] Optionally, the decompression module is also used to use a fuzz testing tool to mine vulnerabilities in the target device and obtain a corpus fed back by the fuzz testing tool; and use a decompression tool to decompress the corpus fed back by the fuzz testing tool to obtain test cases in the corpus.
[0022] Optionally, the training module is also used to use the names of the system calls in the crash cases as word units to form a word sequence; one-hot encode the word sequence to obtain a word sequence corpus, and vectorize the word sequence corpus to obtain a vector set; input the vector set into a pre-established feature extraction model for training to obtain a feature vector table; convert the feature vector table into a word sequence consisting of the names of the system calls, and use the word sequence consisting of the names of the system calls as feature information for screening out feature cases.
[0023] Optionally, the vulnerability mining module is also used to compress the feature cases using a compression tool to form an input corpus for fuzzy testing; input the input corpus into a fuzzy testing tool, and use the input corpus as a mutation seed for fuzzy testing to complete vulnerability mining. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of a process of a kernel vulnerability mining method based on fuzz testing according to an embodiment of the present invention;
[0025] Figure 2 A schematic diagram of the system structure of a kernel vulnerability mining method based on fuzz testing according to an embodiment of the present invention;
[0026] Figure 3 A schematic diagram of a process of generating a corpus of test cases through fuzz testing in a kernel vulnerability mining method based on fuzz testing according to an embodiment of the present invention;
[0027] Figure 4 A schematic diagram of a flow chart of processing a corpus by a natural language processing method in a kernel vulnerability mining method based on fuzz testing according to an embodiment of the present invention;
[0028] Figure 5 A schematic diagram of the process of compressing processed feature cases into a corpus and fuzzy testing in a kernel vulnerability mining method based on fuzzy testing according to an embodiment of the present invention;
[0029] Figure 6 The figure is a block diagram of a kernel vulnerability mining device based on fuzz testing according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0031] In the related art, the input cases in the traditional fuzz testing method are randomly generated. The generated input case seeds will continuously mutate abnormal data after the entire fuzz test will traverse all the codes and run, so as to obtain crash information from the target device. The efficiency of fuzz testing is very low under such working mode. If the test cases obtained by the fuzz test running feedback are subjected to feature screening, and the cases containing the features of the crash cases are used as input, the traversal cycle of the test can be reduced, the workload can be reduced, and the purpose of improving the mining efficiency can be achieved. To this end, the present invention proposes a kernel vulnerability mining method based on fuzz testing. First, the corpus fed back by the fuzz testing tool is decompressed to obtain the test cases in the corpus. The cases include input cases and crash cases; the crash cases are then preprocessed and input into a pre-established feature extraction model for training to obtain feature information; the input cases are then preprocessed and input into the trained feature extraction model so as to screen out feature cases from the input cases based on the feature information; finally, the feature cases are compressed to form an input corpus for fuzz testing, and the input corpus is input into a fuzz testing tool for vulnerability mining; thus, feature screening is performed on the input cases fed back by the fuzz testing tool so as to use the feature cases containing feature information in the crash cases as new input cases, thereby reducing the traversal cycles of the fuzz testing and reducing the workload, thereby improving the efficiency of vulnerability mining.
[0032] In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0033] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0034] Figure 1 FIG. 4 is a flow chart of a kernel vulnerability mining method based on fuzzy testing according to an embodiment of the present invention; Figure 1 As shown, the kernel vulnerability mining method based on fuzzy testing in an embodiment of the present invention includes the following steps:
[0035] Step 101, decompress the corpus fed back by the fuzz testing tool to obtain test cases in the corpus, wherein the test cases include input cases and crash cases.
[0036] As an example, a fuzz testing tool is first used to mine vulnerabilities in a target device and a corpus fed back by the fuzz testing tool is obtained; then a decompression tool is used to decompress the corpus fed back by the fuzz testing tool to obtain test cases in the corpus.
[0037] That is to say, the target device is first mined for vulnerabilities through fuzz testing, and then the corpus returned by the test results is obtained. Then the corpus is processed and the corpus fed back by the fuzz testing tool is decompressed using a decompression tool to obtain the test cases in the corpus.
[0038] Step 102 , the crash case is pre-processed and then input into a pre-established feature extraction model for training to obtain feature information.
[0039] As an example, first, the names of system calls in crash cases are taken as word units to form word sequences; the word sequences are one-hot encoded to obtain a word sequence corpus, and the word sequence corpus is vectorized to obtain a vector set; the vector set is input into a pre-established feature extraction model for training to obtain a feature vector table; the feature vector table is converted into a word sequence consisting of the names of system calls, thereby completing the preprocessing of the crash cases; and then the word sequence consisting of the names of system calls is used as feature information for filtering out feature cases, thereby obtaining feature information.
[0040] As an embodiment, the feature extraction model may be a neural network language model (NNLM), which is not specifically limited in the present invention.
[0041] Step 103, pre-processing the input cases and then inputting them into the trained feature extraction model, so as to filter out feature cases from the input cases according to feature information.
[0042] It should be noted that the preprocessing of the input case here is the same as the preprocessing of the crash case mentioned above.
[0043] That is to say, the input case is used as a test set, and after the same preprocessing as the crash case, it is input into the trained feature extraction model for feature information matching, so as to obtain feature cases that meet the feature information in the input case.
[0044] Step 104, compressing the characteristic cases to form an input corpus for fuzz testing, and inputting the input corpus into the fuzz testing tool to perform vulnerability mining.
[0045] As an example, a compression tool is used to compress feature cases to form an input corpus for fuzz testing; the input corpus is input into the fuzz testing tool, and the input corpus is used as a mutation seed for fuzz testing to complete vulnerability mining.
[0046] That is to say, after the corpus obtained as feedback of the fuzz test results is processed, it is placed back into the working environment of the fuzz test, and then the fuzz test is started, so that the processed corpus is mutated as the input of the fuzz test, thereby increasing the rate at which the fuzz test generates crashes.
[0047] In summary, the present invention trains and selectively screens the test cases fed back after the fuzz test is executed, thereby selecting characteristic cases with crash cases as input cases for further fuzz testing, and defining the basis of mutation as characteristic cases based on a certain type of crash case. This makes the process of vulnerability mining for the target device through the fuzz testing tool more efficient.
[0048] In order to further illustrate the technical solution of the present invention, a specific embodiment is described below, wherein: Figure 2-5 As shown in FIG. 1 , this example is a kernel vulnerability mining method based on the feedback of the fuzz testing tool syzkaller; Figure 3 As shown in FIG. 1 , the specific steps of generating a corpus of input cases and crash cases through fuzz testing include:
[0049] Step 201, randomly generate an input case (program) according to the description file of the system call (syscalls), and use it as a seed file for the test.
[0050] That is to say, the input cases of this fuzz test are randomly generated.
[0051] As a specific embodiment, when executing fuzz testing, a random input case is generated according to the following template and the description of the system call, and this input case is input into the fuzz testing process to become a seed for subsequent mutation; the template for generating the input case is as follows:
[0052] 1. assignSyscallNumbers: assign system call numbers, detect unsupported system calls and discard them;
[0053] 2.patchConsts: patch the constants in AST to the corresponding values;
[0054] 3.check: perform semantic check on AST;
[0055] 4.genSyscalls: Generate prog object from AST;
[0056]
[0057] Step 202, randomly mutate the input case, and then input the mutated input case into the fuzzy testing system.
[0058] As a specific embodiment, the generated seed case file will be mutated according to the mutation method therein during the execution of the fuzzy testing system, and the mutation method includes:
[0059] 1. Slice insertion: clone a system call tile to the middle of the original one and then remove the second half of the tile.
[0060] 2. System call insertion: Insert system call.
[0061] 3. Parameter variation: The system call input parameters are mutated differently according to their types.
[0062] Step 203: If the input case can generate new coverage for the code, the input case is added to the corpus; if the input case causes a crash during the fuzz test, its related log information and crash case are generated in its working environment.
[0063] like Figure 4 As shown, it is a schematic diagram of the process of extracting features after obtaining the corpus fed back by the fuzzy testing tool in the present invention; specifically, it includes the following steps:
[0064] Step 301, decompress the generated corpus file to obtain the input cases and the generated crash cases after execution.
[0065] It should be noted that the corpus file obtained through fuzz testing needs to be decompressed into a test case file through the decompression tool in the fuzz test. The test case file contains the executed input cases and the generated crash cases; the crash cases are mainly several major types of vulnerabilities: use-after-free and out-of-bounds vulnerability types.
[0066] Step 302: Input the crash cases as sample sets into the feature extraction model to extract their feature conditions.
[0067] 1. Treat the system call names in the crash cases as word units and perform one-hot encoding; convert each crash case into a word vector.
[0068] 2. Multiply the word vector by the word embedding matrix, perform correlation encoding, and form a corresponding special word vector group.
[0069] 3. Take the word vector group as input, train the feature extraction model, and extract the feature vector table of the corresponding crash features from it.
[0070] 4. According to the obtained feature vector table, filter the input cases and select the feature cases that meet the crash characteristics.
[0071] The feature extraction model can be expressed by the following formula:
[0072]
[0073] where w t is the nth system service name in the input case, It is a sub-vector sequence representing the name of the first system service to the name of the t-th system service. The model is calculated by counting the probability of the t-th system service appearing under the influence of the first t-1 system services.
[0074] Step 303, based on the extracted characteristic conditions, the input cases are taken as input, and characteristic cases that meet the characteristic conditions are extracted from the input cases.
[0075] Step 304, compressing the extracted feature cases through a compression tool into a corpus that can be run by the fuzz testing system.
[0076] It should be noted that the feature extraction model is a neural network language module. By integrating the natural language processing algorithm into the vulnerability mining process, feature cases suspected of containing feature information of crash cases are selected, and a new corpus is reconstructed for fuzz testing.
[0077] like Figure 5 As shown, it is a schematic diagram of the process of compressing the processed feature cases into a corpus for fuzzy testing in the present invention; specifically, it includes the following steps:
[0078] Step 401, input the compressed corpus file into the fuzzy testing system.
[0079] Step 402, the fuzzy testing system determines whether the input is contained and uses the input as a mutation seed.
[0080] Step 403: After the fuzz testing system is executed, the generated crash test case and crash log are loaded into the working area "workdir".
[0081] In summary, according to the kernel vulnerability mining method based on fuzz testing of an embodiment of the present invention, the corpus fed back by the fuzz testing tool is first decompressed to obtain test cases in the corpus, wherein the test cases include input cases and crash cases; then the crash cases are preprocessed and input into a pre-established feature extraction model for training to obtain feature information; then the input cases are preprocessed and input into the trained feature extraction model, so as to filter out feature cases from the input cases according to the feature information; finally, the feature cases are compressed to form an input corpus for fuzz testing, and the input corpus is input into the fuzz testing tool for vulnerability mining; thus, by performing feature screening on the input cases fed back by the fuzz testing tool, the feature cases containing feature information in the crash cases are used as new input cases, thereby reducing the traversal cycle of the fuzz test, reducing the workload, and thereby improving the efficiency of vulnerability mining.
[0082] In addition, an embodiment of the present invention further proposes a computer-readable storage medium on which a kernel vulnerability mining program based on fuzz testing is stored. When the kernel vulnerability mining program based on fuzz testing is executed by a processor, the kernel vulnerability mining method based on fuzz testing as described above is implemented.
[0083] According to the computer-readable storage medium of an embodiment of the present invention, by storing a kernel vulnerability mining program based on fuzz testing, the kernel vulnerability mining program based on fuzz testing implements the kernel vulnerability mining method based on fuzz testing as described above when executed by a processor, thereby reducing the traversal loop of the fuzz testing, reducing the workload, and thereby improving the efficiency of vulnerability mining.
[0084] In addition, an embodiment of the present invention also proposes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the kernel vulnerability mining method based on fuzzy testing as described above is implemented.
[0085] According to the computer device of an embodiment of the present invention, a kernel vulnerability mining program based on fuzz testing is stored in a memory, so that when the kernel vulnerability mining program based on fuzz testing is executed by a processor, the above-mentioned kernel vulnerability mining method based on fuzz testing is implemented, thereby reducing the traversal cycle of the fuzz test, reducing the workload, and thus improving the efficiency of vulnerability mining.
[0086] Figure 6 FIG. 1 is a block diagram of a kernel vulnerability mining device based on fuzzy testing according to an embodiment of the present invention. Figure 6 As shown, the kernel vulnerability mining device based on fuzz testing includes: a decompression module 501, a training module 502, a screening module 503 and a vulnerability mining module 504.
[0087] Among them, the decompression module 501 is used to decompress the corpus fed back by the fuzz testing tool to obtain test cases in the corpus, wherein the test cases include input cases and crash cases; the training module 502 is used to pre-process the crash cases and input them into a pre-established feature extraction model for training to obtain feature information; the screening module 503 is used to pre-process the input cases and input them into the trained feature extraction model so as to screen out feature cases from the input cases according to the feature information; the vulnerability mining module 504 is used to compress the feature cases to form an input corpus for fuzz testing, and input the input corpus into the fuzz testing tool for vulnerability mining.
[0088] As an embodiment, the above-mentioned decompression module 501 is also used to use a fuzz testing tool to mine vulnerabilities in the target device and obtain a corpus fed back by the fuzz testing tool; and use a decompression tool to decompress the corpus fed back by the fuzz testing tool to obtain test cases in the corpus.
[0089] As an embodiment, the above-mentioned training module 502 is also used to use the names of system calls in crash cases as word units to form word sequences; one-hot encode the word sequences to obtain a word sequence corpus, and vectorize the word sequence corpus to obtain a vector set; input the vector set into a pre-established feature extraction model for training to obtain a feature vector table; convert the feature vector table into a word sequence composed of the names of system calls, and use the word sequence composed of the names of system calls as feature information for screening out feature cases.
[0090] As an embodiment, the above-mentioned vulnerability mining module 504 is also used to compress feature cases using a compression tool to form an input corpus for fuzzy testing; input the input corpus into the fuzzy testing tool, and use the input corpus as a mutation seed for fuzzy testing to complete vulnerability mining.
[0091] It should be noted that the above explanations and descriptions of the embodiment of the kernel vulnerability mining method based on fuzz testing are also applicable to the kernel vulnerability mining device based on fuzz testing of this embodiment, and will not be repeated here.
[0092] In summary, according to the kernel vulnerability mining device based on fuzz testing of an embodiment of the present invention, the corpus fed back by the fuzz testing tool is decompressed by a decompression module to obtain test cases in the corpus, wherein the test cases include input cases and crash cases, and the crash cases are pre-processed by a training module and input into a pre-established feature extraction model for training to obtain feature information, and then the input cases are pre-processed by a screening module and input into the trained feature extraction model so as to screen out feature cases from the input cases according to the feature information, and finally the feature cases are compressed by a vulnerability mining module to form an input corpus for fuzz testing, and the input corpus is input into the fuzz testing tool for vulnerability mining; thus, by performing feature screening on the input cases fed back by the fuzz testing tool, the feature cases containing feature information in the crash cases are used as new input cases, thereby reducing the traversal cycle of the fuzz test, reducing the workload, and thereby improving the efficiency of vulnerability mining.
[0093] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0094] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or 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 processes in the flowchart and / or block diagram. 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.
[0095] 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 including 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.
[0096] 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.
[0097] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claim. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0098] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0099] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
[0100] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0101] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0102] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0103] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms should not be understood as necessarily referring to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0104] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A kernel vulnerability mining method based on fuzz testing, characterized in that: The following steps are involved: Decompressing the corpus fed back by the fuzz testing tool to obtain test cases in the corpus, wherein the test cases include input cases and crash cases; Preprocessing the crash case and inputting it into a pre-established feature extraction model for training to obtain feature information; Preprocessing the input cases and inputting them into a trained feature extraction model, so as to select feature cases from the input cases according to the feature information; The characteristic cases are compressed to form an input corpus for fuzz testing, and the input corpus is input into a fuzz testing tool to perform vulnerability mining.
2. The kernel vulnerability mining method based on fuzz testing according to claim 1, characterized in that: Decompress the corpus fed back by the fuzz testing tool to obtain the test cases in the corpus, including: Use fuzz testing tools to mine vulnerabilities on the target device and obtain the corpus of fuzz testing tool feedback; A decompression tool is used to decompress the corpus fed back by the fuzz testing tool to obtain test cases in the corpus.
3. The kernel vulnerability mining method based on fuzz testing according to claim 1, characterized in that: The crash case is pre-processed and then input into a pre-established feature extraction model for training to obtain feature information, including: Using the name of the system call in the crash case as a word unit to form a word sequence; One-hot encoding is performed on the word sequence to obtain a word sequence corpus, and vectorization is performed on the word sequence corpus to obtain a vector set; Inputting the vector set into a pre-established feature extraction model for training to obtain a feature vector table; The feature vector table is converted into a word sequence consisting of the names of the system calls, and the word sequence consisting of the names of the system calls is used as feature information for filtering out feature cases.
4. The kernel vulnerability mining method based on fuzz testing according to claim 1, characterized in that: The characteristic cases are compressed to form an input corpus for fuzz testing, and the input corpus is input into a fuzz testing tool to perform vulnerability mining, including: Using a compression tool to compress the characteristic cases to form an input corpus for fuzzy testing; The input corpus is input into a fuzz testing tool, and the input corpus is used as a mutated seed for fuzz testing to complete vulnerability mining.
5. A computer-readable storage medium, characterized in that: A kernel vulnerability mining program based on fuzz testing is stored thereon, and when the kernel vulnerability mining program based on fuzz testing is executed by a processor, the kernel vulnerability mining method based on fuzz testing as described in any one of claims 1-4 is implemented.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the kernel vulnerability mining method based on fuzz testing as described in any one of claims 1 to 4 is implemented.
7. A kernel vulnerability mining device based on fuzz testing, characterized in that: include: A decompression module, used for decompressing the corpus fed back by the fuzz testing tool to obtain test cases in the corpus, wherein the test cases include input cases and crash cases; A training module, used for pre-processing the crash case and inputting it into a pre-established feature extraction model for training to obtain feature information; A screening module, used for pre-processing the input cases and inputting them into a trained feature extraction model, so as to screen out feature cases from the input cases according to the feature information; The vulnerability mining module is used to compress the characteristic cases to form an input corpus for fuzz testing, and input the input corpus into the fuzz testing tool to perform vulnerability mining.
8. The kernel vulnerability mining device based on fuzz testing according to claim 7, characterized in that: The decompression module is also used to use a fuzz testing tool to mine vulnerabilities in a target device and obtain a corpus fed back by the fuzz testing tool; and use a decompression tool to decompress the corpus fed back by the fuzz testing tool to obtain test cases in the corpus.
9. The kernel vulnerability mining device based on fuzz testing according to claim 7, characterized in that: The training module is also used to use the names of the system calls in the crash cases as word units to form a word sequence; one-hot encode the word sequence to obtain a word sequence corpus, and vectorize the word sequence corpus to obtain a vector set; input the vector set into a pre-established feature extraction model for training to obtain a feature vector table; convert the feature vector table into a word sequence composed of the names of the system calls, and use the word sequence composed of the names of the system calls as feature information for screening out feature cases.
10. The kernel vulnerability mining device based on fuzz testing according to claim 7, characterized in that: The vulnerability mining module is also used to compress the characteristic cases using a compression tool to form an input corpus for fuzzy testing; input the input corpus into a fuzzy testing tool, and use the input corpus as a mutation seed for fuzzy testing to complete vulnerability mining.
