Breaking

Remote exploit vulnerability in bash CVE-2014-6271

danger
RELATED TOPICS

A remotely exploitable vulnerability has been discovered by Stephane Chazelas in bash on Linux and it is unpleasant. The vulnerability has the CVE identifier CVE-2014-6271 and has been given the name Shellshock by some. This affects Debian as well as other Linux distributions. You will need to patch ASAP.

Bash supports exporting shell variables as well as shell functions to other bash instances. This is accomplished through the process environment to a child process. 

The major attack vectors that have been identified in this case are HTTP requests and CGI scripts. 

From Akamai

Akamai has validated the existence of the vulnerability in bash, and confirmed its presence in bash for an extended period of time. We have also verified that this vulnerability is exposed in ssh---but only to authenticated sessions. Web applications like cgi-scripts may be vulnerable based on a number of factors; including calling other applications through a shell, or evaluating sections of code through a shell.

There are several functional mitigations for this vulnerability: upgrading to a new version of bash, replacing bash with an alternate shell, limiting access to vulnerable services, or filtering inputs to vulnerable services. Akamai has created a WAF rule to filter this exploit; see "For Web Applications" below for details.


If you have a username in your authorization header this could also be an attack vector.

Another attack surface is OpenSSH through the use of AcceptEnv variables. As well through TERM and SSH_ORIGINAL_COMMAND. An environmental variable with an arbitrary name can carry a nefarious function which can enable network exploitation. This is fire bad.

The race is on. Will you be able to patch before Metasploit has a working exploit? 

Tod Beardsley, engineering manager from Rapid7, had this to say,

"As you might have guessed, we're busy at work putting together a Metasploit module that demonstrates the bash bug (CVE-2014-6271), as is the rest of the world of open source security contributors. I expect to see a first version today.

That said, it's difficult to write one "bash bug" exploit -- this is the sort of exploit that will be lurking around in all various and sundry sorts of software, both local and remote. It's quite common for embedded devices with web-enabled front-ends to shuttle user input back and forth via bash shells, for example -- routers, SCADA/ICS devices, medical equipment, and all sorts of webified gadgets are likely to be exposed.

The module we're cooking up today will be as generic as we can make it, so people have a realistic chance of testing their devices. I expect that this will show up in more than one software package, though, so stay tuned."

[UPDATE]: Received word from Tod at Rapid7 that the Metasploit module for the bash vulnerability was completed at 8:26 pm EDT.

Patch your systems now…GO!

Support Information:

  1. Novel/SuSE
  2. Debian
  3. Ubuntu
  4. Mint
  5. Redhat/Fedora
  6. Mageia
  7. CentOS

Looking for a specific distribution? Check out DistroWatch.

 
(Image used under CC from spcbrass)

RELATED TOPICS
Insider: Survey: With all eyes on security, talent shortage sends salaries sky high
View Comments
Join the discussion
Be the first to comment on this article. Our Commenting Policies