The invention discloses a protocol
fuzz testing method and
system based on taint analysis
message format inference, and the method comprises the steps: S1, coding a
source code of a tested protocol program into LLVM intermediate representation, and carrying out the static taint analysis, and obtaining an initial
message format; s2, according to the initial
message format, the initial message is input into the tested protocol program after
instrumentation for dynamic taint analysis, and a precise message format is obtained; s3, generating seeds according to the accurate message format, and forming a seed
pool with a plurality of messages in the initial message; s4, generating a plurality of test examples according to the accurate message format and the seed
pool, and respectively performing fuzzy testing to obtain a plurality of states of the tested protocol program; s5, performing variation on the seeds in the seed
pool, selecting a state to perform fuzzy testing, and recording a collapsed
test sample; and S6, after all the seeds in the seed pool execute the step S5 and a
signal for terminating the fuzzy test is not received, adding the
test sample generating new coverage information during the fuzzy test into the seed pool, and then returning to the step S4.