Fuzzing-101

February 14, 2022 · View on GitHub

Do you want to learn how to fuzz like a real expert, but don't know how to start?

If so, this is the course for you!

10 real targets, 10 exercises. Are you able to solve all 10?

Structure

Exercise No.TargetCVEs to findTime estimatedMain topics
Exercise 1XpdfCVE-2019-13288120 minsAfl-clang-fast, Afl-fuzz, GDB
Exercise 2libexifCVE-2009-3895, CVE-2012-28366 hoursAfl-clang-lto, Fuzz libraries, Eclipse IDE
Exercise 3TCPdumpCVE-2017-130284 hoursASan, Sanitizers
Exercise 4LibTIFFCVE-2016-92973 hoursCode coverage, LCOV
Exercise 5Libxml2CVE-2017-90483 hoursDictionaries, Basic parallelization, Fuzzing command-line arguments
Exercise 6GIMPCVE-2016-4994, Bonus bugs7 hoursPersistent fuzzing, Fuzzing interactive applications
Exercise 7VLC media playerCVE-2019-147766 hoursPartial instrumentation, Fuzzing harness
Exercise 8Adobe Reader8 hoursFuzzing closed-source applications, QEMU instrumentation
Exercise 97-ZipCVE-2016-23348 hoursWinAFL, Fuzzing Windows Applications
Exercise 10 (Final Challenge)Google Chrome / V8CVE-2019-58478 hoursFuzzilli, Fuzzing Javascript engines

Changelog

  • 02/14/2022: Fixed some 'wget' typos in Exercise 5
  • 11/25/2021: Exercise 3 updated with some fixes.

Who is the course intended for?

  • Anyone wishing to learn fuzzing basics
  • Anyone who wants to learn how to find vulnerabilities in real software projects.

Requirements

  • All you need for this course is a running Linux system with an internet connection. You will find a suitable VMware image in the exercises.
  • At least basic Linux skills are highly recommended.
  • All the exercises have been tested on Ubuntu 20.04.2 LTS. You can download it from here
  • In this course we're going to use AFL++, a newer and superior fork of Michał "lcamtuf" Zalewski's AFL, for solving the fuzzing exercises.

What is fuzzing?

Fuzz testing (or fuzzing) is an automated software testing technique that is based on feeding the program with random/mutated input values and monitoring it for exceptions/crashes.

AFL, libFuzzer and HonggFuzz are three of the most successful fuzzers when it comes to real world applications. All three are examples of Coverage-guided evolutionary fuzzers.

Coverage-guided evolutionary fuzzer

  • Evolutionary: is a metaheuristic approach inspired by evolutionary algorithms, which basically consists in the evolution and mutation of the initial subset (seeds) over time, by using a selection criteria (ex. coverage).

  • Coverage-guided: To increase the chance of finding new crashes, coverage-guided fuzzers gather and compare code coverage data between different inputs (usually through instrumentation) and pick those inputs which lead to new execution paths.

Simplification of the coverage gathering process of a coverage-guided evolutionary fuzzer

Thanks

Thanks for their help:

Contact

Are you stuck and looking for help? Do you have suggestions for making this course better or just positive feedback so that we can create more fuzzing content? Do you want to share your fuzzing experience with the community? Join the GitHub Security Lab Slack and head to the #fuzzing channel. Request an invite to the GitHub Security Lab Slack