env VAR='() { :;}; echo Bash is vulnerable!' bash -c "echo Bash Test"
Bash is vulnerable!
Bash Test
Make sure the compiler is installed, and you should have root access
Ubuntu
- apt-get install gcc make patch
- yum install gcc
mkdir src
cd src
wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
#download all patches
for i in $(seq -f "%03g" 0 26); do wget http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-$i; done
tar zxvf bash-4.3.tar.gz
cd bash-4.3
#apply all patches
for i in $(seq -f "%03g" 0 26);do patch -p0 < ../bash43-$i; done
#build and install
./configure && make && make install
Check again the system is bash vulnerable or notenv VAR='() { :;}; echo Bash is vulnerable!' bash -c "echo Bash Test"if following is show, you are safe now.
bash: warning: VAR: ignoring function definition attempt
bash: error importing function definition for `VAR'
Bash Test
No comments:
Post a Comment