Back to results
US 12,596,635 B2Granted
Black-box fuzzing testing method and apparatus
AssigneeSamsung Electronics Co., Ltd.
InventorsHaitao Hu, Zhu Fu, Huan Guo, Hao Yan, Zhenan Tang
Life of this patent
Estimating the term…
Abstract
A black-box fuzzing testing method includes: generating a plurality of testcases; executing a target program based on each of the generated testcases to obtain a plurality of execution results; determining a plurality of execution paths of the target program using the execution results; and determining a code coverage of the target program from the execution paths.
Claims16
A method for assessing code coverage of black-box fuzzing testing, the method comprising:
- generating, by a processor, a plurality of testcases;
- executing, by the processor, a computer-executable target program based on each of the generated testcases to obtain a plurality of execution result;
- determining, by the processor, whether a first execution path among a plurality of execution paths of the target program associated with a given testcase is a new execution path based on previously recorded execution paths in a path library;
- in response to a determination that the first execution path is not a new execution path, randomly generating a new testcase;
- in response to a determination that the first execution path is a new execution path, mutating the given testcase to generate new testcases for testing the target program and recording the first execution path in the path library;
- determining, by the processor, a code coverage of the target program based on a number of paths recorded in the path library and a preset test path number;
- and
- performing redundancy filtering on the randomly generated new testcases prior to executing the target program,
- wherein the performing redundancy filtering removes at least one testcase based on predetermined conditions including the at least one testcase being different, the at least one testcase being complete, and the at least one testcase being evenly distributed.
6 more elements
A black-box fuzzing testing apparatus, comprising:
- a testcase execution unit configured to generate a plurality of testcases and execute a computer-executable target program based on the generated testcases to obtain a plurality of execution results;
- a path management unit configured to determine whether a first execution path among a plurality of execution paths of the target program associated with a given testcase is a new execution path based on previously recorded execution paths in a path library, and record the first execution path in the path library;
- a testcase generation unit configured to:
- randomly generate a new testcase in response to a determination that the first execution path is not a new execution path, and
- mutate the given testcase to generate new testcases for testing the target program;
- and
- a feedback management unit configured to determine a code coverage of the target program based on a number of paths recorded in the path library and a preset test path number,
- wherein the testcase execution unit is further configured to perform redundancy filtering on the randomly generated new testcases prior to executing the target program,
- wherein the performing redundancy filtering removes at least one testcase based on predetermined conditions including the at least one testcase being different, the at least one testcase being complete, and the at least one testcase being evenly distributed.
6 more elements
A black-box fuzzing testing method, comprising:
- generating, by a processor, a plurality of testcases;
- executing, by a processor, a computer-executable target program based on each of the generated testcases to obtain a return value and an execution time for each of the generated testcases;
- filtering out, by the processor, at least one of the generated testcases based on the return value and the execution time for each of the generated testcases to generate a subset of testcases, wherein filtering out the at least one of the generated testcases comprises removing at least one of the generated testcases by performing redundancy filtering prior to executing the target program;
- and
- determining, by the processor, a code coverage of the target program based on the subset of testcases.
2 more elements
Dependencies are inferred from the claim text.