Skip to content

Instantly share code, notes, and snippets.

@ozzyjohnson
Created November 10, 2014 04:47
Show Gist options
  • Save ozzyjohnson/23f5bb20146432305514 to your computer and use it in GitHub Desktop.
Save ozzyjohnson/23f5bb20146432305514 to your computer and use it in GitHub Desktop.
Segfaulting build of Bash for AFL.
apt-get update && apt-get -y install bison \
&& wget http://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz \
&& tar xzvf bash-4.2.tar.gz \
&& wget -r -l 1 http://ftp.gnu.org/gnu/bash/bash-4.2-patches/ \
&& rm ftp.gnu.org/gnu/bash/bash-4.2-patches/*.sig \
&& rm ftp.gnu.org/gnu/bash/bash-4.2-patches/index* \
&& cd bash-4.2 \
&& for i in ../ftp.gnu.org/gnu/bash/bash-4.2-patches/*; do patch -p0 < $i; done \
&& CC=/usr/local/bin/afl-gcc ./configure
&& make \
&& afl-fuzz -i ../bash_in -o ../bash_out ./bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment