Tarrant County College District Vulnerable Program with AFL Lab Report

User Generated


Computer Science

CSE 4380

Tarrant County College District



you will need to use this C code during your work

#include <stdio.h>

#include <stdlib.h>

#include <stddef.h>

int FuzzMe(char *Data, long DataSize)


 if(DataSize > 3 && Data[0] == 'F' && Data[1] == 'U' && Data[2] == 'Z' && Data[3] == 'Z') 

     return 1; // :-< 

return 0;


int main(int argc,char* argv[])

 FILE *fp=fopen(argv[1],"r");  //Read a file given by the user

  fseek(fp, 0, SEEK_END); 

 long fsize = ftell(fp); 

 fseek(fp, 0, SEEK_SET);

  char *data = malloc(fsize+1); 

 fread(data, 1, fsize, fp); 


 int status = FuzzMe(data,fsize); 

 if(status) abort(); // Catch the predefined code. 


  return 0;


Unformatted Attachment Preview

CSE4380/5380 InfoSec 1 Take-home Experiment 1 Due on Mar 26,2021 11:59pm The objective of this take-home experiment is to get familiar with a popular fuzz testing tool, American Fuzzy Lop (AFL), which is a security-oriented fuzzer to detect vulnerabilities in the target program. Here is the official website, http://lcamtuf.coredump.cx/afl/ and its source code https://github.com/google/AFL. In this experiment, you will be asked to install AFL and execute the tool on a vulnerable C program to detect its vulnerabilities. At the end, you are asked to write an experiment report to explain your work step by step, including set up, execution steps with proper commands, and the results you observe. Attach some screenshots with timestamp to show your work as well. You will also need to answer the following questions in your report. Note: If you answer the questions without step-by-step report, you are only given half of full points. To setup • To protect your own machine, install a virtual machine with Ubuntu operation system to execute AFL. • Download AFL’s source code or clone it from GitHub (https://github.com/google/AFL). Install it on your virtual machine. DO NOT change any configurations of AFL. • Execute AFL with the file test-instr.c in the source code to test the build. o Analyze the source code to understand how it works. Run it without AFL. o Run this file with AFL to get familiar with AFL status screen. o You need to manually stop AFL execution. Test the vulnerable program with AFL The given vulnerable program has a pre-defined crash code. The program will exit with failure if the user provides the correct code. Run the program with AFL to find a file that crashes the program. (Note: DO NOT directly put the pre-defined data in your initial seed input.) You need to compile the program with AFL’s compiler to inject coverage instrumentation. Then execute the program with fuzzing engine to detect vulnerabilities. Answer the following question in your report: Question 1 (10 pts): How do you execute the vulnerable program with AFL? What is the fuzzing result? List necessary commands you use. Also show a screenshot of AFL result with timestamp. Question 2 (10 pts): What is Fuzz Testing (basic idea) and its challenges? Which method does AFL use to solve the problems? (Hint: see its documentation) Question 3 (10 pts): Briefly explain the overall algorithm of AFL approach. Question 4 (10 pts): How does AFL measure the code coverage? List formula if available. (Hint: see its technical details file) Question 5 (10 pts): What is fork server? Why does AFL use it during the fuzzing?
Purchase answer to see full attachment
Explanation & Answer:
You can put all your answers in one file. No code submission required.
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Attached. Please let me know if you have any questions or need revisions.

Running Head: REPORT


Name of Author
Institutional Affiliation
Date of Submission



Fuzzing is an application testing technique that involves stress testing an application by
providing random invalid inputs. These inputs allow for easy monitoring of the application’s
behavior. Fuzzing thus monitors the behavior of the application under these stressful conditions
to watch out for memory leaks, crashing among others. Fuzzing is achieved through ‘Fuzzers’
which are applications tailored to aid testing. The main goal of fuzzing is usually to find bugs in
an application that exist outside the scope of human testing. Fuzzing is also a key component in
the robust development of applications through incorporation into the testing phase of
applications. In this paper, we will look at the American Fuzzy Lop; a smart fuzzer that mutates
the initial input to try and find new possible errors. The tool generates different test cases from a
single seed input which is used to find new paths. The test lab used is Ubuntu Virtual Machine
with the ‘clang’ library.
Environment Setup
Before we begin the testing process, we have to install all the necessary files. First, we install the
C language libraries and compilers to...

Great! Studypool always delivers quality work.

Similar Questions
Related Tags