Jump to content

Shellshock vulnerability

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Msablic (talk | contribs) at 22:13, 25 September 2014 (Example of exploits with references). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The shellshock vulnerability (NVD identifer CVE-2014-7169) is a security bug affecting Unix-like operating systems through the bash shell, a shell environment used for a variety of tasks on Linux and Mac OS X systems. First disclosed on September 24 2014 and classfied then as CVE-2014-6271, it has been rated 10 (the maximum score) for severity by NIST.[1] An initial patch to mitigate the issue was found to be incomplete; a new patch was then released and NIST assigned a second code of CVE-2014-7169 to the bug.[2][3]

Shellshock affects Bash versions between 1.14 and 4.3 which are used on many Linux distributions, Mac OS X, and other operating systems. Some web servers also rely upon Bash to execute CGI scripts, and this bug could allow the execution of malicious code from remote computers.[4]

It is estimated that it potentially affects hundreds of millions of computers.[5] It was discovered by Stephane Chazelas.[6]

Attack details

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.

โ€” NIST, NVD[2]

Examples

Example of shell output on vulnerable system:[7]

$ env env x='() { :;}; echo vulnerable' bash -c 'echo this is a test'
vulnerable
this is a test

Output after initial patch:

$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test

Remaining vulnerability CVE-2014-7169:

$ env X='() { (a)=>\' sh -c "echo date"; cat echo
sh: X: line 1: syntax error near unexpected token `='
sh: X: line 1: `'
sh: error importing function definition for `X'
Thu 25 Sep 2014 08:50:18 BST

References

  1. ^ "NVD Vulnerability Summary for CVE-2014-6271". Retrieved 25 September 2014.
  2. ^ a b "NVD Vulnerability Summary for CVE-2014-7169". Retrieved 25 September 2014.
  3. ^ Huzaifa Sidhpurwala (2014-09-24). "Bash specially-crafted environment variables code injection attack". Red Hat.
  4. ^ "Shellshock BASH Vulnerability Tester". Retrieved 25 September 2014.
  5. ^ "BBC News - Shellshock: 'Deadly serious' new vulnerability found". BBC News. Retrieved 25 September 2014.
  6. ^ "oss-sec: CVE-2014-6271: remote code execution through bash". Retrieved 25 September 2014.
  7. ^ "How do I recompile Bash to avoid the remote exploit CVE-2014-6271 and CVE-2014-7169". Retrieved 25 September 2014.