Thursday, September 25, 2014

Shellshock - your bash may be making you vulnerable

Turns out that if you are a Linux or a Mac user you may be vulnerable to remote attacks via your bash shell. To check whether your machine is vulnerable you can use the following command:

$ env x='() { :;}; echo vulnerable' bash -c 'echo hello'

if your terminal returns the message "vulnerable hello" than you are vulnerable and you need to remediate that.

You are safe if the message "bash: warning: x: ignoring function definition attempt bash: error importing function definition for 'x' hello"

To fix your system you can update your bash via the command line by typing:

$ sudo apt-get update && sudo apt-get install --only-upgrade bash

this command will work on any debian based distro, if you are using another distro, I would redirect you to this link for the appropriate command to update your respective bash.

No comments:

Post a Comment