Skip to content

Instantly share code, notes, and snippets.

@ideoforms
Created September 25, 2014 18:49
Show Gist options
  • Save ideoforms/4dd772e3d1e6a68efe5a to your computer and use it in GitHub Desktop.
Save ideoforms/4dd772e3d1e6a68efe5a to your computer and use it in GitHub Desktop.
download and recompile bash to patch the shellshock vulnerability
#!/bin/bash
# download and recompile bash to patch the shellshock vulnerability
# http://www.theregister.co.uk/2014/09/24/bash_shell_vuln/
#
# when built, replace your system /bin/bash (and /bin/sh)
# with bash-4.3/bash
#
# to verify the fix:
# env X="() { :;} ; echo vulnerable" | bash -c "echo completed"
#
# daniel jones <http://www.erase.net>
wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
tar xzf bash-4.3.tar.gz
cd bash-4.3
wget http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-025
patch -p0 < bash43-025
./configure
make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment