Dean Williams

Check for Shellshock in WHM/cPanel/CentOS

You are currently viewing the Mobile Optimized version (AMP), some features may be missing or may not work as expected. Open Full Version.

The new Shellshock Bash Vulnerability is a serious vulnerability affecting any UNIX/Linux/Mac based Operating System, it has only recently been discovered and can basically allow any command full root permissions on your server, so for instance an attacker can gain access to your PHP Script and then use the exec function (which is a PHP function that provides BASH access) to execute anything as root.

The vulnerability works by placing a piece of code into a BASH variable and executing it using some clever code.

Fortunately using a similar approach we can identify if your BASH is vulnerable or not, all you need to do is execute the below BASH code:

 

env 'VAR=() ; echo Bash is vulnerable!' 'FUNCTION()=() ; echo Bash is vulnerable!' bash -c "echo Bash Test"

 

If your output is:

 

So if you did fail the above test then you will need to update your BASH installation, you can do this by:

Author: Dean Williams

I'm a Web Developer, Graphics Designer and Gamer, this is my personal site which provides PHP programming advice, hints and tips