GNU Bash up to 3.2.48 Environment Variable variables.c Shellshock os command injection

entryeditHistoryDiffjsonxmlCTI
CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
8.8$0-$5k0.05

A vulnerability was found in GNU Bash and classified as very critical. This issue affects some unknown functionality of the file variables.c of the component Environment Variable Handler. The manipulation of the argument Environment with an unknown input leads to a privilege escalation vulnerability (Shellshock). Using CWE to declare the problem leads to CWE-78. Impacted is confidentiality, integrity, and availability. The summary by CVE is:

GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which allows remote attackers to execute arbitrary code via a crafted environment, as demonstrated by vectors involving the ForceCommand feature in OpenSSH sshd, the mod_cgi and mod_cgid modules in the Apache HTTP Server, scripts executed by unspecified DHCP clients, and other situations in which setting the environment occurs across a privilege boundary from Bash execution, aka "ShellShock." NOTE: the original fix for this issue was incorrect; CVE-2014-7169 has been assigned to cover the vulnerability that is still present after the incorrect fix.

The weakness was published 09/24/2014 by Stephane Chazelas as remote code execution through bash as confirmed mailinglist post (oss-sec). The advisory is shared at seclists.org. The mailinglist post contains:

Chet Ramey, the GNU bash upstream maintainer, will soon release official upstream patches.
Robert Graham claims in his blog post that "[b]ash bug as big as Heartbleed". The identification of this vulnerability is CVE-2014-6271 since 09/09/2014. The attack may be initiated remotely. No form of authentication is needed for a successful exploitation. Technical details as well as a public exploit are known. The price for an exploit might be around USD $0-$5k at the moment (estimation calculated on 10/10/2018). Due to its background and reception, this vulnerability has a historic impact. The advisory points out:
(...) a vulnerability in bash, related to how environment variables are processed: trailing code in function definitions was executed, independent of the variable name.
This vulnerability does affect web services (shell scripts as part of a CGI setup) in general. But also SSH, DHCP clients, CUPS and sudo setups are affected.

A public exploit has been developed by Huzaifa Sidhpurwala in Bash and been published immediately after the advisory. It is declared as highly functional. The exploit is available at securityblog.redhat.com. We expect the 0-day to have been worth approximately $100k and more. The vulnerability scanner Nessus provides a plugin with the ID 77970 (Qmail Remote Command Execution via Shellshock), which helps to determine the existence of the flaw in a target environment. It is assigned to the family SMTP problems. The analysis with Nessus happens with this NASL code:

if (rpm_check(release:"ALA", reference:"bash-4.1.2-15.19.amzn1")) flag++;
if (rpm_check(release:"ALA", reference:"bash-debuginfo-4.1.2-15.19.amzn1")) flag++;
if (rpm_check(release:"ALA", reference:"bash-doc-4.1.2-15.19.amzn1")) flag++;

if (flag)
{
  if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
  else security_hole(0);
  exit(0);
}
The commercial vulnerability scanner Qualys is able to test this issue with plugin 370037 (Citrix XenServer Security Update (CTX200223)). The code used by the exploit is:
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"

