Created
September 25, 2014 22:30
-
-
Save fallwith/b2d51706747937cbf5ea to your computer and use it in GitHub Desktop.
Upgrade Bash from source in response to shellshock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# build and install a fully patched bash 4.3 to mitigate shellshock | |
# | |
# to determine vulnerability: | |
# %> env x='() { :;}; echo vulnerable' bash -c "echo this is a test" | |
mkdir bash_src | |
cd bash_src | |
wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz | |
tar xzf bash-4.3.tar.gz | |
cd bash-4.3 | |
for i in $(seq -f "%03g" 0 25); do | |
wget http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-$i | |
patch -p0 < bash43-$i | |
done | |
./configure && make && make install | |
cd ../.. | |
rm -rf bash_src |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment