BASH exposure expressed as bigger than Heartbleed<SOLUTIONS>

For discussions about security.
Message
Author
User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#61 Post by mavrothal »

Here is bash 3.0.20 for wary/racy 5.5 that also passes the

Code: Select all

curl https://shellshocker.net/shellshock_test.sh | bash
test.

Please uninstall older versions if you installed it.

A note regarding which version of bash to install.
As mentioned before all bash versions will mostly work. However, newer is not necessarily better :) . bash-3.x and bash-4.x have some incompatibilities. If your puppy is build with 3.x bash and you install 4.x, will mostly work but some scripts may fail or misbehave.
So check your installed bash version (just type: "bash --version" in terminal) and install the relevant one
Last edited by mavrothal on Thu 02 Oct 2014, 06:03, edited 4 times in total.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#62 Post by dejan555 »

EDIT: See this post for latest version(s)
Last edited by dejan555 on Wed 01 Oct 2014, 20:10, edited 1 time in total.
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

starhawk
Posts: 4906
Joined: Mon 22 Nov 2010, 06:04
Location: Everybody knows this is nowhere...

#63 Post by starhawk »

Installed bash 4.2.x *.txz for Slackware. NOT A FIX FOR X-SLACKO 2.1 -- it will break your savefile.

I've asked my local guru, user jbruchon (who has posted very little here), to come up with a working version for me. We'll see...

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

Re: is DASH one answer to this vulnerability?

#64 Post by dejan555 »

gcmartin wrote:On a comment from a forum member, DASH may not have this vulnerability. Wondering about its compatibility.
  • Can DASH replace BASH by removing BASH and setting a link to DASH along with PATH changes?
  • Is that reasonable or inviting problems?
One other note:
This problem may also exist in embedded systems which use BASH....like your routers, etc. It could explain how some system/networks were breached assuming there are hackers who knew of this area of exposure.

They're certainly not 100% compatible and some scripts that use bash specific features instead external cli apps will have errors, also:
Lindh’s NAS ran Bash alternative Dash by default and a tweet from security researcher Dragos Ruiu appeared to back up Lindh’s early research. If derivatives of Bash are also vulnerable to Shellshock, this would widen the number of potential targets massively.

“We should probably not make big a fuss about that just yet, but if it turns out that some old Dash shells are also vulnerable, then consumer appliances will definitely be at risk,
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#65 Post by OscarTalks »

cimarron wrote:NOTE: When I installed either the first or second fix, using ubuntu precise packages for my precise 5.7.1 pup, it seems to have broken Frisbee somewhat.
I was testing Slacko 5.7 with the first slackware patch applied yesterday and did notice that Frisbee seemed dead as a dodo. Other network tools were still OK.
Oscar in England
Image

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#66 Post by SFR »

SFR wrote:@Mick: Dunno why, but Slackware's bash packages render HOME/END keys unusable in terminal (urxvt, LXTerminal, VTE).
The same happened with bash compiled by myself.
A workaround is to append this to /etc/inputrc:

Code: Select all

"\e[1~": beginning-of-line      # Home Key
"\e[4~": end-of-line            # End Key
Greetings!
Another, even more annoying, issue with Slackware's bash binary: when I am typing a long line, that exceeds the right margin, it no longer wraps to the next line, but instead some maddening, horizontal scroll mode turns on.
It's impossible to highlight & copy such over-extended line!

Ok, it took me some time and nerves, but long story short: after I compiled bash with '--with-curses' (also literally) both issues are gone.
All patches applied, pkg for Slacko 32bit: bash-4.1.17.pet.
MD5: 65d5f2f8c8447a1e87936e3976d5e947 bash-4.1.17.pet

