Month: September 2014

Shellshock – What To Do To Make Yourself Safe

Shellshock is a vulnerability in the Bash shell. A shell is the program that provides a command line interface. Bash is the default shell in the Ubuntu universe. The Bash shell is vulnerable to a particular type of attack, described here: GNU Bash Remote Code Execution Vulnerability (CVE-2014-6271).

To determine if your Ubuntu box is vulnerable, Type the following at a command line, and then press enter. It is probably easiest to copy this and paste it into the terminal window, it must be typed exactly as shown and the spaces are important.

env x='() { :;}; echo vulnerable’ bash -c “echo this is a test”

If your system has the vulnerability, the output to the terminal window will be:

vulnerable
this is a test

If your system is secure, the output to the terminal window could show one of two things. One is this longer message:

bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x’
this is a test

The other, shorter message is simply:

This is a test

If you find you have the vulnerability you can update your system to a patched version of Bash by entering the following at a command line and then pressing enter:

sudo apt-get update && sudo apt-get upgrade

You will be prompted for your password. A lot of screen output will be displayed, and eventually you will be returned to a command prompt. You can then repeat the above test to check that the vulnerability has now been secured.

Following my own updates on my Trusty Tahr 14.04 the version of Bash I was upgraded to is version 4.3.11(1)-release, and this passes the vulnerability test.

Tags : , ,