Git Product home page Git Product logo

aflize's Introduction

afl-sid

afl-sid (also referred to as "aflize") makes it easier to perform fuzz testing by automating the process of rebuilding software with a custom compiler. The tool downloads all the required build dependencies and then instruments the binary for american fuzzy lop support. This is as easy as running two commands:

docker run -ti d33tah/afl-sid bash
aflize bison

In the example above, afl-sid would automatically download build dependencies and the source code for GNU Bison program. After that, it would compile it with afl-gcc with address sanitization (ASAN) enabled. You will even get a Debian package that you can use later to easily reproduce any bugs you find during the fuzzing!

afl-sid requires Docker to be installed in order to work. Once you have it, you will be able to experiment with your newly built binary in isolation from your host operating system. afl-fuzz is already installed, so you can jump from idea to fuzzing in just a few minutes. In the video linked below you can see how simple it can become:

Video

Call for support

Probably the biggest problem with aflize right now is that hardly anyone knows it. This is why if you're in touch with any open source developers, tell them about it! I will really be grateful if you spread the word mailing lists, IRC channels, forums and so on.

That doesn't mean that other forms of help aren't welcome. I'll be happy to hear any feedback from you. If you know how to make this program better, create a Github issue. Thanks in advance!

Notes

Below are a couple of random notes that were collected from afl-sid users. I have not tested all of them yet but you may nevertheless find them quite helpful.

  1. After having generated a package by aflize, you need to install it. You can run dpkg -i ~/pkgs/*.deb for that. If dpkg complains about missing dependencies, you can fetch them quickly by calling apt-get -f install -y.
  2. Some software is represented by metapackages that point to specific versions of a program. For example, if you want to build Python", you should rather aflize python3.5 ("python3" might not be specific enough either).
  3. If you're running out of disk space or plan to build a big package, keep in mind that by default Docker allocates 10 GiB per container. Read up on how to increase this value if you plan to build, say, libreoffice.
  4. Some packages won't build and this can often be a bug that should be reported to the Debian package maintainers. If the "aflize" failed while performing post-build tests, you can still use the resulting binary. Look for it in /root/pkg directory. You can also apply patches at this stage and try just running "make". Sometimes it's that easy.
  5. If you built a big package, consider submitting it to afl-sid-repo: https://github.com/d33tah/afl-sid-repo. If you're about to build a big package but don't feel like waiting for the process to complete, check this repository out.

Building

If you prefer to build the project manually, just call:

docker build -t d33tah/afl-sid .

After that, you can use the docker run command as described above.

Bugs, problems, discussion

If you're looking for more information, take a look at the issue tracker here:

https://github.com/d33tah/afl-sid-repo/issues

Feel invited to create issues for anything related to your project that comes to your mind.

aflize's People

Contributors

d33tah avatar therealjumbo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aflize's Issues

Unable to start container

When I run docker run -ti d33tah/afl-sid on my Ubuntu 16.04 x86, it downloads the files for the docker container and when it attempts to launch the container, displays the following error:

FATA[0000] Error response from daemon: Cannot start container 11b1fc0eb7981af5dd2697290edc151903c1c34428077a358d7b2bae196acf87: [8] System error: exec format error

Failed to run sample command 'aflize bison'

failed to run sample command

(inside d33tah/afl-sid of image version id 99e736835753)
# aflize bison
Mon Feb 15 05:54:03 2016: Aflizing bison
Mon Feb 15 05:54:04 2016: Reading package lists...
Mon Feb 15 05:54:04 2016: Building dependency tree...
Mon Feb 15 05:54:04 2016: Reading state information...
Mon Feb 15 05:54:04 2016: The following NEW packages will be installed:
Mon Feb 15 05:54:04 2016:   autotools-dev bsdmainutils debhelper dh-strip-nondeterminism file gettext
Mon Feb 15 05:54:04 2016:   gettext-base groff-base intltool-debian libarchive-zip-perl libcroco3
Mon Feb 15 05:54:04 2016:   libfile-stripnondeterminism-perl libmagic1 libpipeline1 libsigsegv2
Mon Feb 15 05:54:04 2016:   libtimedate-perl libunistring0 libxml2 m4 man-db po-debconf
Mon Feb 15 05:54:05 2016: 0 upgraded, 21 newly installed, 0 to remove and 63 not upgraded.
Mon Feb 15 05:54:05 2016: E: The package index files are corrupted. No Filename: field for package libpipeline1.
Mon Feb 15 05:54:05 2016: E: Failed to process build dependencies
Mon Feb 15 05:54:05 2016: Reading package lists...
Mon Feb 15 05:54:05 2016: Building dependency tree...
Mon Feb 15 05:54:05 2016: Reading state information...
Mon Feb 15 05:54:05 2016: The following NEW packages will be installed:
Mon Feb 15 05:54:05 2016:   autotools-dev bsdmainutils debhelper dh-strip-nondeterminism file gettext
Mon Feb 15 05:54:05 2016:   gettext-base groff-base intltool-debian libarchive-zip-perl libcroco3
Mon Feb 15 05:54:05 2016:   libfile-stripnondeterminism-perl libmagic1 libpipeline1 libsigsegv2
Mon Feb 15 05:54:05 2016:   libtimedate-perl libunistring0 libxml2 m4 man-db po-debconf
Mon Feb 15 05:54:06 2016: 0 upgraded, 21 newly installed, 0 to remove and 63 not upgraded.
Mon Feb 15 05:54:06 2016: E: The package index files are corrupted. No Filename: field for package libpipeline1.
Mon Feb 15 05:54:06 2016: E: Failed to process build dependencies
Mon Feb 15 05:54:06 2016: Breaking.
Failed do download dependencies for bison.

Looks like some docker users encountered this similar issue as well.
moby/moby#19757

I don't really understand this issue. However, "apt-get upgrade" fixed it, fyi.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.