Applying a patch is able to eliminate this problem. The bugfix is ready for download at bugzilla.novell.com. The problem might be mitigated by replacing the product with Shell as an alternative. The best possible mitigation is suggested to be patching the affected component. A possible mitigation has been published even before and not after the disclosure of the vulnerability. Red Hat posted several mod_security rules which help to prevent exploitation of this vulnerability. It is also possible to enforce such a limitation with an IPTables rule: "iptables using -m string --hex-string '|28 29 20 7B|'" Attack attempts may be identified with Snort ID 31975. In this case the pattern () { is used for detection. Furthermore it is possible to detect and prevent this kind of attack with TippingPoint and the filter 16800.

The vulnerability is also documented in the databases at SecurityFocus (BID 70137), X-Force (96209), Secunia (SA61541), SecurityTracker (ID 1030890) and Vulnerability Center (SBV-57351). access.redhat.com is providing further details. Similar entries are available at 67711 and 71528.

Affectededit

  • Apple iPhone (Jailbreak only)
  • Apple Mac OS X up to 10.9.4
  • Debian GNU/Linux up to 4.1-3/4.2
  • F5 BIG-IP up to 11.6.0
  • Madravia Linux 1.0
  • Palo Alto PAN-OS up to 6.0
  • Red Hat Linux 4/5/6/7
  • Slackware Linux up to 14.1
  • SuSE openSUSE 11.0
  • Ubuntu Linux up to 14.04 LTS
  • VMware Fusion

Not Affectededit

  • Android Default Installation
  • FreeBSD Default Installation
  • NetBSD Default Installation
  • OpenBSD Default Installation

Productinfoedit

Vendor

Name

CPE 2.3infoedit

CPE 2.2infoedit

Screenshot

Videoedit

Youtube: Not available anymore

CVSSv3infoedit

VulDB Meta Base Score: 9.8
VulDB Meta Temp Score: 8.8

VulDB Base Score: 9.8
VulDB Temp Score: 8.8
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2infoedit

AVACAuCIA
🔍🔍🔍🔍🔍🔍
🔍🔍🔍🔍🔍🔍
🔍🔍🔍🔍🔍🔍
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfoedit

Name: Shellshock
Class: Privilege escalation / Shellshock
CWE: CWE-78
ATT&CK: Unknown

Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Highly functional
Author: Huzaifa Sidhpurwala
Reliability: 🔍
Programming Language: 🔍
Download: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-Dayunlockunlockunlockunlock
Todayunlockunlockunlockunlock

Nessus ID: 77970
Nessus Name: Qmail Remote Command Execution via Shellshock
Nessus File: 🔍
Nessus Family: 🔍

OpenVAS ID: 871250
OpenVAS Name: RedHat Update for bash RHSA-2014:1306-01
OpenVAS File: 🔍
OpenVAS Family: 🔍

Saint ID: exploit_info/bash_shellshock_cups
Saint Name: Bash Environment Variable Handling Shell Command Injection Via CUPS

Qualys ID: 🔍
Qualys Name: 🔍

MetaSploit ID: apache_mod_cgi_bash_env.rb
MetaSploit Name: Apache ActiveMQ Directory Traversal
MetaSploit File: 🔍

Exploit-DB: 🔍

Threat Intelligenceinfoedit

Threat: 🔍
Adversaries: 🔍
Geopolitics: 🔍
Economy: 🔍
Predictions: 🔍
Remediation: 🔍

Countermeasuresinfoedit

Recommended: Patch
Status: 🔍

0-Day Time: 🔍
Exploit Delay Time: 🔍

Patch: bugzilla.novell.com
Alternative: Shell

Snort ID: 31975
Snort Message: Volex – Possible CVE-2014-6271 bash Vulnerability Requested (header)
Snort Class: 🔍
Snort Pattern: 🔍

Suricata ID: 2014092401
Suricata Class: 🔍
Suricata Message: 🔍

TippingPoint: 🔍

McAfee IPS: 🔍
McAfee IPS Version: 🔍

ISS Proventia IPS: 🔍
Fortigate IPS: 🔍

Timelineinfoedit

09/09/2014 🔍
09/17/2014 +8 days 🔍
09/24/2014 +7 days 🔍
09/24/2014 +0 days 🔍
09/24/2014 +0 days 🔍
09/24/2014 +0 days 🔍
09/24/2014 +0 days 🔍
09/24/2014 +0 days 🔍
09/24/2014 +0 days 🔍
09/25/2014 +1 days 🔍
09/25/2014 +0 days 🔍
09/29/2014 +4 days 🔍
03/16/2016 +534 days 🔍
06/20/2016 +96 days 🔍
10/10/2018 +842 days 🔍

Sourcesinfoedit

Vendor: https://www.gnu.org/

Advisory: remote code execution through bash
Researcher: Stephane Chazelas
Status: Confirmed

CVE: CVE-2014-6271 (🔍)
OVAL: 🔍
IAVM: 🔍

SecurityFocus: 70137 - GNU Bash CVE-2014-7169 Incomplete Fix Remote Code Execution Vulnerability
Secunia: 61541 - GNU Bash Shell Function Definitions OS Commands Injection Vulnerability
X-Force: 96209 - GNU Bash variables command execution, High Risk
SecurityTracker: 1030890 - GNU bash Environment Variable Processing Flaw Lets Users Execute Arbitrary Code
Vulnerability Center: 57351 - GNU Bash through 4.3 Remote Code Execution via a Crafted Environment - CVE-2014-6271, Critical
OSVDB: 112004 - GNU bash Environment Variable Handling Shell Command Injection

scip Labs: https://www.scip.ch/en/?labs.20161013
Misc.: 🔍
See also: 🔍

Entryinfoedit

Created: 09/24/2014 11:14 PM
Updated: 10/10/2018 12:48 PM
Changes: (56) vulnerability_cwe source_cve_assigned source_cve_nvd_published source_cve_nvd_summary source_oval_id source_iavm source_iavm_vmskey source_iavm_title source_secunia source_secunia_date source_secunia_title source_securityfocus source_securityfocus_date source_securityfocus_class source_securityfocus_title source_sectracker_date source_sectracker_title source_sectracker_cause source_vulnerabilitycenter source_vulnerabilitycenter_title source_vulnerabilitycenter_severity source_vulnerabilitycenter_creationdate source_vulnerabilitycenter_lastupdatedate source_vulnerabilitycenter_reportingdate source_xforce_title source_xforce_identifier source_xforce_risk source_exploitdb_date source_nessus_name source_nessus_filename source_nessus_family source_nessus_date source_nessus_code source_openvas_id source_openvas_filename source_openvas_title source_openvas_family source_qualys_id source_qualys_title source_saint_id source_saint_title source_saint_link source_msf_id source_msf_filename source_msf_title source_snort_class source_snort_message source_snort_pattern source_suricata_id source_suricata_sig source_suricata_class source_issproventia source_tippingpoint_id source_mcafee_ips_id source_mcafee_ips_version source_fortigate_ips_id
Complete: 🔍

Comments

No comments yet. Please log in to comment.

Want to stay up to date on a daily basis?

Enable the mail alert feature now!