Generation method of dynamic binary code test case

A test case generation and binary code technology, applied in the fields of vulnerability mining, reverse engineering, and software testing, can solve problems such as high test time cost, inability to construct input, and inability to find bugs, and achieve the effect of improving path coverage.

Inactive Publication Date: 2012-11-28
BEIHANG UNIV
View PDF3 Cites 23 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This method is blind, neither can know which program paths have been executed, nor can it construct the input in a oriented manner, so that the program can be executed to paths that have not been traversed
Most of the time in the test process is repeated execution of the same path, making the test time cost too high
Source-level testing can help programmers find many bugs caused by code style or wrong syntax and semantics, but there are several disadvantages: 1) It is impossible to find bugs when the program is running; 2) In many cases, the source code is not accessible 3) Each type of programming language needs to be considered separately
Catchconv and Fuzzgrind are open source tools, and both use Valgrind as their instrumentation framework. Only Microsoft's Sage runs on Windows, but it has not been released

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
  • Generation method of dynamic binary code test case
  • Generation method of dynamic binary code test case

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0059] The method of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments of the present invention.

[0060] The basic idea of ​​the present invention is: to realize the binary code dynamic instrumentation tool, collect the dynamic information of binary code execution, convert these dynamic information into VEX intermediate language, introduce symbols from the input point, propagate symbols to each branch, and extract each Path constraints for branches. Use the path mutation algorithm to generate a new path constraint, use the solver to calculate the input vector that satisfies the path constraint, and then pass the input vector to the binary program for the next round of execution until no new path is generated.

[0061] figure 1 It is a schematic flow chart of a dynamic binary code test case generation method of the present invention; as figure 1 As shown, the method includes the following steps:

[...

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 generation method of a dynamic binary code test case. The generation method comprises the following steps: a dynamic binary insertion tool is achieved to collect the context information including a register, a memory, a thread, system invoking, base loading and the like in the execution process of the binary code, transmitting such information into a binary code translation assembly, converting the information into an intermediate language, carrying out symbol execution on the intermediate language, disseminating symbol input, and collecting a path constraint depending on the input. And then, inputting the path constraint into a path generation assembly, providing a new in-step branch-path mutation algorithm and a strategy, generating new path constraints as much as possible after each symbol execution, using a theorem prover to solve the new path constraint, obtaining the new input satisfying the path constraint, transmitting the new input to the binary code to carry out specific execution for one time, obtaining new path constraints from the new execution in continuously circular manner, generating new inputs, and improving the cover ratio of the binary code.

Description

technical field [0001] The invention relates to a dynamic binary code test case generation method, which can be directly operated on the Windows platform, does not need the source code of the program to be tested, and can generate new input to detect new paths during operation, and is suitable for software testing, Vulnerability mining, reverse engineering and other fields. Background technique [0002] Traditional software testing methods generally use black-box Fuzz testing, which constructs a set of random inputs and passes them to the program until the program crashes. This method is blind, neither can know which program paths have been executed, nor can it construct the input in a oriented manner, so that the program can be executed to the paths that have not been traversed. Most of the time in the test process is repeated execution of the same path, making the test time cost too high. Source-level testing can help programmers find many bugs caused by code style or wr...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
Inventor 李舟军马金鑫忽朝俭章张锴
Owner BEIHANG UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products