2

Aim:

  • I am trying to setup and run Afl Fuzzer (link), as part of following an online course.

Info:

  • I'm running Ubuntu 14.04 on dvd.
  • In the video the teacher uses the BinUtils 2.25 package, and I chose to use the latest version 2.26.
  • I don't have much experience with compiling / making software.

Steps I followed:

  • Downloaded the latest version of BinUtils to the Desktop (/home/ubuntu/Desktop)
  • Unpacked BinUtils folder using tar via Terminal.
  • Used make to try to create the program in the unpacked folder on the Desktop, which I think worked.
  • Downloaded the latest version of afl-latest.tgz from here to /home/ubuntu/.
  • Unpacked afl-latest.tgz using tar via Terminal.
  • Used make to try to create the program in /home/ubuntu/afl-2.08b, which I think worked.

Problems:

  • The output using ls -a of that folder is significantly different to the output shown on the video (ie I don't have all of the files that the Teacher has shown) after make has been run.
  • Get error bash: ./configure: No such file or directory when in the folder /home/ubuntu/afl-2.08b/, and try to run the following command: CC=afl-gcc ./config. The afl-gcc.c file exists in the folder. Do I need to try ./configure --prefix=/home/ubuntu/afl-2.08b/ ?
  • Cannot compile executables error message.

What I've tried:

  • Tried to find out which folder for Binutils I should be in for doing the make. It's not clear from the online course, and there are several similarly named folders. Searches have not been fruitful thus far.
  • Posted question re the BinUtils folder on Course chat area for the video in question.
  • Sent email asking where BinUtils folder is to the course provider.
  • Read the Readme file for BinUtils.
  • Read the Readme file for afl-2.08b.
  • Googled cannot compile executables

I wasn't sure whether this is my inexperience of using Ubuntu terminal commands, or trying to follow unclear instructions.

What I haven't tried yet:

  • Installed latest version of gcc

Update:

I got it working in the end. I think I should have been running ./configure when in the /binutils folder.

I also forgot to do:

1) chmod 777 -R on each of the folders 2) sudo make install

1 Answers1

0

Unless you have a particular reason to build afl from source, I would recommend using Ubuntu Xenial (16.04), which comes with afl in the repositories. Just run this:

sudo apt-get install afl

and now afl-gcc will be in your $PATH, so you won't get the No such file or directory error.

Next, install the dependencies required to build binutils:

sudo apt-get build-dep binutils

Now you can download and build the source to binutils into the current working directory with a single command, no sudo required:

apt-get source -b binutils

This will take a while to download and build. It won't be the latest sources, but that should not be necessary for fuzzing.

Once they are finished building, you will be in much better shape for recompiling with afl-gcc and starting the fuzzing process.

Nathaniel M. Beaver
  • 1,518
  • 12
  • 33
  • This will be useful for those with a good connection. The one I use is temperamental so have to do manual install via removable media. – unseen_rider Jun 27 '16 at 19:17
  • Do you need a good connection to install afl or to download the source code for binutils? The afl package is less than 100 kBytes. – Nathaniel M. Beaver Jun 27 '16 at 23:15
  • Also, you can install dependencies to a flash drive as described here: http://askubuntu.com/questions/974/how-can-i-install-software-or-packages-without-internet-offline – Nathaniel M. Beaver Jul 11 '16 at 16:27
  • If you mean to download Ubuntu itself, torrents are good for a temperamental connection. https://ubuntu.com/download/alternative-downloads – Nathaniel M. Beaver Jul 18 '19 at 14:23