Remote exploit vulnerability in bash

Here you can discuss every aspect of Debian. Note: not for support requests!

Re: Remote exploit vulnerability in bash

Postby micksulley » 2014-09-27 18:01

I added the squeeze-lts today as it was suggested in a thread I found as a supposed fix for this. I have just removed them again and it still does not work.

Code: Select all
mick@mick-deb-laptop:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
mick@mick-deb-laptop:~$ env VAR='() { :;}; echo Bash is vulnerable!' bash -c "echo Bash Test"
Bash is vulnerable!
Bash Test
mick@mick-deb-laptop:~$

source is now

deb http://download.virtualbox.org/virtualbox/debian/ wheezy contrib
deb http://ftp.uk.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ wheezy-updates main contrib non-free
deb http://ftp.uk.debian.org/debian/ wheezy main non-free
deb-src http://ftp.uk.debian.org/debian/ wheezy main non-free
deb http://www.deb-multimedia.org/ wheezy main non-free
# deb http://http.debian.net/debian/ squeeze-lts main contrib non-free
# deb-src http://http.debian.net/debian/ squeeze-lts main contrib non-free
User avatar
micksulley
 
Posts: 61
Joined: 2012-09-06 12:20

Re: Remote exploit vulnerability in bash

Postby teeitup » 2014-09-28 06:37

What version of bash is actually installed?

Your sources list has a duplicate repository with a more restrictive component list.
teeitup
 
Posts: 25
Joined: 2009-03-09 19:22

Re: Remote exploit vulnerability in bash

Postby Hallvor » 2014-09-28 08:21

micksulley: What is the point of hijacking this thread? This is general discussion.
Lenovo Thinkpad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Buster (KDE)
User avatar
Hallvor
 
Posts: 951
Joined: 2009-04-16 18:35
Location: Norway

Re: Remote exploit vulnerability in bash

Postby micksulley » 2014-09-28 08:45

teeitup wrote:What version of bash is actually installed?

Your sources list has a duplicate repository with a more restrictive component list.


Bash version is 4.2.37(1)-release (x86_64-pc-linux-gnu)


Sorry I don't understand your comment about a more restrictive component list, which one should I remove?

Thanks
Mick
User avatar
micksulley
 
Posts: 61
Joined: 2012-09-06 12:20

Re: Remote exploit vulnerability in bash

Postby kedaha » 2014-09-28 10:37

@micksulley: By the way, you should definitely include security in your SourcesList:

Code: Select all
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free
Mate DE & OSSv4.
FreedomBox in Debian
ispmail
Debian Stable

Words, as is well known, are the great foes of reality. Joseph Conrad.
Kedaha's Conjecture
User avatar
kedaha
 
Posts: 3034
Joined: 2008-05-24 12:26

Re: Remote exploit vulnerability in bash

Postby micksulley » 2014-09-28 13:11

Many thanks. I added the security repo's updated and now my Bash is secure again!

Regarding the earlier comments about my lack of understanding or sources, if anyone can point me to something that explains what you should have and why, I would certainly study it. The links posted earlier do nothing to tell you which ones you need, rules on mixing them, the fact that you should add the security repro, which ones contain which packages etc. I really have tried to unserstand this in the past, it seems that the people who know 'just know', there does not seem to be any useful tutorial on this subject.

Again, thanks for helping me to fix it.

Mick
User avatar
micksulley
 
Posts: 61
Joined: 2012-09-06 12:20

Re: Remote exploit vulnerability in bash

Postby kedaha » 2014-09-28 16:58

All this is off topic but, since you ask: Providing the network gets configured during installation, which is not always the case when non-free drivers are required, then apt is properly configured with all the necessary software sources including security. Manually editing /etc/apt/sources.list/ is a little tricky; the sources.list man page explains it in detail but of course, an appropriate mirror site needs to be inserted. With regard to both stability and security, following basic precautions, neither mixing different suites nor adding potentially untrusted software sources, like, for example, deb-multimedia, is recommended as advised here. Finally, for best security, a stable system without admixture of software that doesn't comply with DFSG is to be recommended as detailed here.
Mate DE & OSSv4.
FreedomBox in Debian
ispmail
Debian Stable

Words, as is well known, are the great foes of reality. Joseph Conrad.
Kedaha's Conjecture
User avatar
kedaha
 
Posts: 3034
Joined: 2008-05-24 12:26

Re: Remote exploit vulnerability in bash

Postby mardybear » 2014-09-28 17:12

When searching online, always google 'debian wiki whatever_subject' and usually you'll find something. It has a good Wheezy example:
https://wiki.debian.org/SourcesList

