A network protocol
fuzz testing method and device based on state guidance and seed
mutation, the method comprising: 1) manually constructing a high-quality basic seed based on official RFC protocol documents and mapping the seed to the corresponding state; 2) inputting a message sequence into a target program for
fuzz testing, interacting with the target program while monitoring the program state and obtaining feedback; 3) selecting a seed with
high coverage for information-preserving
mutation based on the protocol state code and
path coverage feedback, preserving the seed's
state transition function to reduce the number of invalid seeds; 4) state-guided message sequence generation: selecting a target test state based on the current state and the returned
protocol status code, prioritizing states that have not been reached or have been reached less frequently as targets, and then generating a message sequence that can reach or approach the target state based on the basic seed. The method proposed in the present invention fully utilizes the protocol state information and preserves the seed's state transition capability during the seed
mutation process. Through state guidance and targeted message sequence generation, the efficiency and quality of network protocol
fuzz testing are improved.