Vulnerability: Shell Shock - Bash Bug - Bash Attack

This is stuff stolen from other sites/blogs just after the CVE disclosure. 
Don't quote me on it. Use at you own risks. YMMV.
The vulnerability is caused by the ability to create environment variables with values before calling the bash shell. 
The variables that are passed can contain code, which are executed before the shell is actually invoked. 
The vulnerability is then exposed in the ability to add extra code to the end of these functions.
  • More info:
The bug can currently be exploited through externally facing WEB servers as well as anything that listens 
to the world at large and sends variable info to bash. Current 0-day's include vuln scanning for Cpanel 
and other well known CGI scripts on the net.

Additional info:

Options:

  • Upgrade BASH to a patched version
  • Use a different shell than BASH (like DASH) for /bin/sh
  • Disable mod_cgi
  • Use rules to block nefarious requests

Debian/7 Wheezy Fix:

Just update the package database and reinstall bash:

(:source:)

  1. Update installation base:

$ apt-get update

  1. Check candidate

$ apt-cache policy bash bash:

Installed: 4.2+dfsg-0.1
Candidate: 4.2+dfsg-0.1+deb7u3
  1. Install the fix

$ apt-get install bash (:sourceend:)

Debian 6/Squeeze Fix

(:source:)

  1. check to ensure vulnerable

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

  1. make sure you are on debian 6

lsb_release -a

  1. Add the squeeze LTS repositary

echo “#LTS security” >> /etc/apt/sources.list.d/lts.list

echo “deb http://http.debian.net/debian/ squeeze main contrib non-free >>” /etc/apt/sources.list.d/lts.list echo “deb-src http://http.debian.net/debian/ squeeze main contrib non-free >>” /etc/apt/sources.list.d/lts.list

echo “deb http://http.debian.net/debian squeeze-lts main contrib non-free >>” /etc/apt/sources.list.d/lts.list echo “deb-src http://http.debian.net/debian squeeze-lts main contrib non-free” >> /etc/apt/sources.list.d/lts.list

  1. update and install patched bash

apt-get update apt-get install bash

  1. run a new shell

bash

  1. check patch success

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