Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A fuzzy test case generation method and system based on genetic variation

A test case and fuzz test technology, applied in the field of genetic mutation-based fuzz test case generation, can solve problems such as poor scalability, difficult to achieve code, and difficult to complete code

Active Publication Date: 2019-04-09
NAT UNIV OF DEFENSE TECH
View PDF9 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The existing test case generation method based on generation is to manually write the test case generation rules, so that the test cases can be generated according to the target rules, and ensure that the generated test cases can bypass the error checking code of the target program, so that fuzzing (based on defect injection) automatic software testing technology) the core function code of the target program; however, this test case generation method requires a lot of manual intervention, resulting in high labor costs, and at the same time, the rules of different target programs are not the same, which will lead to The generated test case generation method has poor scalability and is not suitable for fuzzing a large number of different target programs
The existing mutation-based test case generation method is to generate new test cases by randomly mutating the existing normal input, so that the generated test cases can use some information in the existing normal input to bypass the error checking code , and it can be run directly without manual operation. For different programs, it only needs to replace the normal input to achieve a high scalability effect; however, the test cases generated by this test case generation method can only be fuzzed to the normal test Some codes near the reachable code of the use case are relatively far away or the code with strict entry conditions is difficult to reach, which makes it difficult for the generated test cases to fuzz all the code of the target program

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A fuzzy test case generation method and system based on genetic variation
  • A fuzzy test case generation method and system based on genetic variation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0039] like figure 1 As shown, the implementation steps of the method for generating fuzzy test cases based on genetic variation in this embodiment include:

[0040] 1) Select two seed test cases;

[0041] 2) For the seed length of the new test case, select a data location as the current data location;

[0042] 3) According to the current data position, judge whether the data of the two seed test cases are the same, and if they are the same, jump to step 4); otherwise, jump to step 5);

[0043] 4) Inherit the data of the current data position of the seed test case to the current data position of the new test case;

[0044] 5) Determine whether any of the data in the current data locations of the two seed test cases belongs to a preset string comparison set, and the preset string comparison set is static analysis and extraction for the target binary file used to execute the test case The string data is obtained. If it is established, the data in the current data position of ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a fuzzy test case generation method and system based on genetic variation. The method comprises the following steps: selecting two seed test cases, aiming at a data position ofa new test case, if the two seed data are the same, inheriting the data to the current data position of the new test case; and if the two pieces of seed data are different and belong to any characterstring comparison set for static analysis and extraction of the target binary file, randomly mutating the data into data in the preset character string comparison set, or else randomly selecting thedata of one seed to be inherited to the current data position of the new test case. According to the invention, respective advantages of the test case generation method based on generation and the test case generation method based on variation are inherited; and meanwhile, the corresponding defects are avoided, the core code of the large-scale fuzzing target program without manual operation can berealized, and the method has the advantages that the generation of the test case has higher possibility, the path coverage rate is increased, and the collapse is easy to trigger.

Description

technical field [0001] The invention relates to the field of vulnerability mining in the field of computers, in particular to a method and system for generating fuzzy test cases based on genetic variation, which are used to provide fuzzy test cases for vulnerability mining for target programs of vulnerability mining. Background technique [0002] Test case generation methods can be roughly divided into two categories, generation-based test case generation and mutation-based test case generation. The existing test case generation method based on generation is to manually write the test case generation rules, so that the test cases can be generated according to the target rules, and ensure that the generated test cases can bypass the error checking code of the target program, so that fuzzing (based on defect injection) automatic software testing technology) the core function code of the target program; however, this test case generation method requires a lot of manual interven...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/36G06N3/12
CPCG06F11/3684G06F11/3688G06N3/126
Inventor 卢凯周旭何兴陆张文喆王睿伯王鹏飞
Owner NAT UNIV OF DEFENSE TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products