Created
September 25, 2014 20:01
-
-
Save srinivasmohan/7509eac7e9cf7080a321 to your computer and use it in GitHub Desktop.
shellsock.sh
This file contains 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 | |
#Patch bash for CVE-2014-6271 - For non-lts distro versions. | |
mkdir -p /usr/local/src && cd /usr/local/src | |
wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz | |
tar zxvf bash-4.3.tar.gz | |
#Get patches | |
for i in $(seq -f "%03g" 0 25); do wget http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-$i; done | |
cd bash-4.3 | |
for i in $(seq -f "%03g" 0 25);do patch -p0 < ../bash43-$i; done | |
./configure && make && make install | |
cp -f /usr/local/bin/bash /bin/bash | |
#TEST post run: env x='() { :;}; echo vulnerable' bash -c "echo this is a test" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment