Gramatron is a coverage-guided fuzzer that uses grammar automatons to perform grammar-aware fuzzing. Technical details about our framework are available in the ISSTA'21 paper. The artifact to reproduce the experiments presented in the paper are present in artifact/. Instructions to run a sample campaign and incorporate new grammars is presented below:
Simply execute ./build_gramatron_mutator.sh
You have to set the grammar file to use with GRAMMATRON_AUTOMATION:
export AFL_DISABLE_TRIM=1 export AFL_CUSTOM_MUTATOR_ONLY=1 export AFL_CUSTOM_MUTATOR_LIBRARY=./gramatron.so export GRAMATRON_AUTOMATION=grammars/ruby/source_automata.json afl-fuzz -i in -o out -- ./target
source.json filessrc/gramfuzz-mutator/preprocess) which will place the generated automaton in the same folder../preprocess/prep_automaton.sh <grammar_file> <start_symbol> [stack_limit] Eg. ./preprocess/prep_automaton.sh ~/grammars/ruby/source.json PROGRAM
5 and then increasing it if you need more complexitytest binary housed in src/gramfuzz-mutator./test SanityCheck <automaton_file> Eg. ./test SanityCheck ~/grammars/ruby/source_automata.json