Tuesday, November 11, 2014

Reload apache httpd server without restart the server


Login as root and type the following command


# /etc/init.d/httpd reload 

Sunday, September 28, 2014

Manually compile the bash for bash shellshock in your ubuntu or centos

Check the system is bash vulnerable or not
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
Centos
  • yum install gcc
Run the following scripts
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 not
env 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