0% found this document useful (0 votes)
332 views4 pages

WinAFL/AFL Fuzzing Workshop Guide

This document provides information about a workshop on fuzzing and finding vulnerabilities with WinAFL/AFL. The workshop will last 3+ hours and cover different types of vulnerabilities, fuzzing techniques on Windows and Linux, debugging crashes, and hands-on exercises fuzzing real-world programs using AFL and WinAFL. Recommended setup instructions are provided for Linux and Windows virtual machines.

Uploaded by

Gyfff
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
332 views4 pages

WinAFL/AFL Fuzzing Workshop Guide

This document provides information about a workshop on fuzzing and finding vulnerabilities with WinAFL/AFL. The workshop will last 3+ hours and cover different types of vulnerabilities, fuzzing techniques on Windows and Linux, debugging crashes, and hands-on exercises fuzzing real-world programs using AFL and WinAFL. Recommended setup instructions are provided for Linux and Windows virtual machines.

Uploaded by

Gyfff
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
  • Linux Setup
  • Introduction
  • Windows Setup

Fuzzing and finding vulnerabilities with WinAFL/AFL

Many people are interested in finding vulnerabilities but don't know where to start. This workshop is
aimed at solving this problem. At first, we will cover different types of vulnerabilities like
Buffer overflow, heap overflow, integer overflow, Use After Free. We will than discuss what is
fuzzing and how it is used to find various vulnerabilities, we will cover different types of fuzzers on
windows and Linux operating systems. we will also cover how to write simple harness program
which we can fuzz to find windows-based vulnerabilities as well Linux based vulnerabilities. we will
also cover some real-life example which we have reported to the various vendors which resulted in
various CVEs.

Training Duration: 3+ hours Approx.

Key Take Aways from this training:

1. Understanding of different types of vulnerabilities.


2. Understanding of different types of fuzzers and how do they work on Linux and
Windows.
3. Understanding of Debugging, Root Cause analysis and crash triage on Linux and
Windows System.
4. Understanding of how to Fuzz real world programs using AFL and WinAFL.

Recommended Linux Setup

Attendees will need to have a Linux VM to follow the exercises and hands on mentioned during the
training. You can download kali linux from here: [Link]
release/

Configuration instructions:

1. Create a folder named “Fuzzing” in you home directory.


2. You need to get AFL, for that follow this steps:
a. Go to command prompt and run this command:

git clone [Link]

this will clone AFL git repository in “fuzzing/AFL” directory.

b. It will look like this:


c. After that run following command:
git clone [Link]
cd tcpdump
git clone [Link]
git clone [Link]

above command will clone tcpdump, libpcap and libtiff which we will be using for hands on
exercises and will look like this:

3. You can copy “AFLCrashes” folder inside “Fuzzing” folder. These are the crashes from the
“imgreadafl.c” compiled binary. You can use this to debug the crashes during the workshop
and later on for practice. This will make sure that each attendee is debugging same crash
during the workshop.

Recommended Windows Setup

Attendees need to have a Windows VM[preferably Windows 7] to follow the exercises and hands on
mentioned during the training.

Configuration instruction:

1. Create a folder named “Fuzzing” in your “C:\” drive.


2. Download latest version of winafl from below link, unzip and copy it to “C:\Fuzzing” folder:
a. [Link]
b. It should look like this:

c.
3. Download DynamoRIO from following link,unzip and copyit to “C:\Fuzzing” folder.
a. [Link]
[Link]

Note: [Link] is for windows 7, if you have windows 10 then


download latest version:
[Link]
1/[Link]

b. It should look like this:

4. Download and install visual studio 2015 runtime installer from here:
a. [Link]
5. Copy “imgread.c” and “imgread_persistent.c” inside “Fuzzing” folder on both linux and
Windows VMs. We will be fuzzing these files during the hands on exercise during the
workshop. In case of any issues with the compilation, you can use compiled binaries which
are also present in “Compiled Binaries” folder.

Common questions

Powered by AI

The key components and setup requirements for participating in the fuzzing training workshop include setting up a Linux VM with a configuration that includes the creation of a 'Fuzzing' directory, acquiring tools such as AFL, tcpdump, libpcap, and libtiff for hands-on exercises, and using a Windows VM with installed tools like WinAFL, DynamoRIO, and Visual Studio 2015 runtime. Participants are expected to configure these environments to facilitate fuzzing activities and debug crashes consistently across different operating systems .