EDIT: updated to the latest (#14) patch.
EDIT2: updated to the latest (#17) patch.

Greetings!
Last edited by SFR on Tue 25 Nov 2014, 20:18, edited 2 times in total.
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#67 Post by keniv »

dejan555 wrote
New version for dpup487, should work with same pups that the previous one was reported to work...
I tested on test savefile again (after removing first fix). Now on normal savefile which seems OK. So again working in Sulu 002 (updated version of Lucid 528).

Thanks again,

Ken.

User avatar
prehistoric
Posts: 1744
Joined: Tue 23 Oct 2007, 17:34

#68 Post by prehistoric »

Applied dejan555 second version to stemsee's Puppy Precise 5.7.1 and ran cimarron's test script in console. So far, so good.

We need more testers, and we have a problem explaining the requirements to people who do not regularly compile code, and are not aware of the genealogy of the Puppy they are running. It took a while for me to decide that a 32-bit .deb package would work, and finding correct binaries on Ubuntu sites is currently challenging. When I started I was not sure if I was running a 32-bit PAE kernel or 64-bit kernel. For those with less experience this would be a serious obstacle.

We also need better explanations of the ancestry of the many Pupplets out there. Not everyone keeps up with code names used by Ubuntu, Debian or Puppy.

At first I thought the fix had failed, because I also got the syntax warning in cimarron's post. Then I realized the syntax error was necessary to run the test. The important thing was that no output file was created as a result. Before testing becomes more widespread we need to explain such details so that ordinary users don't have to puzzle this out on their own.

Any feature of open source code which can sit there for a couple of decades without anyone noticing has to be pretty obscure. This fits that description.

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#69 Post by anikin »

As this article: http://cloudgames.com/blog/fix-bash-exp ... u-apt-get/
implies, older debian/ubuntu based systems, can use bash from the current stable release. No need to search/wait for special, "old" versions. Makes sense.

rolf
Posts: 34
Joined: Sun 28 Dec 2008, 17:24

#70 Post by rolf »

mavrothal wrote:Here is bash 3.0.18 for wary/racy 5.5 that also passes the

Code: Select all

cd /tmp; rm -f /tmp/echo; env 'x=() { (a)=>\' bash -c "echo date"; cat /tmp/echo
test.
I happen to be running a small webserver in Puppy 4.31 small on an Igel thin client.
http://www.murga-linux.com/puppy/viewto ... 271#508271

Not knowing how to switch shells for the vulnerable server functions, I'm grateful for this. Thanks. :)

Code: Select all

# bash -version
GNU bash, version 3.00.18(1)-release (i486-pc-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
# cd /tmp; rm -f /tmp/echo; env 'x=() { (a)=>\' bash -c "echo date"; cat /tmp/echo
bash: x: line 1: syntax error near unexpected token `='
bash: x: line 1: `'
bash: error importing function definition for `x'
date
cat: /tmp/echo: No such file or directory
# cat /etc/puppyversion 
431

Kester

BASH exposure expressed as bigger than Heartbleed.

#71 Post by Kester »

As suggested by Cimarron in an earlier post, I typed the following into the terminal to test Bash in my installation:
cd /tmp; rm -f /tmp/echo; env 'x=() { (a)=>\' bash -c "echo date"; cat /tmp/echo
The result I got was:
env: can't execute 'Bash': No such file or directory
cat: /temp/echo: No such file or directory

Hopefully, although the phrasing is not identical to that Cimarron shows for a non-vulnerable system, it would seem that as no date is shown, Bash is not vulnerable on my system at present. I would be grateful if the Puppy experts out there could confirm this (or otherwise) as I am still fairly naive when it comes to the under the bonnet/hood workings of Linux systems.

Taking Prehistoric's comment ("Before testing becomes more widespread we need to explain such details so that ordinary users don't have to puzzle this out on their own."), as one of those 'ordinary' users, I would appreciate any explanation in not too technical language.

I have considered removing Puppy Precise 5.7.1 from my dual boot (XP Pro) system by booting up my XP installation disc, opening the 'Repair' option and running 'fixmbr'. I would then return to using live discs for Puppy but perhaps there is no need to take such a drastic step - it's a question of lack of confidence caused by a lack of knowledge on my part. I'm more confident with Windows XP because I know it better but like Puppy very much and decided on dual booting for security reasons when Microsoft support for XP finished - I though I use Puppy for the bulk of my internet activity, so this Bash issue is a little ironic.

User avatar
prehistoric
Posts: 1744
Joined: Tue 23 Oct 2007, 17:34

#72 Post by prehistoric »

@Kester,

You don't need to do anything to invoke Bash from a console. It is the default command-line processor. If you tried to execute "Bash" you would run into the problem that a Unix/Linux console is case sensitive, so "Bash" is different from "bash", which is generally invoked automatically as "/bin/sh" without you having to specify anything. You may not even find the name "bash" in your /bin directory.

You can also save yourself some tricky typing by simply highlighting the test command in your browser, directly from this web page, and then doing a "middle-click" in your console window. This will copy highlighted text without needing a cut-and-paste.

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#73 Post by anikin »

[quote]I appreciate the effort made in patch bash43-026, but this patch doesn't even BEGIN to solve the underlying shellshock problem. This patch just continues the "whack-a-mole" job of fixing parsing errors that began with the first patch. Bash's parser is certain have many many many other vulnerabilities; it was never designed to be security-relevant…John Haxby recently posted that "A friend of mine said this could be a vulnerability gift that keeps on giving.

User avatar
James C
Posts: 6618
Joined: Thu 26 Mar 2009, 05:12
Location: Kentucky

Shellshock vulnerability affects majority of Internet serve

#74 Post by James C »

Shellshock vulnerability affects majority of Internet servers and devices; get technical information here

Scan your servers........

http://www.trendmicro.com/us/security/s ... index.html

rolf
Posts: 34
Joined: Sun 28 Dec 2008, 17:24

Re: Shellshock vulnerability affects majority of Internet serve

#75 Post by rolf »

James C wrote: Shellshock vulnerability affects majority of Internet servers and devices; get technical information here

Scan your servers........

http://www.trendmicro.com/us/security/s ... index.html
Well, I followed instructions and got all Pass. I guess this is thanks to the patched bash-3.00.18(1), tyvm, but have to trust trendmicro for the efficacy of the test. Also, the whack-a-mole issue still obtains, iianm. :?
Thanks.

User avatar
James C
Posts: 6618
Joined: Thu 26 Mar 2009, 05:12
Location: Kentucky

#76 Post by James C »

Shellshock: All You Need to Know About the Bash Bug Vulnerability | Symantec

https://www.youtube.com/watch?v=ArEOVHQu9nk

[quote]A new vulnerability has been found that potentially affects most versions of the Linux and Unix operating systems, in addition to Mac OS X (which is based around Unix). Known as the “Bash Bug

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#77 Post by anikin »

A couple posts back, there's a link to an article in ArsTechnica, the following is a comment from that link.
diddum wrote:
One thing that I would really like to know is a list of services I should shut down (like apache2) until this bash madness has been completely fixed.

Is there such a list of possibly affected services ?

Thanks,
a Debian user

If you are using at least Debian squeeze (6.0), you're actually probably in better shape than anyone using Red Hat. Debian links /bin/sh to /bin/dash, so unless a script or executable explicitly calls bash, you're safe.

If you use "ForceCommand" directives in ssh, you can't rely on these if you let your users run bash. (You are effectively letting them get un-restricted shell access instead). But I think you could mitigate this by forcing them to run /bin/sh instead (or let them run mksh it's significantly more user friendly). And if you don't use "ForceCommand" it doesn't matter.

dhclient runs shells scripts in /etc/dchp/dhclient-enter-hooks.d, /etc/dchp/dhclient-enter-hooks.d but unless something insane was done, it will execute them with /bin/sh unless the script explicitly calls bash.

telnet, rsh, also are good things to disable, but you shouldn't have been using them in the first place.

Check if you run any bash scripts out of inetd/xinetd (probably not).

I don't know there might be other stuff. But, on debian, you're actually relatively safe unless somebody didn't something really stupid. The problem is, you can't really be too sure somebody didn't do something really stupid.

Edit:

You should be careful about the login shells for users. If you have some user that really should be a system user with /bin/no-login, or /bin/False as their shell, but some reason needs an actually posix shell as their login shell, set it to /bin/sh, make user it's not /bin/bash

User avatar
prehistoric
Posts: 1744
Joined: Tue 23 Oct 2007, 17:34

#78 Post by prehistoric »

Just for anyone who might be confused about the difference between a test that fails and one that succeeds, here are the results I've reproduced from an installation of stemsee's Puppy Precise 5.7.1 using the pet produced by dejan555 to fix bash.
Before, fails:

Code: Select all

# cd /tmp; rm -f /tmp/echo; env 'x=() { (a)=>\' bash -c "echo date"; cat /tmp/echo
bash: x: line 1: syntax error near unexpected token `='
bash: x: line 1: `'
bash: error importing function definition for `x'
Sat Sep 27 21:55:35 EDT 2014
# 
After, succeeds:

Code: Select all

# cd /tmp; rm -f /tmp/echo; env 'x=() { (a)=>\' bash -c "echo date"; cat /tmp/echo
bash: x: line 1: syntax error near unexpected token `='
bash: x: line 1: `'
bash: error importing function definition for `x'
date
cat: /tmp/echo: No such file or directory
#
The syntax error is reported in both cases because that is the way an attacker tricks the parser in bash into parsing code that has been added.

User avatar
Barkin
Posts: 803
Joined: Fri 12 Aug 2011, 04:55

#79 Post by Barkin »

Lucid Puppy 525 apparently fixed using this dejan555 pet ... "bash-4.3.26-1-i486-dpup487.pet" [437 KB]
on page ... http://www.murga-linux.com/puppy/viewtopic.php?p=800926#800926
Attachments
before-after-ShellShock-fix.gif
before fix &quot;vulnerable&quot; , after fix &quot;error importing function definition for `x' &quot;
(8.23 KiB) Downloaded 1682 times

User avatar
prehistoric
Posts: 1744
Joined: Tue 23 Oct 2007, 17:34

#80 Post by prehistoric »

@Barkin,

I actually prefer the more complicated test used by cimarron. The date function has to be executed to produce that new text, and a file created as a result. With the simple test you used I would worry that a mix-up in quoting gave me a false assurance that a vulnerable system was safe.

Added: I can now report that the fix for Fatdog 700 b1 (bash-4.2-x86_64-3.txz) works there, and that extracting the executable file from the tarball and copying it to /bin also works in Fatdog 630-631. (You need to do this manually because the package format has been changed between the 600 and 700 series.)

Here are James Bond's instructions copied from the 631 topic:
1. Get bash-4.2-x86_64-3.txz from 700 repo.
2. mkdir /tmp/xxx
3. cd /tmp/xxx
4. tar -xf /path/to/downloaded/bash-4.2-x86_64-3.txz
5. try to run ./bin/bash --version (version should be 4.2.49)
6. if this is good then cp ./bin/bash /bin

Post Reply