Login as root and type the following command
# /etc/init.d/httpd reload # /etc/init.d/httpd reload env VAR='() { :;}; echo Bash is vulnerable!' bash -c "echo Bash Test"
Bash is vulnerable!
Bash Test
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"bash: warning: VAR: ignoring function definition attempt
bash: error importing function definition for `VAR'
Bash Test