Case generation method for semi-legalized fuzz test of network protocol based on finite-state machine
A technology of finite state machine and fuzz testing, which is applied in the direction of software testing/debugging, etc., can solve the problems of insufficient intelligence of test case sets, space growth, and low efficiency of test case sets, so as to avoid redundant test cases, improve quality, The effect of reducing size
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Publication Date
- 2015-11-25
Smart Images
Figure 1 Figure 2 Figure 3
Abstract
Description
Technical field
[0001] The invention belongs to the technical field of network protocol fuzz testing, and specifically relates to a method for generating a network protocol semi-legalized fuzz test case based on a finite state machine. Background technique
[0002] Network protocol fuzzing is the most interesting type of fuzzing for security researchers, not only because the vulnerabilities found usually have a higher level of risk, but also because network protocols are widely used in Internet communications, once they are discovered Vulnerabilities, the scope of threats will be very wide. The method of generating network protocol fuzzing test cases is a very critical link in the process of fuzzing. The generation and selection of test cases directly affect the quality of fuzzing.
[0003] In terms of fuzzing testing, the invention patent "Method, Apparatus and System for Fuzzing Testing" with application number CN201110391886.3 proposes to input multiple test cases into the targ...
Examples
Embodiment 1
[0033] Embodiment 1. A semi-legalized fuzzy test case generation method based on a finite state machine network protocol includes the following steps:
[0034] Step 1: In the network protocol based on the finite state machine, analyze the protocol interaction process according to the network protocol specification, and construct the network protocol model based on the finite state machine:
[0035] The network protocol model based on finite state machine is P fsm = 0 ,S,M,F,L> ,among them:
[0036] S 0 Represents the initial state of the state set of the finite state machine;
[0037] S={s 0 ,s 1 ,s 2 ,...,s n-1 }, represents the state set of the entire finite state machine, where s 0 ~s n-1 Represents n states;
[0038] M={m 0 ,m 1 ,m 2 ,...,M m-1 }, represents the set of protocol messages that cause the state transition of the finite state machine, where m 0 ~m m-1 Represents m protocol messages;
[0039] F is the state transition function, representing the state transition path (s i ,...
Embodiment 2
[0052] Embodiment 2. According to the above steps in embodiment 1, it can be seen that when the fuzz test sequence of the network protocol state machine is generated for different test sequences, all the state transition paths in the test sequence must go through the semi-legal algorithm, so that As a result, the same state transition path exists between different test sequences. When the semi-legal algorithm constructs the malformed protocol message of the state transition path, too many redundant fuzzing test sequences are generated, resulting in an excessively large number of test sets and test time. Extend the shortcomings such as low quality of the generated test set. In order to avoid this situation, it is necessary to "mark" the state transition path of the network protocol state machine. When generating the fuzz test sequence, determine whether to perform the fuzz test on this state transition path according to the marker, so as to reduce the generated fuzziness. The pu...