Sunday, March 3, 2019
Home / Security / Exploits / Remote Exploit Vulnerability Discovered in Bash

Remote Exploit Vulnerability Discovered in Bash

A remotely exploitable vulnerability has been uncovered by Stephane Chazelas in bash on Linux. The vulnerability was given the CVE identifier CVE-2014-6271. This impacts Debian along with other Linux distributions. You must patch immediately.

Bash supports exporting shell variables in addition to shell features to other bash instances. This is achieved over the process environment to a child process.

The major attack vectors which have been discovered in this instance are HTTP requests and CGI scripts.

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.

Tod Beardsley, engineering manager from Rapid7 stated,

“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.”

About FastFlux

Owner of ZeroSecurity, interested in programming, malware analysis and penetration testing. If you would like to write for the ZeroSecurity team, please use the contact form above.

Check Also

Amazon hacked – hacker leaks 80,000 login credentials

A hacker going by the name 0x2Taylor has said to have breached the servers of …