├── README.md ├── aflpp ├── Android.bp ├── CONTRIBUTING.md ├── Changelog.md ├── Dockerfile ├── GNUmakefile ├── GNUmakefile.gcc_plugin ├── GNUmakefile.llvm ├── LICENSE ├── Makefile ├── QuickStartGuide.md ├── README.md ├── TODO.md ├── afl-cmin ├── afl-cmin.bash ├── afl-persistent-config ├── afl-plot ├── afl-system-config ├── afl-whatsup ├── afl-wine-trace ├── config.h ├── custom_mutators │ ├── Android.bp │ ├── README.md │ ├── examples │ │ ├── Makefile │ │ ├── README.md │ │ ├── XmlMutatorMin.py │ │ ├── common.py │ │ ├── custom_mutator_helpers.h │ │ ├── example.c │ │ ├── example.py │ │ ├── post_library_gif.so.c │ │ ├── post_library_png.so.c │ │ ├── simple-chunk-replace.py │ │ ├── simple_example.c │ │ └── wrapper_afl_min.py │ ├── gramatron │ │ ├── JSONC_VERSION │ │ ├── README.md │ │ ├── build_gramatron_mutator.sh │ │ ├── gramfuzz-helpers.c │ │ ├── gramfuzz-mutators.c │ │ ├── gramfuzz-util.c │ │ ├── gramfuzz.c │ │ ├── gramfuzz.h │ │ ├── grammars │ │ │ ├── js │ │ │ │ ├── source.json │ │ │ │ └── source_automata.json │ │ │ ├── php │ │ │ │ ├── source.json │ │ │ │ └── source_automata.json │ │ │ └── ruby │ │ │ │ ├── source.json │ │ │ │ └── source_automata.json │ │ ├── hashmap.c │ │ ├── hashmap.h │ │ ├── preprocess │ │ │ ├── construct_automata.py │ │ │ ├── gnf_converter.py │ │ │ └── prep_automaton.sh │ │ ├── test.c │ │ ├── test.h │ │ ├── utarray.h │ │ └── uthash.h │ ├── grammar_mutator │ │ ├── GRAMMAR_VERSION │ │ ├── README.md │ │ ├── build_grammar_mutator.sh │ │ └── update_grammar_ref.sh │ ├── honggfuzz │ │ ├── Makefile │ │ ├── README.md │ │ ├── custom_mutator_helpers.h │ │ ├── honggfuzz.c │ │ ├── honggfuzz.h │ │ ├── input.h │ │ ├── libhfcommon │ │ │ ├── common.h │ │ │ ├── log.h │ │ │ └── util.h │ │ ├── mangle.c │ │ └── mangle.h │ ├── libfuzzer │ │ ├── FuzzerBuiltins.h │ │ ├── FuzzerBuiltinsMsvc.h │ │ ├── FuzzerCommand.h │ │ ├── FuzzerCorpus.h │ │ ├── FuzzerCrossOver.cpp │ │ ├── FuzzerDataFlowTrace.cpp │ │ ├── FuzzerDataFlowTrace.h │ │ ├── FuzzerDefs.h │ │ ├── FuzzerDictionary.h │ │ ├── FuzzerDriver.cpp │ │ ├── FuzzerExtFunctions.def │ │ ├── FuzzerExtFunctions.h │ │ ├── FuzzerExtFunctionsDlsym.cpp │ │ ├── FuzzerExtFunctionsWeak.cpp │ │ ├── FuzzerExtFunctionsWindows.cpp │ │ ├── FuzzerExtraCounters.cpp │ │ ├── FuzzerFlags.def │ │ ├── FuzzerFork.cpp │ │ ├── FuzzerFork.h │ │ ├── FuzzerIO.cpp │ │ ├── FuzzerIO.h │ │ ├── FuzzerIOPosix.cpp │ │ ├── FuzzerIOWindows.cpp │ │ ├── FuzzerInterceptors.cpp │ │ ├── FuzzerInterface.h │ │ ├── FuzzerInternal.h │ │ ├── FuzzerLoop.cpp │ │ ├── FuzzerMain.cpp │ │ ├── FuzzerMerge.cpp │ │ ├── FuzzerMerge.h │ │ ├── FuzzerMutate.cpp │ │ ├── FuzzerMutate.h │ │ ├── FuzzerOptions.h │ │ ├── FuzzerPlatform.h │ │ ├── FuzzerRandom.h │ │ ├── FuzzerSHA1.cpp │ │ ├── FuzzerSHA1.h │ │ ├── FuzzerTracePC.cpp │ │ ├── FuzzerTracePC.h │ │ ├── FuzzerUtil.cpp │ │ ├── FuzzerUtil.h │ │ ├── FuzzerUtilDarwin.cpp │ │ ├── FuzzerUtilFuchsia.cpp │ │ ├── FuzzerUtilLinux.cpp │ │ ├── FuzzerUtilPosix.cpp │ │ ├── FuzzerUtilWindows.cpp │ │ ├── FuzzerValueBitMap.h │ │ ├── Makefile │ │ ├── README.md │ │ ├── libfuzzer.cpp │ │ └── libfuzzer.inc │ ├── libprotobuf-mutator-example │ │ ├── Android.bp │ │ ├── README.md │ │ ├── lpm_aflpp_custom_mutator_input.cc │ │ ├── lpm_aflpp_custom_mutator_input.h │ │ ├── test.proto │ │ └── vuln.c │ ├── radamsa │ │ ├── GNUmakefile │ │ ├── LICENSE │ │ ├── README.md │ │ ├── custom_mutator_helpers.h │ │ ├── libradamsa-test.c │ │ ├── libradamsa.c │ │ ├── radamsa-mutator.c │ │ └── radamsa.h │ ├── rust │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── README.md │ │ ├── custom_mutator-sys │ │ │ ├── Cargo.toml │ │ │ ├── build.rs │ │ │ ├── src │ │ │ │ └── lib.rs │ │ │ └── wrapper.h │ │ ├── custom_mutator │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── example │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── example_mutator.rs │ │ └── example_lain │ │ │ ├── Cargo.toml │ │ │ ├── rust-toolchain │ │ │ └── src │ │ │ └── lain_mutator.rs │ └── symcc │ │ ├── Makefile │ │ ├── README.md │ │ ├── symcc.c │ │ └── test_examples │ │ ├── file_test.c │ │ └── stdin_test.c ├── dictionaries │ ├── README.md │ ├── aff.dict │ ├── ass.dict │ ├── atom.dict │ ├── av1_dc.dict │ ├── bash.dict │ ├── bdf.dict │ ├── bmp.dict │ ├── bz2.dict │ ├── creole.dict │ ├── css.dict │ ├── csv.dict │ ├── dds.dict │ ├── djvu.dict │ ├── docommand.dict │ ├── exif.dict │ ├── fbs.dict │ ├── ftp.dict │ ├── gif.dict │ ├── graphviz.dict │ ├── heif.dict │ ├── hoextdown.dict │ ├── html_tags.dict │ ├── http.dict │ ├── icc.dict │ ├── iccprofile.dict │ ├── icns.dict │ ├── initfile.dict │ ├── jbig2.dict │ ├── jpeg.dict │ ├── jpeg2000.dict │ ├── js.dict │ ├── json.dict │ ├── jsonnet.dict │ ├── markdown.dict │ ├── math.dict │ ├── mathml.dict │ ├── mp4.dict │ ├── mysqld.dict │ ├── ogg.dict │ ├── openexr.dict │ ├── otf.dict │ ├── pbm.dict │ ├── pcap.dict │ ├── pdf.dict │ ├── perl.dict │ ├── png.dict │ ├── proj4.dict │ ├── protobuf.dict │ ├── ps.dict │ ├── psd.dict │ ├── regexp.dict │ ├── riff.dict │ ├── rss.dict │ ├── rst.dict │ ├── rtf.dict │ ├── sas.dict │ ├── spss.dict │ ├── sql.dict │ ├── stata.dict │ ├── svg.dict │ ├── tex.dict │ ├── theme-load-fuzz.dict │ ├── tiff.dict │ ├── tokener_parse_ex.dict │ ├── toml.dict │ ├── type42.dict │ ├── url.dict │ ├── utf8.dict │ ├── vcf.dict │ ├── vhd.dict │ ├── vpx_dec.dict │ ├── wav.dict │ ├── webm.dict │ ├── webp.dict │ ├── wkt.dict │ ├── x86.dict │ ├── xml.dict │ ├── xml_UTF_16.dict │ ├── xml_UTF_16BE.dict │ ├── xml_UTF_16LE.dict │ ├── xpath.dict │ ├── xslt.dict │ ├── yaml.dict │ ├── yara.dict │ └── zip.dict ├── docs │ ├── COPYING │ ├── Changelog.md │ ├── FAQ.md │ ├── INSTALL.md │ ├── QuickStartGuide.md │ ├── binaryonly_fuzzing.md │ ├── custom_mutators.md │ ├── docs.md │ ├── env_variables.md │ ├── ideas.md │ ├── life_pro_tips.md │ ├── parallel_fuzzing.md │ ├── perf_tips.md │ ├── resources │ │ ├── afl_gzip.png │ │ ├── grafana-afl++.json │ │ ├── screenshot.png │ │ └── statsd-grafana.png │ ├── rpc_statsd.md │ ├── sister_projects.md │ ├── status_screen.md │ └── technical_details.md ├── dynamic_list.txt ├── frida_mode │ ├── .gitignore │ ├── DEBUGGING.md │ ├── GNUmakefile │ ├── Makefile │ ├── MapDensity.md │ ├── README.md │ ├── Scripting.md │ ├── frida.map │ ├── hook │ │ ├── frida_hook.c │ │ └── qemu_hook.c │ ├── include │ │ ├── asan.h │ │ ├── ctx.h │ │ ├── entry.h │ │ ├── frida_cmplog.h │ │ ├── instrument.h │ │ ├── intercept.h │ │ ├── js.h │ │ ├── lib.h │ │ ├── output.h │ │ ├── persistent.h │ │ ├── prefetch.h │ │ ├── ranges.h │ │ ├── seccomp.h │ │ ├── stalker.h │ │ ├── stats.h │ │ └── util.h │ ├── many-linux │ │ ├── Dockerfile │ │ ├── GNUmakefile │ │ ├── Makefile │ │ ├── README.md │ │ └── realpath │ ├── src │ │ ├── asan │ │ │ ├── asan.c │ │ │ ├── asan_arm32.c │ │ │ ├── asan_arm64.c │ │ │ ├── asan_x64.c │ │ │ └── asan_x86.c │ │ ├── cmplog │ │ │ ├── cmplog.c │ │ │ ├── cmplog_arm32.c │ │ │ ├── cmplog_arm64.c │ │ │ ├── cmplog_x64.c │ │ │ └── cmplog_x86.c │ │ ├── ctx │ │ │ ├── ctx_arm32.c │ │ │ ├── ctx_arm64.c │ │ │ ├── ctx_x64.c │ │ │ └── ctx_x86.c │ │ ├── entry.c │ │ ├── instrument │ │ │ ├── instrument.c │ │ │ ├── instrument_arm32.c │ │ │ ├── instrument_arm64.c │ │ │ ├── instrument_coverage.c │ │ │ ├── instrument_debug.c │ │ │ ├── instrument_x64.c │ │ │ └── instrument_x86.c │ │ ├── intercept.c │ │ ├── js │ │ │ ├── api.js │ │ │ ├── js.c │ │ │ └── js_api.c │ │ ├── lib │ │ │ ├── lib.c │ │ │ └── lib_apple.c │ │ ├── main.c │ │ ├── output.c │ │ ├── persistent │ │ │ ├── persistent.c │ │ │ ├── persistent_arm32.c │ │ │ ├── persistent_arm64.c │ │ │ ├── persistent_x64.c │ │ │ └── persistent_x86.c │ │ ├── prefetch.c │ │ ├── ranges.c │ │ ├── seccomp │ │ │ ├── seccomp.c │ │ │ ├── seccomp_atomic.c │ │ │ ├── seccomp_child.c │ │ │ ├── seccomp_event.c │ │ │ ├── seccomp_filter.c │ │ │ ├── seccomp_socket.c │ │ │ └── seccomp_syscall.c │ │ ├── stalker.c │ │ ├── stats │ │ │ ├── stats.c │ │ │ ├── stats_arm32.c │ │ │ ├── stats_arm64.c │ │ │ └── stats_x86_64.c │ │ └── util.c │ ├── test │ │ ├── cmplog │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ ├── cmplog.c │ │ │ └── get_section_addrs.py │ │ ├── deferred │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ └── testinstr.c │ │ ├── entry_point │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ └── testinstr.c │ │ ├── exe │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ └── testinstr.c │ │ ├── fasan │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ └── test.c │ │ ├── jpeg │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ └── get_symbol_addr.py │ │ ├── js │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ ├── entry.js │ │ │ ├── patch.js │ │ │ ├── replace.js │ │ │ ├── stalker.js │ │ │ ├── test.c │ │ │ └── test2.c │ │ ├── libpcap │ │ │ ├── GNUmakefile │ │ │ └── Makefile │ │ ├── osx-lib │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ ├── harness.c │ │ │ ├── harness2.c │ │ │ ├── harness3.c │ │ │ ├── lib.c │ │ │ └── lib2.c │ │ ├── output │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ ├── frida_stderr.txt │ │ │ ├── frida_stdout.txt │ │ │ └── testinstr.c │ │ ├── persistent_ret │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ ├── test.js │ │ │ └── testinstr.c │ │ ├── png │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ └── persistent │ │ │ │ ├── GNUmakefile │ │ │ │ ├── Makefile │ │ │ │ └── hook │ │ │ │ ├── GNUmakefile │ │ │ │ ├── Makefile │ │ │ │ ├── cmodule.js │ │ │ │ └── load.js │ │ ├── proj4 │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ └── get_symbol_addr.py │ │ ├── re2 │ │ │ ├── GNUmakefile │ │ │ └── Makefile │ │ ├── sqlite │ │ │ ├── GNUmakefile │ │ │ └── Makefile │ │ ├── testinstr │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ └── testinstr.c │ │ └── unstable │ │ │ ├── GNUmakefile │ │ │ ├── Makefile │ │ │ └── unstable.c │ ├── ts │ │ ├── lib │ │ │ └── afl.ts │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── tsconfig.json │ │ └── tslint.json │ ├── update_frida_version.sh │ └── util │ │ ├── bin2c.c │ │ └── get_symbol_addr.sh ├── include │ ├── afl-as.h │ ├── afl-fuzz.h │ ├── afl-prealloc.h │ ├── alloc-inl.h │ ├── android-ashmem.h │ ├── cmplog.h │ ├── common.h │ ├── config.h │ ├── coverage-32.h │ ├── coverage-64.h │ ├── debug.h │ ├── diff-config.h │ ├── envs.h │ ├── forkserver.h │ ├── hash.h │ ├── list.h │ ├── sharedmem.h │ ├── snapshot-inl.h │ ├── types.h │ └── xxhash.h ├── instrumentation │ ├── COPYING3 │ ├── Makefile │ ├── README.cmplog.md │ ├── README.ctx.md │ ├── README.gcc_plugin.md │ ├── README.instrument_list.md │ ├── README.laf-intel.md │ ├── README.llvm.md │ ├── README.lto.md │ ├── README.neverzero.md │ ├── README.ngram.md │ ├── README.out_of_line.md │ ├── README.persistent_mode.md │ ├── README.snapshot.md │ ├── SanitizerCoverageLTO.so.cc │ ├── SanitizerCoveragePCGUARD.so.cc │ ├── afl-compiler-rt.o.c │ ├── afl-gcc-pass.so.cc │ ├── afl-llvm-common.cc │ ├── afl-llvm-common.h │ ├── afl-llvm-dict2file.so.cc │ ├── afl-llvm-lto-instrumentation.so.cc │ ├── afl-llvm-lto-instrumentlist.so.cc │ ├── afl-llvm-pass.so.cc │ ├── afl-llvm-rt-lto.o.c │ ├── cmplog-instructions-pass.cc │ ├── cmplog-routines-pass.cc │ ├── cmplog-switches-pass.cc │ ├── compare-transform-pass.so.cc │ ├── llvm-alternative-coverage.h │ ├── split-compares-pass.so.cc │ └── split-switches-pass.so.cc ├── libAFLDriver.a ├── libAFLQemuDriver.a ├── qemu_mode │ ├── QEMUAFL_VERSION │ ├── README.md │ ├── README.persistent.md │ ├── README.wine.md │ ├── build_qemu_support.sh │ ├── libcompcov │ │ ├── Makefile │ │ ├── README.md │ │ ├── compcovtest.cc │ │ ├── libcompcov.so.c │ │ └── pmparser.h │ ├── libqasan │ │ ├── Makefile │ │ ├── README.md │ │ ├── dlmalloc.c │ │ ├── hooks.c │ │ ├── libqasan.c │ │ ├── libqasan.h │ │ ├── malloc.c │ │ ├── map_macro.h │ │ ├── patch.c │ │ ├── string.c │ │ └── uninstrument.c │ ├── unsigaction │ │ ├── Makefile │ │ ├── README.md │ │ └── unsigaction.c │ └── update_ref.sh ├── src │ ├── README.md │ ├── afl-analyze.c │ ├── afl-as.c │ ├── afl-cc.c │ ├── afl-common.c │ ├── afl-forkserver.c │ ├── afl-fuzz-bitmap.c │ ├── afl-fuzz-cmplog.c │ ├── afl-fuzz-extras.c │ ├── afl-fuzz-init.c │ ├── afl-fuzz-mutators.c │ ├── afl-fuzz-one.c │ ├── afl-fuzz-python.c │ ├── afl-fuzz-queue.c │ ├── afl-fuzz-redqueen.c │ ├── afl-fuzz-run.c │ ├── afl-fuzz-state.c │ ├── afl-fuzz-stats.c │ ├── afl-fuzz-statsd.c │ ├── afl-fuzz.c │ ├── afl-gotcpu.c │ ├── afl-ld-lto.c │ ├── afl-performance.c │ ├── afl-sharedmem.c │ ├── afl-showmap.c │ ├── afl-tmin.c │ ├── diff-afl-forkserver.c │ └── diff-afl-fuzz-init.c ├── test-instr.c ├── test │ ├── checkcommit.sh │ ├── test-all.sh │ ├── test-basic.sh │ ├── test-cmplog.c │ ├── test-compcov.c │ ├── test-custom-mutator.c │ ├── test-custom-mutators.sh │ ├── test-dlopen.c │ ├── test-floatingpoint.c │ ├── test-fp_cases.c │ ├── test-frida-mode.sh │ ├── test-gcc-plugin.sh │ ├── test-int_cases.c │ ├── test-libextensions.sh │ ├── test-llvm-lto.sh │ ├── test-llvm.sh │ ├── test-multiple-mutators.c │ ├── test-performance.sh │ ├── test-post.sh │ ├── test-pre.sh │ ├── test-qemu-mode.sh │ ├── test-uint_cases.c │ ├── test-unicorn-mode.sh │ ├── test-unittests.sh │ ├── test-unsigaction.c │ └── unittests │ │ ├── unit_hash.c │ │ ├── unit_list.c │ │ ├── unit_maybe_alloc.c │ │ ├── unit_preallocable.c │ │ └── unit_rand.c ├── testcases │ ├── README.md │ ├── archives │ │ ├── common │ │ │ ├── ar │ │ │ │ └── small_archive.a │ │ │ ├── bzip2 │ │ │ │ └── small_archive.bz2 │ │ │ ├── cab │ │ │ │ └── small_archive.cab │ │ │ ├── compress │ │ │ │ └── small_archive.Z │ │ │ ├── cpio │ │ │ │ └── small_archive.cpio │ │ │ ├── gzip │ │ │ │ └── small_archive.gz │ │ │ ├── lzo │ │ │ │ └── small_archive.lzo │ │ │ ├── rar │ │ │ │ └── small_archive.rar │ │ │ ├── tar │ │ │ │ └── small_archive.tar │ │ │ ├── xz │ │ │ │ └── small_archive.xz │ │ │ └── zip │ │ │ │ └── small_archive.zip │ │ └── exotic │ │ │ ├── arj │ │ │ └── small_archive.arj │ │ │ ├── lha │ │ │ └── small_archive.lha │ │ │ ├── lrzip │ │ │ └── small_archive.lrz │ │ │ ├── lzip │ │ │ └── small_archive.lz │ │ │ ├── lzma │ │ │ └── small_archive.lzma │ │ │ ├── rzip │ │ │ └── small_archive.rz │ │ │ └── zoo │ │ │ └── small_archive.zoo │ ├── images │ │ ├── bmp │ │ │ └── not_kitty.bmp │ │ ├── gif │ │ │ └── not_kitty.gif │ │ ├── ico │ │ │ └── not_kitty.ico │ │ ├── jp2 │ │ │ └── not_kitty.jp2 │ │ ├── jpeg │ │ │ └── not_kitty.jpg │ │ ├── jxr │ │ │ └── not_kitty.jxr │ │ ├── png │ │ │ ├── not_kitty.png │ │ │ ├── not_kitty_alpha.png │ │ │ ├── not_kitty_gamma.png │ │ │ └── not_kitty_icc.png │ │ ├── tiff │ │ │ └── not_kitty.tiff │ │ └── webp │ │ │ └── not_kitty.webp │ ├── multimedia │ │ └── h264 │ │ │ └── small_movie.mp4 │ └── others │ │ ├── elf │ │ └── small_exec.elf │ │ ├── js │ │ └── small_script.js │ │ ├── pcap │ │ └── small_capture.pcap │ │ ├── pdf │ │ └── small.pdf │ │ ├── rtf │ │ └── small_document.rtf │ │ ├── sql │ │ └── simple_queries.sql │ │ ├── text │ │ └── hello_world.txt │ │ └── xml │ │ └── small_document.xml ├── types.h ├── unicorn_mode │ ├── README.md │ ├── UNICORNAFL_VERSION │ ├── build_unicorn_support.sh │ ├── helper_scripts │ │ ├── ida_context_loader.py │ │ ├── unicorn_dumper_gdb.py │ │ ├── unicorn_dumper_ida.py │ │ ├── unicorn_dumper_lldb.py │ │ ├── unicorn_dumper_pwndbg.py │ │ └── unicorn_loader.py │ ├── samples │ │ ├── c │ │ │ ├── .gitignore │ │ │ ├── COMPILE.md │ │ │ ├── Makefile │ │ │ ├── harness.c │ │ │ ├── persistent_target.c │ │ │ ├── persistent_target_x86_64 │ │ │ ├── sample_all.sh │ │ │ ├── sample_inputs │ │ │ │ ├── sample1.bin │ │ │ │ ├── sample2.bin │ │ │ │ ├── sample3.bin │ │ │ │ ├── sample4.bin │ │ │ │ └── sample5.bin │ │ │ └── simple_target_x86_64 │ │ ├── compcov_x64 │ │ │ ├── COMPILE.md │ │ │ ├── compcov_target.bin │ │ │ ├── compcov_target.c │ │ │ ├── compcov_target.elf │ │ │ ├── compcov_test_harness.py │ │ │ └── sample_inputs │ │ │ │ └── sample1.bin │ │ ├── persistent │ │ │ ├── .gitignore │ │ │ ├── COMPILE.md │ │ │ ├── Makefile │ │ │ ├── harness.c │ │ │ ├── persistent_target │ │ │ ├── persistent_target.c │ │ │ ├── persistent_target_x86_64 │ │ │ ├── sample_all.sh │ │ │ ├── sample_inputs │ │ │ │ ├── sample1.bin │ │ │ │ ├── sample2.bin │ │ │ │ ├── sample3.bin │ │ │ │ ├── sample4.bin │ │ │ │ └── sample5.bin │ │ │ ├── simple_target_noncrashing.c │ │ │ └── simple_target_x86_64 │ │ ├── simple │ │ │ ├── COMPILE.md │ │ │ ├── sample_inputs │ │ │ │ ├── sample1.bin │ │ │ │ ├── sample2.bin │ │ │ │ ├── sample3.bin │ │ │ │ ├── sample4.bin │ │ │ │ └── sample5.bin │ │ │ ├── simple_target.bin │ │ │ ├── simple_target.c │ │ │ ├── simple_test_harness.py │ │ │ └── simple_test_harness_alt.py │ │ └── speedtest │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── c │ │ │ ├── Makefile │ │ │ └── harness.c │ │ │ ├── get_offsets.py │ │ │ ├── python │ │ │ ├── Makefile │ │ │ └── harness.py │ │ │ ├── rust │ │ │ ├── .gitignore │ │ │ ├── Cargo.toml │ │ │ ├── Makefile │ │ │ └── src │ │ │ │ └── main.rs │ │ │ ├── sample_inputs │ │ │ └── a │ │ │ └── target.c │ └── update_uc_ref.sh └── utils │ ├── README.md │ ├── afl_network_proxy │ ├── GNUmakefile │ ├── Makefile │ ├── README.md │ ├── afl-network-client.c │ └── afl-network-server.c │ ├── afl_proxy │ ├── Makefile │ ├── README.md │ └── afl-proxy.c │ ├── afl_untracer │ ├── Makefile │ ├── README.md │ ├── TODO │ ├── afl-untracer.c │ ├── ghidra_get_patchpoints.java │ ├── ida_get_patchpoints.py │ ├── libtestinstr.c │ └── patches.txt │ ├── aflpp_driver │ ├── GNUmakefile │ ├── Makefile │ ├── README.md │ ├── aflpp_driver.c │ ├── aflpp_driver_test.c │ ├── aflpp_qemu_driver.c │ └── aflpp_qemu_driver_hook.c │ ├── analysis_scripts │ └── queue2csv.sh │ ├── argv_fuzzing │ ├── Makefile │ ├── README.md │ ├── argv-fuzz-inl.h │ └── argvfuzz.c │ ├── asan_cgroups │ └── limit_memory.sh │ ├── autodict_ql │ ├── autodict-ql.py │ ├── build-codeql.sh │ ├── litan.py │ ├── litool.ql │ ├── memcmp-str.ql │ ├── memcmp-strings.py │ ├── qlpack.yml │ ├── readme.md │ ├── stan-strings.py │ ├── strcmp-str.ql │ ├── strcmp-strings.py │ ├── strncmp-str.ql │ ├── strncmp-strings.py │ └── strtool.ql │ ├── bash_shellshock │ └── shellshock-fuzz.diff │ ├── canvas_harness │ └── canvas_harness.html │ ├── clang_asm_normalize │ └── as │ ├── crash_triage │ └── triage_crashes.sh │ ├── defork │ ├── Makefile │ ├── README.md │ ├── defork.c │ └── forking_target.c │ ├── distributed_fuzzing │ └── sync_script.sh │ ├── libdislocator │ ├── Makefile │ ├── README.md │ └── libdislocator.so.c │ ├── libpng_no_checksum │ └── libpng-nocrc.patch │ ├── libtokencap │ ├── Makefile │ ├── README.md │ └── libtokencap.so.c │ ├── optimin │ ├── .gitignore │ ├── CMakeLists.txt │ ├── EVALMAXSAT_VERSION │ ├── README.md │ ├── build_optimin.sh │ └── src │ │ ├── CMakeLists.txt │ │ └── OptiMin.cpp │ ├── persistent_mode │ ├── Makefile │ ├── persistent_demo.c │ ├── persistent_demo_new.c │ └── test-instr.c │ ├── plot_ui │ ├── Makefile │ ├── README.md │ └── afl-plot-ui.c │ ├── qbdi_mode │ ├── README.md │ ├── assets │ │ └── screen1.png │ ├── build.sh │ ├── demo-so.c │ └── template.cpp │ ├── qemu_persistent_hook │ ├── Makefile │ ├── README.md │ ├── read_into_rdi.c │ └── test.c │ └── socket_fuzzing │ ├── Makefile │ ├── README.md │ └── socketfuzz.c ├── compdiff-afpp.png ├── compilers ├── Makefile ├── build.sh ├── compiler-base │ ├── alloc-inl.h │ ├── config.h │ ├── debug.h │ ├── diff-cc.c │ ├── diff-config.h │ ├── diff-llvm-rt.o.c │ ├── test-instr.c │ └── types.h └── config ├── diff-build.sh ├── diff-instrument.sh ├── diff-post.py ├── examples ├── libtiff │ ├── build.sh │ └── seeds │ │ └── not_kitty.tiff └── xpdf │ ├── build.sh │ └── seeds │ └── small_pdf └── preinstall.sh /aflpp/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to submit a Pull Request to AFLplusplus 2 | 3 | All contributions (pull requests) must be made against our `dev` branch. 4 | 5 | Each modified source file, before merging, must be formatted. 6 | 7 | ``` 8 | make code-format 9 | ``` 10 | 11 | This should be fine if you modified one of the files already present in the 12 | project, or added a file in a directory we already format, otherwise run: 13 | 14 | ``` 15 | ./.custom-format.py -i file-that-you-have-created.c 16 | ``` 17 | 18 | Regarding the coding style, please follow the AFL style. 19 | No camel case at all and use AFL's macros wherever possible 20 | (e.g. WARNF, FATAL, MAP_SIZE, ...). 21 | 22 | Remember that AFLplusplus has to build and run on many platforms, so 23 | generalize your Makefiles/GNUmakefile (or your patches to our pre-existing 24 | Makefiles) to be as generic as possible. 25 | -------------------------------------------------------------------------------- /aflpp/Changelog.md: -------------------------------------------------------------------------------- 1 | docs/Changelog.md -------------------------------------------------------------------------------- /aflpp/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @echo trying to use GNU make... 3 | @gmake all || echo please install GNUmake 4 | 5 | source-only: 6 | @gmake source-only 7 | 8 | binary-only: 9 | @gmake binary-only 10 | 11 | distrib: 12 | @gmake distrib 13 | 14 | man: 15 | @gmake man 16 | 17 | install: 18 | @gmake install 19 | 20 | document: 21 | @gmake document 22 | 23 | deepclean: 24 | @gmake deepclean 25 | 26 | code-format: 27 | @gmake code-format 28 | 29 | help: 30 | @gmake help 31 | 32 | tests: 33 | @gmake tests 34 | 35 | unit: 36 | @gmake unit 37 | 38 | unit_clean: 39 | @gmake unit_clean 40 | 41 | clean: 42 | @gmake clean 43 | -------------------------------------------------------------------------------- /aflpp/QuickStartGuide.md: -------------------------------------------------------------------------------- 1 | docs/QuickStartGuide.md -------------------------------------------------------------------------------- /aflpp/TODO.md: -------------------------------------------------------------------------------- 1 | # TODO list for AFL++ 2 | 3 | ## Roadmap 3.00+ 4 | 5 | - Update afl->pending_not_fuzzed for MOpt 6 | - put fuzz target in top line of UI 7 | - afl-plot to support multiple plot_data 8 | - afl_custom_fuzz_splice_optin() 9 | - afl_custom_splice() 10 | - better autodetection of shifting runtime timeout values 11 | - cmplog: use colorization input for havoc? 12 | - parallel builds for source-only targets 13 | 14 | 15 | ## Further down the road 16 | 17 | afl-fuzz: 18 | - setting min_len/max_len/start_offset/end_offset limits for mutation output 19 | 20 | qemu_mode: 21 | - non colliding instrumentation 22 | - rename qemu specific envs to AFL_QEMU (AFL_ENTRYPOINT, AFL_CODE_START/END, 23 | AFL_COMPCOV_LEVEL?) 24 | - add AFL_QEMU_EXITPOINT (maybe multiple?), maybe pointless as we have 25 | persistent mode 26 | - add/implement AFL_QEMU_INST_LIBLIST and AFL_QEMU_NOINST_PROGRAM 27 | - add/implement AFL_QEMU_INST_REGIONS as a list of _START/_END addresses 28 | 29 | 30 | ## Ideas 31 | 32 | - LTO/sancov: write current edge to prev_loc and use that information when 33 | using cmplog or __sanitizer_cov_trace_cmp*. maybe we can deduct by follow 34 | up edge numbers that both following cmp paths have been found and then 35 | disable working on this edge id -> cmplog_intelligence branch 36 | - use cmplog colorization taint result for havoc locations? 37 | - new instrumentation option for a thread-safe variant of feedback to shared mem. 38 | The user decides, if this is needed (eg the target is multithreaded). 39 | -------------------------------------------------------------------------------- /aflpp/config.h: -------------------------------------------------------------------------------- 1 | include/config.h -------------------------------------------------------------------------------- /aflpp/custom_mutators/examples/Makefile: -------------------------------------------------------------------------------- 1 | all: libexamplemutator.so 2 | 3 | libexamplemutator.so: 4 | $(CC) $(CFLAGS) -D_FORTIFY_SOURCE=2 -O3 -fPIC -shared -g -I ../../include example.c -o libexamplemutator.so 5 | 6 | clean: 7 | rm -rf libexamplemutator.so 8 | -------------------------------------------------------------------------------- /aflpp/custom_mutators/examples/common.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | """ 4 | Module containing functions shared between multiple AFL modules 5 | 6 | @author: Christian Holler (:decoder) 7 | 8 | @license: 9 | 10 | This Source Code Form is subject to the terms of the Mozilla Public 11 | License, v. 2.0. If a copy of the MPL was not distributed with this 12 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 13 | 14 | @contact: choller@mozilla.com 15 | """ 16 | 17 | from __future__ import print_function 18 | import random 19 | import os 20 | import re 21 | 22 | 23 | def randel(l): 24 | if not l: 25 | return None 26 | return l[random.randint(0, len(l) - 1)] 27 | 28 | 29 | def randel_pop(l): 30 | if not l: 31 | return None 32 | return l.pop(random.randint(0, len(l) - 1)) 33 | 34 | 35 | def write_exc_example(data, exc): 36 | exc_name = re.sub(r"[^a-zA-Z0-9]", "_", repr(exc)) 37 | 38 | if not os.path.exists(exc_name): 39 | with open(exc_name, "w") as f: 40 | f.write(data) 41 | -------------------------------------------------------------------------------- /aflpp/custom_mutators/gramatron/JSONC_VERSION: -------------------------------------------------------------------------------- 1 | af8dd4a307e7b837f9fa2959549548ace4afe08b 2 | -------------------------------------------------------------------------------- /aflpp/custom_mutators/gramatron/preprocess/prep_automaton.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script creates a FSA describing the input grammar *.g4 4 | 5 | if [ ! "$#" -lt 4 ]; then 6 | echo "Usage: ./prep_pda.sh [stack_limit]" 7 | exit 1 8 | fi 9 | 10 | GRAMMAR_FILE=$1 11 | GRAMMAR_DIR="$(dirname $GRAMMAR_FILE)" 12 | START="$2" 13 | STACK_LIMIT="$3" 14 | 15 | # Get filename 16 | FILE=$(basename -- "$GRAMMAR_FILE") 17 | echo "File:$FILE" 18 | FILENAME="${FILE%.*}" 19 | echo "Name:$FILENAME" 20 | 21 | 22 | # Create the GNF form of the grammar 23 | CMD="python gnf_converter.py --gf $GRAMMAR_FILE --out ${FILENAME}.json --start $START" 24 | $CMD 25 | 26 | # Generate grammar automaton 27 | # Check if user provided a stack limit 28 | if [ -z "${STACK_LIMIT}" ]; then 29 | CMD="python3 construct_automata.py --gf ${FILENAME}.json" 30 | else 31 | CMD="python construct_automata.py --gf ${FILENAME}.json --limit ${STACK_LIMIT}" 32 | fi 33 | echo $CMD 34 | $CMD 35 | 36 | # Move PDA to the source dir of the grammar 37 | echo "Copying ${FILENAME}_automata.json to $GRAMMAR_DIR" 38 | mv "${FILENAME}_automata.json" $GRAMMAR_DIR/ 39 | -------------------------------------------------------------------------------- /aflpp/custom_mutators/gramatron/test.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "hashmap.h" 8 | #include "uthash.h" 9 | #include "utarray.h" 10 | 11 | #define INIT_SIZE 100 // Initial size of the dynamic array holding the input 12 | 13 | typedef struct terminal { 14 | 15 | int state; 16 | int trigger_idx; 17 | size_t symbol_len; 18 | char * symbol; 19 | 20 | } terminal; 21 | 22 | typedef struct trigger { 23 | 24 | char * id; 25 | int dest; 26 | char * term; 27 | size_t term_len; 28 | 29 | } trigger; 30 | 31 | typedef struct state { 32 | 33 | int state_name; // Integer State name 34 | int trigger_len; // Number of triggers associated with this state 35 | trigger *ptr; // Pointer to beginning of the list of triggers 36 | 37 | } state; 38 | 39 | typedef struct { 40 | 41 | size_t used; 42 | size_t size; 43 | size_t inputlen; 44 | terminal *start; 45 | 46 | } Array; 47 | 48 | int init_state; 49 | int curr_state; 50 | int final_state; 51 | 52 | state *create_pda(char *); 53 | Array *gen_input(state *, Array *); 54 | void print_repr(Array *, char *); 55 | void initArray(Array *, size_t); 56 | void insertArray(Array *, int, char *, size_t, int); 57 | 58 | -------------------------------------------------------------------------------- /aflpp/custom_mutators/grammar_mutator/GRAMMAR_VERSION: -------------------------------------------------------------------------------- 1 | eedf07d 2 | -------------------------------------------------------------------------------- /aflpp/custom_mutators/grammar_mutator/README.md: -------------------------------------------------------------------------------- 1 | # Grammar-Mutator 2 | 3 | This is just a stub directory that will clone the real grammar mutator 4 | directory. 5 | 6 | Execute `./build_grammar_mutator.sh` to set everything up. 7 | -------------------------------------------------------------------------------- /aflpp/custom_mutators/grammar_mutator/update_grammar_ref.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ################################################## 4 | # AFL++ tool to update a git ref. 5 | # Usage: ./