Bash Vulnerability

What is Bash Vulnerability?

Bash Vulnerability, or Shellshock, as the name suggests, attacks Bash which is used to execute scripts and commands by UNIX based systems. Bash is free and often used as the built in command line interface distributed with the Linux. Environment variables are defined in Bash along with the scripts and functions which can be executed. An attacker if allowed to execute Bash, could also execute other arbitrary commands or scripts or other exploits without the knowledge of the user.

How it affects the system?

Thus, Bash vulnerability allows remote code execution through a lot of default configurations and is a serious risk to a wide range infrastructure on the Internet and the severity is extreme as bash is part of the default configuration of most Linux servers.

Bash is commonly used in UNIX software packages or servers such as web and mail and it is not commonly allowed to be accessed by external users. Only the system administrators and the maintenance crew use Bash to administrate their servers as well as perform the maintenance works.

This doesn’t sound so bad right? But in truth, if any external user sends any carefully and specifically formatted request to the web server, the servers than pass it on to Bash. This is when the problem begins to show itself. The carefully formatted request, when it reaches Bash, can now execute and programmed scripts or commands on the Bash shell even though it doesn’t have any security or access level clearances.

Future of Bash/Shellshock bug?

A patch was released which allowed Unix and OS X users to update their BASH shell to fix this vulnerability. However, it isn’t a complete fix. The patch only makes it harder to exploit the vulnerability while it still exists. Millions of user remain at risk and any systems that haven’t been patched yet can be compromised. A hacker community with resources may exploit this bug to create wide scale panic and affect the systems.

How do we fix it?

Although no complete solution has been found yet, the easiest way to protect yourself from Shellshock is to update Bash. That’s it. If not a complete fix, it mitigates the risk and makes it much harder to exploit.
An easy way to check if the vulnerability exists is to run the command line:
env ‘VAR=() { :;}; echo Bash is vulnerable!’ ‘FUNCTION()=() { :;}; echo Bash is vulnerable!’ bash -c “echo Bash Test”
A “Bash is vulnerable!” output means the vulnerability exists. Ubuntu/Debiandistros can update their bash using the following command line:
sudo apt-get update &&sudo apt-get install –only-upgrade bash

Arshad Ahmed
MBA-IT
IIIT Allahabad