tree: 0931bbde57b8fa9a88b4b90551f4a0c4e089f428 [path history] [tgz]
  1. corpus/
  2. bind-9.11.11.patch
  3. bind-9.13.2.patch
  4. bind-9.13.5-W1.patch
  5. bind-9.15.2.patch
  6. bind-9.15.4.patch
  7. bind-9.15.6.patch
  8. bind-9.15.7.patch
  9. bind-9.16.0.patch
  10. named.conf
  11. README.md
  12. test.zone
examples/bind/README.md

Fuzzing ISC BIND (verified with 9.15.4)

Requirements

  • honggfuzz (1.9 or from the master branch)
  • clang-5.0 or newer (the newer, the better)
  • ISC Bind (tested with 9.15.4)

Preparation

  1. Compile honggfuzz
  2. Download bind-9.15.4.tgz from https://downloads.isc.org/isc/bind9/
  3. Decompress/unpack and patch it
$ cd <fuzzing_dir>
$ tar -xvzf bind-9.15.4.tar.gz
$ cd bind-9.15.4
$ patch -p1 < <honggfuzz_dir>/examples/bind/bind-9.15.4.patch
$ chmod 755 compile.sh
  1. Configure, compile and install ISC Bind
  • edit compile.sh, so it contains the correct dist (--prefix) path
$ vim compile.sh # [edit the --prefix]
$ ./compile.sh
$ make install
  1. Copy the custom configuration files to <fuzzing_directory>/bind/dist/etc/named.conf (i.e. to your bind/named dist directory)
$ cp honggfuzz/examples/bind/named.conf <fuzzing_directory>/bind/dist/etc/
$ cp honggfuzz/examples/bind/test.zone <fuzzing_directory>/bind/dist/etc/
  1. Fix the directory configuration directive inside your <fuzzing_directory>/bind/dist/etc/named.conf
$ vim <fuzzing_directory>/bind/dist/etc/named.conf # [edit the *directory* directive] 
  1. Fuzz it!
$ <honggfuzz_dir>/honggfuzz -i input_corpus -- ./dist/sbin/named -c <fuzzing_directory>/bind/dist/etc/named.conf -g