If you're still unsure you can repost your sources.list for review.
800mhz, 512mb ram, dCore-jessie (Tiny Core with Debian Jessie packages) with BusyBox and Fluxbox.
Most don't have computer access, reuse or pay forward an old computer.
User avatar
mardybear
 
Posts: 994
Joined: 2014-01-19 03:30

Re: Remote exploit vulnerability in bash

Postby Ohm » 2014-09-28 18:59

Just thought I would say that this is what I used to make bash not vulnerable, as far as I know:

apt-get update && apt-get install --only-upgrade bash
Ohm
 
Posts: 17
Joined: 2014-08-01 05:02

Re: Remote exploit vulnerability in bash

Postby micksulley » 2014-09-28 21:25

Ohm wrote:Just thought I would say that this is what I used to make bash not vulnerable, as far as I know:

apt-get update && apt-get install --only-upgrade bash

That only worked for me after I had added the security repo
User avatar
micksulley
 
Posts: 61
Joined: 2012-09-06 12:20

Re: Remote exploit vulnerability in bash

Postby dasein » 2014-09-28 21:37

Yes, the security repo is is necessary for security updates. (I wonder if that has anything to do with why they call it the "security" repo?)
User avatar
dasein
 
Posts: 7775
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Remote exploit vulnerability in bash

Postby jackdaws » 2014-09-28 22:53

I happen to have been reinstalling debian yesterday anyway, and after installing the base debian system - without any tasks or standard utilities selected - bash is installed and listed as manually installed (i.e. not installed because it is depended upon or recommended by another installed package). It's also listed as being an "important" package, despite (on this barebones operating system) not having any installed packages dependent on it.

As people have been reminding one another lately, debian moved away from bash a very long time ago, and now uses dash (whatever that means in practice, since the consoles on most desktops that I've seen tend to use bash by default). So, one might think it safe to remove bash, and just use dash for my command line work. This I did, just as an experiment, with no immediate effect. At reboot, all went well until login. Here, running the login details merely took me back to login again, whether I logged in as root or a standard user.

Suffice to say, you can reinstall bash in "single user" recovery mode, but I'm thinking that something probably very simple would have done the job of safely removing bash whilst no affecting the system, but only super brains who cast scorn at the miserable frightened herd are capable of working it out, and if I asked for help here I'd run the risk of being named and shamed by my superiors as just another hijacker...

One other thought, for those who haven't browsed away somewhere else: According to the latest popularity contest, bash is listed at number 30 on installs, and number 32 on actually used packages, so clearly the move from bash to dash wasn't as complete as some might think.
Perfectionism is an imperfection
User avatar
jackdaws
 
Posts: 152
Joined: 2006-04-17 16:01
Location: The Glens of Antrim

Re: Remote exploit vulnerability in bash

Postby texbrew » 2014-09-29 05:38

Thanks for the tip. After reading this, I promptly upgraded bash on this machine - Wheezy 7.6 - and will do so on the others upon next power-up.

Have not read through all the external links in this thread, but I bet the linux haters are cackling with glee. But thanks to the Debian maintainers, it seems the fix(es?) was or were done very quickly.

tex
texbrew
 
Posts: 15
Joined: 2013-04-17 19:08

Re: Remote exploit vulnerability in bash

Postby mardybear » 2014-09-29 07:13

How to Protect your Server Against the Shellshock Bash Vulnerability:
https://www.digitalocean.com/community/ ... nerability

The article recommends running the following in a bash terminal:
Code: Select all
env VAR='() { :;}; echo Bash is vulnerable!' bash -c "echo Bash Test"

The highlighted echo Bash is vulnerable! portion of the command represents where a remote attacker could inject malicious code; arbitrary code following a function definition within an environment variable assignment. Therefore, if you see the following output, your version of Bash is vulnerable and should be updated:

Bash is vulnerable!
Bash Test

Otherwise, if your output does not include the simulated attacker's payload, i.e. "Bash is vulnerable" is not printed as output, your version of bash is not vulnerable. It may look something like this:

bash: warning: VAR: ignoring function definition attempt
bash: error importing function definition for `VAR'
Bash Test


My old Squeeze-based Ubuntu received 3 bash updates between Sept 24th-29th. It now passes the bash test and just returns 'Bash Test' :)
800mhz, 512mb ram, dCore-jessie (Tiny Core with Debian Jessie packages) with BusyBox and Fluxbox.
Most don't have computer access, reuse or pay forward an old computer.
User avatar
mardybear
 
Posts: 994
Joined: 2014-01-19 03:30

Re: Remote exploit vulnerability in bash

Postby gnulux » 2014-09-29 14:01

Many thanks, mardybear, for this useful command. It's nice to get Bash Test :-)
gnulux
 
Posts: 70
Joined: 2014-09-03 14:09

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable