googleprojectzero / fuzzilli

A JavaScript Engine Fuzzer
Apache License 2.0
1.86k stars 300 forks source link

how to add Corpus to Fuzzilli #379

Closed 5angjun closed 1 year ago

5angjun commented 1 year ago

I have some *.js --> javascript corpus and I want to add this corpuses to init corpus.

if aditional corpus directory in ~/CORPUS. what command i have to do?

i know --importCorpusAll, importCorpusNewCov, importCorpusMerge exits but can't know how to use it.

Need to contert javascript corpus to protobufs? if it correct how to do this? Can you tell me the command how to do?

` --importCorpusAll=path : Imports a corpus of protobufs to start the initial fuzzing corpus. All provided programs are included, even if they do not increase coverage. This is useful for searching for variants of existing bugs. Can be used alongside wtih importCorpusNewCov, and will run first --importCorpusNewCov=path : Imports a corpus of protobufs to start the initial fuzzing corpus. This only includes programs that increase coverage. This is useful for jump starting coverage for a wide range of JavaScript samples. Can be used alongside importCorpusAll, and will run second. Since all imported samples are asynchronously minimized, the corpus will show a smaller than expected size until minimization completes. --importCorpusMerge=path : Imports a corpus of protobufs to start the initial fuzzing corpus. This only keeps programs that increase coverage but does not attempt to minimize the samples. This is mostly useful to merge existing corpora from previous fuzzing sessions that will have redundant samples but which will already be minimized.

`

saelo commented 1 year ago

If you want to import JavaScript files, you'll first have to compile them to FuzzIL (i.e. those protobufs) before you can import them in Fuzzilli. See also https://github.com/googleprojectzero/fuzzilli/issues/350