Dynamic monitoring protocol custom fuzzy test method and device
Customizing the fuzz testing method through the dynamic monitoring protocol, using the test data generation network and simulated data services, solves the problems of unstable training and low generation diversity of the generative adversarial network in fuzz testing, and achieves more efficient fuzz testing performance and code Coverage.
Patent Information
- Application Number
- CN202410767397.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Generative adversarial networks are prone to problems such as unstable training, slow convergence, and low generation diversity during fuzz testing. Moreover, traditional technology is difficult to guide test case generation, affecting fuzz testing performance.
Use the dynamic monitoring protocol to customize the fuzz testing method, generate multiple rounds of test data through the test data generation network, combine the text recognition sub-network and the data generation sub-network to simulate data service interception and data tampering, and generate corresponding types of fuzz testing exception certificates. And monitor abnormal parameter information.
It improves the code coverage and running status monitoring of fuzz testing, enhances the efficiency and diversity of test case generation, and improves the performance and accuracy of fuzz testing.
Smart Images

Figure CN118536113A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of deep generative network technology, and in particular to a custom fuzzy testing method and device for a dynamic monitoring protocol. Background Art
[0002] Fuzz testing is an important method in the field of vulnerability mining. Most of the popular fuzz testing tools currently have good vulnerability discovery capabilities, so fuzz testing has received widespread attention in both practice and research. Mutation-based fuzz testing generates test data by changing the content of the seed file. For the seed file, the fuzz testing tool obtains a new seed by performing bit flipping, mathematical addition and subtraction, insertion and deletion, splicing, and other operations on the sample, traversing more program execution paths to achieve higher code coverage, thereby discovering more possible vulnerabilities in the program;
[0003] Fuzz testing is a method of automatically or semi-automatically providing unexpected inputs and discovering vulnerabilities in actual software implementations by monitoring abnormal results. The concept of fuzz testing was first proposed by Professor Barton Miller of the University of Wisconsin Madison and his students. In his advanced operating system course, he implemented a simple and primitive fuzzer to test the robustness of the UNIX system. Since 2006, fuzz testing technology has made great progress in the field of software detection. In 2007, wushi from the team509 security team discovered an overflow vulnerability in QQ through fuzz testing technology. Wushi informed the Tencent security team of the details of the vulnerability in accordance with the "responsible vulnerability disclosure process". For this purpose, Tencent also issued a special security announcement. In 2008, Godefroid and others used the fuzzing tool SAGE to discover more than 20 unknown vulnerabilities in large Windows applications. In recent years, some open source fuzzers and fuzz testing frameworks have gradually matured, such as American fuzzy lop, Peach, Sulley, etc., which have achieved remarkable results in the field of discovering software vulnerabilities. Fuzz testing has obviously become an important means and testing method for discovering software vulnerabilities. However, efficiently generating fuzzy data and accurately monitoring abnormal monitoring modules in real time have always been difficult to implement fuzz testing tools.
[0004] In coverage-guided fuzz testing, the fuzzer first stores seeds in a queue. Each execution of the seeds triggers a unique execution path of the target program. Then, it achieves better fuzz testing performance by allocating mutation energy to these seeds. Many studies have pointed out that seeds have different efficiencies in generating interesting test cases (i.e., test cases that can trigger new unique execution paths or crashes on the target program). Due to the different characteristics of the target program under test, using a single indicator to guide fuzz testing may not necessarily produce good results.
[0005] However, generative adversarial networks are prone to problems such as unstable training, slow convergence, and low generation diversity during training. Moreover, traditional generative adversarial network-based technologies can only use random vectors as input to the generator, and the generation process of test cases is difficult to guide. These shortcomings restrict the performance of generative adversarial network technology when used for fuzz testing. In view of this, we propose a custom fuzz testing method and device for dynamic monitoring protocols. Summary of the invention
[0006] The purpose of the present invention is to provide a method and device for dynamically monitoring a protocol customized fuzzy testing to solve the problems raised in the above-mentioned background technology.
[0007] In view of this, the present invention provides a custom fuzzy testing method for dynamic monitoring protocol, the method comprising:
[0008] The text to be processed is processed by a test data generation network to generate a first round of test data set for fuzz testing of the object to be tested, wherein the test data generation network includes a text recognition subnetwork and a data generation subnetwork, and the object to be tested is an executable object corresponding to the text to be processed;
[0009] Intercepting the real-time data of the target interface of the application to be tested through the simulated data service, and sending the real-time data to the fuzz testing service;
[0010] According to the test data set and the test data generation network, multiple rounds of fuzz testing are performed on the object under test to obtain intermediate test results of the multiple rounds of fuzz testing, wherein the intermediate test results include code coverage and the running state of the object under test, and the running state includes a normal state and an abnormal state;
[0011] The real-time data is tampered with according to the data tampering strategy corresponding to the target interface by the fuzzy test service to obtain tampered data, wherein the data tampering strategy is a default strategy or a strategy configured by a user through a configuration interface, and the data tampering strategy also includes multiple tampering rules and a weight value corresponding to each tampering rule;
[0012] Returning the tampered data to the simulation data service through the fuzzy test service, so that the simulation data service returns the data received from the fuzzy test service to the application to be tested through the target interface;
[0013] The method comprises: performing feature extraction on the text to be processed through the text recognition sub-network adjusted for multiple rounds to obtain feature information of multiple target objects in the text to be processed;
[0014] According to the feature information of the multiple target objects, a multiple round test data set for fuzzy testing of the tested objects is generated through multiple rounds of adjusted data generation sub-networks;
[0015] Generate a corresponding type of fuzz testing exception certificate by testing the application type;
[0016] Extract the API of the certificate verification module of the detected terminal;
[0017] According to the API, the fuzzy test anomaly certificate is imported into the detected terminal and executed;
[0018] Monitor and record abnormal parameter information generated by the detected terminal and output a report.
[0019] In the above technical solution, further, when generating a corresponding type of fuzzy test anomaly certificate, fuzzy data is generated for each field in the fuzzy test anomaly certificate.
[0020] In the above technical solution, further, in the same fuzzy test exception certificate, all permutations and combinations of fuzzy data corresponding to each field are included.
[0021] In the above technical solution, further, according to the test data set and the running state of the object under test during the fuzzy test, the network parameters of the test data generation network are adjusted to obtain an adjusted test data generation network.
[0022] Dynamic monitoring protocol custom fuzz testing device, including:
[0023] A memory, used for storing the generated data;
[0024] The data set generation module is used to obtain the training data set based on the original test cases;
[0025] A processor, for performing calculations on the generated data;
[0026] A construction module is used to construct a generative adversarial network model of a differential autoencoder; the training data set is input into the generative adversarial network model for training to obtain a trained generative adversarial network model;
[0027] A generation module is used to input the training data set into the trained generative adversarial network model to generate test cases.
[0028] In the above technical solution, further, in the construction module, the generative adversarial network model includes an encoder, a generator, a decoder, a discriminator and a classifier, wherein the generator serves as a decoder of the generative adversarial network model.
[0029] In the above technical solution, further, in the construction module, a generative adversarial network model of the differential autoencoder is constructed.
[0030] In the above technical solution, further, the memory is an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device or any suitable combination of the above.
[0031] In this technical solution,
[0032] The beneficial effects of the present invention are:
[0033] 1. The method and device for customizing fuzz testing of a dynamic monitoring protocol, through a test data generation network, processes the text to be processed to generate the first round of test data set for fuzz testing the object to be tested, the test data generation network includes a text recognition subnetwork and a data generation subnetwork, and the object to be tested is an executable object corresponding to the text to be processed; the real-time data of the target interface of the application to be tested is intercepted by the simulation data service, and the real-time data is sent to the fuzz testing service; according to the test data set and the test data generation network, multiple rounds of fuzz testing are performed on the object to be tested to obtain intermediate test results of multiple rounds of fuzz testing, the intermediate test results include code coverage and the running status of the object to be tested, and the running status includes a normal state and an abnormal state; the real-time data is tampered with by the fuzz testing service according to the data tampering strategy corresponding to the target interface to obtain tampered data, the data tampering strategy is a default strategy or a strategy configured by a user through a configuration interface, and the data tampering strategy also includes multiple tampering rules and weight values corresponding to each tampering rule.
[0034] 2. The dynamic monitoring protocol customized fuzzy testing method and device, through the fuzzy testing service, returns the tampered data to the simulation data service, so that the simulation data service returns the data received from the fuzzy testing service to the application to be tested through the target interface; the test data generation network after multiple rounds of adjustment processes the text to be processed to generate multiple rounds of test data sets for fuzzy testing of the object to be tested, including: through the text recognition subnetwork after multiple rounds of adjustment, feature extraction is performed on the text to be processed to obtain feature information of multiple target objects in the text to be processed; according to the feature information of the multiple target objects, through the data generation subnetwork after multiple rounds of adjustment, multiple rounds of test data sets for fuzzy testing of the object to be tested are generated; according to the test application type, a corresponding type of fuzzy test exception certificate is generated; the API of the certificate verification module of the detected terminal is extracted; according to the API, the fuzzy test exception certificate is imported into the detected terminal and runs; monitoring and recording the abnormal parameter information generated by the detected terminal and outputting a report. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is one of the flow diagrams of the present invention;
[0036] Figure 2 This is the second schematic flow diagram of the present invention. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0038] In the description of the present application, it should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit the exemplary embodiments according to the present application. For ease of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship. The technology, methods and equipment known to ordinary technicians in the relevant field may not be discussed in detail, but in appropriate cases, the technology, methods and equipment should be regarded as part of the authorization specification. In all examples shown and discussed here, any specific value should be interpreted as merely exemplary, rather than as a limitation. Therefore, other examples of the exemplary embodiments may have different values. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0039] It should be noted that, in the present application, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0040] Embodiment 1:
[0041] See also Figure 1-Figure 2 As shown, this embodiment provides a custom fuzzy testing method for dynamic monitoring protocols.
[0042] The method includes:
[0043] The text to be processed is processed through the test data generation network to generate the first round of test data set for fuzz testing of the object to be tested. The test data generation network includes a text recognition subnetwork and a data generation subnetwork. The object to be tested is an executable object corresponding to the text to be processed;
[0044] Intercept the real-time data of the target interface of the application to be tested through the simulated data service and send the real-time data to the fuzz testing service;
[0045] According to the test data set and the test data generation network, multiple rounds of fuzz testing are performed on the object under test to obtain intermediate test results of the multiple rounds of fuzz testing. The intermediate test results include code coverage and the running status of the object under test. The running status includes normal status and abnormal status.
[0046] Through the fuzzy test service, the real-time data is tampered according to the data tampering strategy corresponding to the target interface to obtain the tampered data. The data tampering strategy is the default strategy or the strategy configured by the user through the configuration interface. The data tampering strategy also includes multiple tampering rules and the weight value corresponding to each tampering rule;
[0047] Returning the tampered data to the simulation data service through the fuzz test service, so that the simulation data service returns the data received from the fuzz test service to the application to be tested through the target interface;
[0048] The text to be processed is processed through the test data generation network after multiple rounds of adjustment to generate a multiple rounds of test data set for fuzzy testing of the object to be tested, including: extracting features of the text to be processed through the text recognition sub-network after multiple rounds of adjustment to obtain feature information of multiple target objects in the text to be processed;
[0049] According to the characteristic information of multiple target objects, a multi-round test data set for fuzzy testing of the tested objects is generated through multiple rounds of adjusted data generation sub-networks;
[0050] Generate a corresponding type of fuzz testing exception certificate by testing the application type;
[0051] Extract the API of the certificate verification module of the detected terminal;
[0052] According to the API, the fuzz test abnormal certificate is imported into the detected terminal and run;
[0053] Monitor and record abnormal parameter information generated by the detected terminal and output a report.
[0054] Embodiment 2:
[0055] This embodiment provides a customized fuzzy testing method for dynamic monitoring protocols, which, in addition to the technical solutions of the above embodiments, also has the following technical features.
[0056] Among them, when generating a corresponding type of fuzzy test anomaly certificate, fuzzy data is generated for each field in the fuzzy test anomaly certificate.
[0057] Embodiment 3:
[0058] This embodiment provides a customized fuzzy testing method for dynamic monitoring protocols, which, in addition to the technical solutions of the above embodiments, also has the following technical features.
[0059] Among them, in the same fuzzy test exception certificate, all permutations and combinations of fuzzy data corresponding to each field are included.
[0060] Embodiment 4:
[0061] This embodiment provides a customized fuzzy testing method for dynamic monitoring protocols, which, in addition to the technical solutions of the above embodiments, also has the following technical features.
[0062] Among them, according to the test data set and the running state of the object under test during the fuzzy test, the network parameters of the test data generation network are adjusted to obtain the adjusted test data generation network.
[0063] Embodiment 5:
[0064] This embodiment provides a custom fuzzy testing device for dynamic monitoring protocols, which, in addition to the technical solutions of the above embodiments, also has the following technical features.
[0065] include:
[0066] A memory, used for storing the generated data;
[0067] The data set generation module is used to obtain the training data set based on the original test cases;
[0068] A processor, for performing calculations on the generated data;
[0069] A construction module is used to construct a generative adversarial network model of a differential autoencoder; the training data set is input into the generative adversarial network model for training to obtain a trained generative adversarial network model;
[0070] The generation module is used to input the training data set into the trained generative adversarial network model to generate test cases. The processor can be a general-purpose processor, such as a CPU (Central Processing Unit), or an artificial intelligence processor (IPU) for performing artificial intelligence operations, such as a GPU (Graphics Processing Unit), NPU (Neural-Network Processing Unit), DSP (Digital Signal Process), etc. The present disclosure does not limit the specific type of the processor.
[0071] Embodiment 6:
[0072] This embodiment provides a custom fuzzy testing device for dynamic monitoring protocols, which, in addition to the technical solutions of the above embodiments, also has the following technical features.
[0073] Among them, in the construction module, the generative adversarial network model includes an encoder, a generator, a decoder, a discriminator and a classifier, among which the generator serves as the decoder of the generative adversarial network model.
[0074] Embodiment 7:
[0075] This embodiment provides a custom fuzzy testing device for dynamic monitoring protocols, which, in addition to the technical solutions of the above embodiments, also has the following technical features.
[0076] Among them, in the construction module, a generative adversarial network model of the differential autoencoder is constructed.
[0077] The memory is an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device or any suitable combination thereof.
[0078] When in use: the text to be processed is processed through the test data generation network to generate the first round of test data set for fuzz testing of the object to be tested, the test data generation network includes a text recognition subnetwork and a data generation subnetwork, and the object to be tested is an executable object corresponding to the text to be processed; the real-time data of the target interface of the application to be tested is intercepted through the simulation data service, and the real-time data is sent to the fuzz testing service; according to the test data set and the test data generation network, multiple rounds of fuzz testing are performed on the object to be tested to obtain intermediate test results of multiple rounds of fuzz testing, and the intermediate test results include code coverage and the running status of the object to be tested, and the running status includes normal status and abnormal status; the real-time data is tampered with according to the data tampering strategy corresponding to the target interface through the fuzz testing service to obtain tampered data, the data tampering strategy is the default strategy or the strategy configured by the user through the configuration interface, and the data tampering strategy also includes multiple tampering rules and the weight value corresponding to each tampering rule.
[0079] The tampered data is returned to the simulation data service through the fuzzy test service, so that the simulation data service returns the data received from the fuzzy test service to the application to be tested through the target interface; the text to be processed is processed through the test data generation network after multiple rounds of adjustment to generate the multiple rounds of test data sets for fuzzy testing of the object to be tested, including: the text to be processed is extracted through the text recognition subnetwork after multiple rounds of adjustment to obtain the feature information of multiple target objects in the text to be processed; according to the feature information of the multiple target objects, the multiple rounds of test data sets for fuzzy testing of the object to be tested are generated through the data generation subnetwork after multiple rounds of adjustment; according to the test application type, the corresponding type of fuzzy test abnormal certificate is generated; the API of the certificate verification module of the detected terminal is extracted; according to the API, the fuzzy test abnormal certificate is imported into the detected terminal and runs; the abnormal parameter information generated by the detected terminal is monitored and recorded and a report is output.
[0080] The embodiments of the present application are described above in conjunction with the accompanying drawings. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A custom fuzz testing method for dynamic monitoring protocols, characterized in that: The method includes: The text to be processed is processed by a test data generation network to generate a first round of test data set for fuzz testing of the object to be tested, wherein the test data generation network includes a text recognition subnetwork and a data generation subnetwork, and the object to be tested is an executable object corresponding to the text to be processed; Intercepting the real-time data of the target interface of the application to be tested through the simulated data service, and sending the real-time data to the fuzz testing service; According to the test data set and the test data generation network, multiple rounds of fuzz testing are performed on the object under test to obtain intermediate test results of the multiple rounds of fuzz testing, wherein the intermediate test results include code coverage and the running state of the object under test, and the running state includes a normal state and an abnormal state; The real-time data is tampered with according to the data tampering strategy corresponding to the target interface by the fuzzy test service to obtain tampered data, wherein the data tampering strategy is a default strategy or a strategy configured by a user through a configuration interface, and the data tampering strategy also includes multiple tampering rules and a weight value corresponding to each tampering rule; Returning the tampered data to the simulation data service through the fuzzy test service, so that the simulation data service returns the data received from the fuzzy test service to the application to be tested through the target interface; The method comprises: performing feature extraction on the text to be processed through the text recognition sub-network adjusted for multiple rounds to obtain feature information of multiple target objects in the text to be processed; According to the feature information of the multiple target objects, a multiple round test data set for fuzzy testing of the tested objects is generated through multiple rounds of adjusted data generation sub-networks; Generate a corresponding type of fuzz testing exception certificate by testing the application type; Extract the API of the certificate verification module of the detected terminal; According to the API, the fuzz test abnormality certificate is imported into the detected terminal and executed; Monitor and record abnormal parameter information generated by the detected terminal and output a report.
2. The dynamic monitoring protocol custom fuzz testing method according to claim 1 is characterized in that: When generating a corresponding type of fuzzy test exception certificate, fuzzy data is generated for each field in the fuzzy test exception certificate.
3. The dynamic monitoring protocol custom fuzz testing method according to claim 1 is characterized in that: In the same fuzzy test exception certificate, all permutations and combinations of fuzzy data corresponding to each field are included.
4. The dynamic monitoring protocol custom fuzz testing method according to claim 1 is characterized in that: According to the test data set and the running state of the object under test during the fuzzy test, the network parameters of the test data generation network are adjusted to obtain an adjusted test data generation network.
5. A custom fuzzy testing device for dynamic monitoring protocol, characterized in that: include: A memory, used for storing the generated data; The data set generation module is used to obtain the training data set based on the original test cases; A processor, for performing calculations on the generated data; A construction module is used to construct a generative adversarial network model of a differential autoencoder; the training data set is input into the generative adversarial network model for training to obtain a trained generative adversarial network model; A generation module is used to input the training data set into the trained generative adversarial network model to generate test cases.
6. The dynamic monitoring protocol custom fuzzy testing device according to claim 1, characterized in that: In the construction module, the generative adversarial network model includes an encoder, a generator, a decoder, a discriminator and a classifier, wherein the generator serves as a decoder of the generative adversarial network model.
7. The dynamic monitoring protocol custom fuzzy testing device according to claim 1, characterized in that: In the construction module, a generative adversarial network model of a differential autoencoder is constructed.
8. The dynamic monitoring protocol custom fuzzy testing device according to claim 1, characterized in that: The memory is an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof.
Citation Information
Patent Citations
A terminal fuzzy test method and device
CN109918297A
Fuzzy test method and device based on text recognition
CN111858334A
Fuzzy test method and device for interface
CN113778879A
Fuzzy test case generation method and device
CN115455423A