Using WinAFL for fuzzing exercises on Windows provides a specialized tool adapted for Windows environments, benefiting from its integration with DynamoRIO, which allows for more comprehensive instrumentation of binaries. Compared to other tools, WinAFL can handle complex Windows applications better due to this integration, although it might not be as straightforward as using AFL on Linux where direct POSIX support enhances compatibility. However, WinAFL’s specific design for Windows makes it particularly powerful for identifying vulnerabilities in Windows-based software .

The training covers vulnerabilities such as buffer overflow, heap overflow, integer overflow, and use-after-free. Buffer overflows can lead to arbitrary code execution by overwriting the return address on the stack. Heap overflows can corrupt memory and control data, potentially allowing an attacker to execute arbitrary code. Integer overflows occur when an arithmetic operation exceeds the storage capacity of the integer datatype, leading to unexpected behaviors. Use-after-free vulnerabilities arise when a program continues to use a pointer after it has been freed, which can be exploited to execute arbitrary code or cause a denial of service .

Learning to fuzz 'real-world' programs provides significant benefits, as it equips trainees with practical experience that mirrors actual vulnerability discovery conditions. It enhances understanding of the bugs that exist in commonly used software, improves skills in developing test cases applicable to realistic software environments, and increases the potential to report findings that could lead to the assignment of CVEs. This practical knowledge helps in transitioning theoretical fuzzing concepts into actionable security assessments .

DynamoRIO plays a crucial role when using WinAFL on Windows systems during fuzzing exercises by providing a robust dynamic instrumentation framework. This integration allows for precise monitoring and manipulation of the execution of binaries, enabling more effective identification of code paths and behavior during fuzz tests. It enhances WinAFL's ability to perform coverage-guided fuzzing by maintaining accurate tracking of how inputs interact with the application under test, thereby improving vulnerability detection .

Familiarizing oneself with both debugging and root cause analysis is crucial in the context of fuzzing because they enable the identification of underlying issues when a program crashes during fuzz testing. Debugging allows researchers to trace the execution flow, monitor memory states, and pinpoint where errors occur. Root cause analysis helps in understanding why these errors happen, providing insights into the vulnerability exploited by the fuzzing process. Together, they enable a comprehensive understanding of software vulnerabilities and guide the development of patches or mitigations .

Using virtual environments like Linux or Windows VMs optimizes learning and application of fuzzing techniques by providing isolated and controlled platforms. This setup allows for safe experimentation without risk to the host system, enables easy reversion to clean states using snapshots, and facilitates consistent results across different testing scenarios. Virtual environments also allow for the customization needed to match specific workshop requirements, such as installing necessary tools like AFL, WinAFL, and DynamoRIO, which helps learners focus on fuzzing without environmental constraints .

The training discusses different types of fuzzers including AFL (American Fuzzy Lop) for Linux and WinAFL for Windows. AFL uses genetic algorithms to automatically discover test cases that trigger new internal states in the targeted binary, thus increasing code coverage. WinAFL is adapted from AFL, designed to work with Windows applications, and integrates with tools like DynamoRIO to monitor and instrument binaries. The functionality differences primarily revolve around operating system specifics and available instrumentation tools, which impact how test cases are generated and executed .

Participants might face challenges such as environment configuration issues, compilation errors, or difficulties understanding how to set up and execute fuzzing scenarios using 'imgread.c' and 'imgread_persistent.c'. The training offers precompiled binaries as a solution to ensure that everyone can participate in the exercises regardless of compilation success. This avoids setup bottlenecks and focuses the learning on the fuzzing process and analysis of fuzzer-induced crashes rather than troubleshooting environment setup .

Fuzzing helps identify vulnerabilities by automatically injecting random or structured data into programs to find unexpected behavior or crashes. It allows researchers to identify security weaknesses by observing how the software handles invalid inputs, thus revealing potential vulnerabilities such as buffer overflows or memory management issues that could be exploited by attackers. This technique is crucial in security research for uncovering vulnerabilities before they can be exploited in the wild .

Fuzzing and finding vulnerabilities with WinAFL/AFL 
 
Many people are interested in finding vulnerabilities but don't know
c. After that run following command: 
git clone https://github.com/the-tcpdump-group/tcpdump.git  (https://github.com/the
b. It should look like this: 
c. 
 
3. Download DynamoRIO from following link,unzip and copyit to “C:Fuzzing” folder. 
a. ht
5. Copy “imgread.c” and “imgread_persistent.c” inside “Fuzzing” folder on both linux and 
Windows VMs. We will be fuzzing the

You might also like