'Documentation is a love letter that you write to your future self.' - Damian Conway

Apr 27, 2018 - 1 minute read - Research

Go-Fuzz Quickstart

Github Link


  1. Get Go-fuzz by go get
  2. Build and install go-fuzz and go-fuzz-build.
    • cd src\\dvyukov\go-fuzz\go-fuzz
    • go install
    • cd ..\go-fuzz-build
    • go install
  3. Get the target package and store it in GOPATH. I usually keep it under src\\author\project.
  4. Create a new file in the target package named Fuzz.go.
  5. Create a function named Fuzz inside Fuzz.go with this signature func Fuzz(data []byte) int.
  6. Fuzz should return 1 if input is good and 0 otherwise.
  7. Create fuzzing directory, e.g. go-fuzz-project-name.
  8. go-fuzz-build (note forward slashes even on Windows). Copy the resulting file ( to the fuzzing directory.
  9. Make a directory called corpus and store samples there.
  10. go-fuzz -workdir=. to begin fuzzing.