Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > New SSH exploit....does this affect us?

New SSH exploit....does this affect us?
Thread Tools
Mac Elite
Join Date: Dec 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Sep 16, 2003, 10:48 AM
 
     
Mac Elite
Join Date: Jul 2002
Location: Boston
Status: Offline
Reply With Quote
Sep 16, 2003, 11:50 AM
 
i would think it would affect you if SSH was on. I'm sure there will be a patch by the end of the week.
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Sep 16, 2003, 11:56 AM
 
Unfortunately, I believe that this does affect us. To secure yourself, open /Applications/System Preferences, navigate to Sharing, and turn off Remote Login.

SSH is widely used, so I'm sure Apple will have a patch really quickly. Once they do, it's safe to turn this back on, assuming you actually need & use it.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Senior User
Join Date: Nov 2002
Location: US
Status: Offline
Reply With Quote
Sep 16, 2003, 12:39 PM
 
Definitely YES - turn off your Remote Login asap! If you use ssh from Fink, do a

daemonic disable ssh

and

ps ax | grep sshd

and

kill -9 <sshd pid>
     
Mac Enthusiast
Join Date: Sep 2000
Location: New York, NY USA
Status: Offline
Reply With Quote
Sep 16, 2003, 01:02 PM
 
Originally posted by mishap:
i would think it would affect you if SSH was on. I'm sure there will be a patch by the end of the week.
I certainly hope that we have it before the end of the week. I've been keeping an eye on the openssh mirror sites and plan on compiling/reinstalling openssh as soon as 3.7 is released.
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Sep 16, 2003, 01:09 PM
 
OSX uses a different version of SSH, which may or may not be vulnerable to this hole. At the moment, I'm not sure.

Therefore, it's best to play it safe and assume that we are vulnerable. Apple will likely release either a press release or an update, within the next day or so, depending on whether we're vulnerable or not.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Sep 16, 2003, 02:01 PM
 
The vulnerability is in 3.6p1. OSX is running OpenSSH_3.4p1. I don't know if the problem is in older releases.

There is a patch to buffer.c which purports to solve the problem. I am looking for it now.

The current buffer.c has not changed in a long time (see CVSWEB for the changelog), so I suspect that we are affected.

[edit:fixed a typo]
(Last edited by Arkham_c; Sep 16, 2003 at 02:07 PM. )
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Sep 16, 2003, 02:05 PM
 
Ok, I found the patch. See here:

CVS Patch for OpenSSH
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Senior User
Join Date: Apr 2000
Location: Woodridge, IL
Status: Offline
Reply With Quote
Sep 16, 2003, 02:13 PM
 
Since this is a root exploit, does it affect us if we simply disable the root account? I'd like to keep SSH up for other authenticated users, if possible.
     
Senior User
Join Date: Nov 2002
Location: US
Status: Offline
Reply With Quote
Sep 16, 2003, 02:52 PM
 
Originally posted by Arkham_c:
The vulnerability is in 3.6p1. OSX is running OpenSSH_3.4p1. I don't know if the problem is in older releases.

There is a patch to buffer.c which purports to solve the problem. I am looking for it now.

The current buffer.c has not changed in a long time (see CVSWEB for the changelog), so I suspect that we are affected.

[edit:fixed a typo]
1. this affects to all versions previous to 3.7

2. I run RedHat 8 and the OpenSSH there was 3.4p1 - it just got patched a few hours ago by RedHat.
     
Senior User
Join Date: Nov 2000
Status: Offline
Reply With Quote
Sep 16, 2003, 08:52 PM
 
OK. This is easy folks. Mac OS X is affected by the bug, as to whether it is exploitable on Mac OS X, that we don't know. Assume it is unless we find out otherwise.

The patch to fix all the security problems fixed in OpenSSH 3.7.1, grab this patch (note that this is only for people who like compiling their own SSH, for everyone else, turn off remote login and wait for Apple's software update).

ftp://ftp.openbsd.org/pub/OpenBSD/pa...shbuffer.patch

- proton
     
Mac Enthusiast
Join Date: Sep 2000
Location: New York, NY USA
Status: Offline
Reply With Quote
Sep 16, 2003, 09:21 PM
 
Also for those inclined to build their own SSH, Openssh 3.7 is starting to appear on the Openssh mirror sites.

Visit http://www.openssh.org for more information.
     
Ambrosia - el Presidente
Join Date: Sep 2000
Location: Rochester, NY
Status: Offline
Reply With Quote
Sep 17, 2003, 02:48 AM
 
The other thing to keep in mind is that this type of exploit allows for the insertion of malicious code... but that code will be x86 code

In other words, odds are very good that in the rare event that your machine is attacked in this manner, and it is running sshd, the code injected via the buffer overflow will do nothing other than cause sshd to crash.

Let's hear it for the minority ISA!
Andrew Welch / el Presidente / Ambrosia Software, Inc.
     
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Sep 17, 2003, 03:08 AM
 
I would like to quote diamondsw, because I think he has a very important question. Does anybody have an answer?

Since this is a root exploit, does it affect us if we simply disable the root account?

I'd prefer just disabling root than ssh altogether.
•
     
Senior User
Join Date: Nov 2000
Status: Offline
Reply With Quote
Sep 17, 2003, 04:12 AM
 
Since this is a root exploit, does it affect us if we simply disable the root account?
Yes it would still affect you. Part of the ssh daemon runs as root regardless of if the root account is "enabled" for login..

- proton
     
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Sep 17, 2003, 04:13 AM
 
Originally posted by proton:
Yes it would still affect you. Part of the ssh daemon runs as root regardless of if the root account is "enabled" for login
Proton, thanks for that info. I guess I'll keep sshd off until the patch arrives.
•
     
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Sep 17, 2003, 06:22 AM
 
Originally posted by moki:
The other thing to keep in mind is that this type of exploit allows for the insertion of malicious code... but that code will be x86 code

In other words, odds are very good that in the rare event that your machine is attacked in this manner, and it is running sshd, the code injected via the buffer overflow will do nothing other than cause sshd to crash.

Let's hear it for the minority ISA!
Word up! Buffer overrun exploits that inject malicious code have to use machine language (i.e. x86, ppc, sparc etc) in order to work. 99% of all exploits will be for x86 machines (the person writing the exploit would need to have access to a PPC machine in order to test it for the Mac), x86 machines being the vast majority.

However, playing it safe and deactivating sshd is a good idea. You never know when some troubled individual, who's angry and SJ for introducing new Powerbooks just after he bought an older model, goes on the rampage on the net.
weird wabbit
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Sep 17, 2003, 07:16 AM
 
It's true that most buffer exploits written will be on x86 assembly. But apple.slashdot.org posted a link to a bunch of PPC exploit code ready and waiting for a buffer to exploit two weeks ago.

I compiled a few of the examples to see how they work, and they did what they said they did.

If someone had a working x86 exploit, it would be pretty trivial to mod it to be a PPC exploit using these posted sources. Like, it would involve copy and paste and that's about it.

Here is the link I'm talking 'bout.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Senior User
Join Date: Apr 2000
Location: Woodridge, IL
Status: Offline
Reply With Quote
Sep 17, 2003, 10:33 AM
 
Originally posted by proton:
Yes it would still affect you. Part of the ssh daemon runs as root regardless of if the root account is "enabled" for login..

- proton
Thanks! However, I have a further question. How would this allow someone to hack an OS X box? As was pointed out, they can't login (if you have root disabled), and they most likely will not be trying to run PPC code, but x86 code. So what exactly is the danger to an OS X user?

Don't get me wrong - I have disabled SSH just to be safe and await the patch from Apple. I'm just curious as to the real impact this has on Mac users.
     
Senior User
Join Date: Nov 2002
Location: US
Status: Offline
Reply With Quote
Sep 17, 2003, 10:43 AM
 
Originally posted by diamondsw:
Thanks! However, I have a further question. How would this allow someone to hack an OS X box? As was pointed out, they can't login (if you have root disabled), and they most likely will not be trying to run PPC code, but x86 code. So what exactly is the danger to an OS X user?

Don't get me wrong - I have disabled SSH just to be safe and await the patch from Apple. I'm just curious as to the real impact this has on Mac users.
How about creating a secret account, or even running a secret server (with root previlege), like a command shell?
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Sep 17, 2003, 12:08 PM
 
Originally posted by diamondsw:
Thanks! However, I have a further question. How would this allow someone to hack an OS X box? As was pointed out, they can't login (if you have root disabled), and they most likely will not be trying to run PPC code, but x86 code. So what exactly is the danger to an OS X user?
Disabling root for login is not at issue. Let me give an example. You have sshd (the ssh daemon) running as root on your system. This process has the root userid and thus can do things requiring root priveleges.

Now, when you buffer overflow this program, you do so within the program's process memory space. You then inject some compiled PPC byte code to open a shell. You then point the program stack pointer at this code, which causes the code to execute. Voila, you are running a root shell and the host owner is in trouble.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Sep 17, 2003, 02:36 PM
 
Originally posted by smeger:
It's true that most buffer exploits written will be on x86 assembly. But apple.slashdot.org posted a link to a bunch of PPC exploit code ready and waiting for a buffer to exploit two weeks ago.

I compiled a few of the examples to see how they work, and they did what they said they did.

If someone had a working x86 exploit, it would be pretty trivial to mod it to be a PPC exploit using these posted sources. Like, it would involve copy and paste and that's about it.

Here is the link I'm talking 'bout.
I read the slashdot article. I wish those hackers looking for lone ppc boxes with running sshd processes in the x86 jungle lots of luck
weird wabbit
     
Ambrosia - el Presidente
Join Date: Sep 2000
Location: Rochester, NY
Status: Offline
Reply With Quote
Sep 17, 2003, 03:50 PM
 
Originally posted by smeger:
It's true that most buffer exploits written will be on x86 assembly. But apple.slashdot.org posted a link to a bunch of PPC exploit code ready and waiting for a buffer to exploit two weeks ago.

I compiled a few of the examples to see how they work, and they did what they said they did.

If someone had a working x86 exploit, it would be pretty trivial to mod it to be a PPC exploit using these posted sources. Like, it would involve copy and paste and that's about it.
...and then they'd have to be sure what platform their target was and inject the right ISA depending on that platform.

Not saying it isn't possible using something like nmap, but it isn't likely. Most of these exploits are wrapped in scripts that just try every host they can find, and report back the ones they rooted. I highly doubt people would go to the trouble to add ISA detection (not an easy task) as well.

Sure, it's possible a lone hacker could target you specifically -- but I'm not aware of there being any reports of these exploits actually being in the wild, they were just listed as potential exploits, and were fixed.

So yes, if you want to be completely, utterly safe, turn Remote Login off. I'm not too concerned, though.
Andrew Welch / el Presidente / Ambrosia Software, Inc.
     
Addicted to MacNN
Join Date: Sep 2000
Location: Isle of Manhattan
Status: Offline
Reply With Quote
Sep 17, 2003, 04:26 PM
 
Lots of interesting info here.
Thankfully we are a minority with respect to the virus attacks, but what about hacking?
Is OS X hard to hack into? Anyone ever try?

I'm just curious if we have some other vulnerablity that we don't know about.
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Sep 17, 2003, 04:39 PM
 
Originally posted by moki:
...and then they'd have to be sure what platform their target was and inject the right ISA depending on that platform.
Of course, if there is a working x86 exploit and your Mac gets targeted, the service will crash when it tries to execute the x86 code thinking it's PPC machine language. Which is also a bad result...

Anyway, I'm not trying to say that it's super-likely that there are legions of überhackers targetting people's OS X boxes with massively sophisticated hax. But I am trying to say that it wouldn't be too difficult to take an existing x86 exploit, mod it to become a PPC exploit, and use it to target a known OS X box, thus gaining the code to Escape Velocity from Moki's development machine.

Just kidding, of course. My point is simply that this is an issue, even if probability of exploit is low. I've turned off SSH on all of my boxes (and told everyone I know to turn it off), and will leave things that way until Software Update patches me up.

P.S. Didn't mean to cause any offense with my hacking example, Moki. Hope you didn't take any.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Sep 17, 2003, 04:58 PM
 
Originally posted by moki:
...and then they'd have to be sure what platform their target was and inject the right ISA depending on that platform.

Not saying it isn't possible using something like nmap, but it isn't likely. Most of these exploits are wrapped in scripts that just try every host they can find, and report back the ones they rooted. I highly doubt people would go to the trouble to add ISA detection (not an easy task) as well.

Sure, it's possible a lone hacker could target you specifically -- but I'm not aware of there being any reports of these exploits actually being in the wild, they were just listed as potential exploits, and were fixed.

So yes, if you want to be completely, utterly safe, turn Remote Login off. I'm not too concerned, though.
Yes, unfortunately some of us depend on it on a daily basis (I can't drive across the country that often) and need to leave it enabled.

When will these stupid buffer overruns ever end? There are only about 1,000,000 more of these exploits waiting to be found if this continues.
     
Dedicated MacNNer
Join Date: Dec 2002
Location: someplace
Status: Offline
Reply With Quote
Sep 17, 2003, 05:39 PM
 
Originally posted by osiris:
Lots of interesting info here.
Thankfully we are a minority with respect to the virus attacks, but what about hacking?
Is OS X hard to hack into? Anyone ever try?
Yes.
http://freaky.staticusers.net/ugboar...forum.php?f=15
     
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Sep 17, 2003, 07:51 PM
 
Originally posted by gatorparrots:
Yes.
http://freaky.staticusers.net/ugboar...forum.php?f=15
That forum is very.. amusing. I don't think we need to worry about the people there.
[vash:~] banana% killall killall
Terminated
     
Forum Regular
Join Date: Jul 2001
Location: Québec, Canada
Status: Offline
Reply With Quote
Sep 17, 2003, 09:04 PM
 
Originally posted by absmiths:
When will these stupid buffer overruns ever end? There are only about 1,000,000 more of these exploits waiting to be found if this continues.
When the ssh deamon will be rewritten in Java.
     
Senior User
Join Date: Nov 2000
Status: Offline
Reply With Quote
Sep 17, 2003, 10:06 PM
 
And the Java engine is entirely bug free...

- proton
     
Dedicated MacNNer
Join Date: Sep 2003
Location: Pittsburgh, Pennsylvania
Status: Offline
Reply With Quote
Sep 17, 2003, 10:29 PM
 
Originally posted by Michel Fortin:
When the ssh deamon will be rewritten in Java.
I can't wait for the days of java ssh, a 5 minute load up time, a half hour to computer your key....having to install 500megs worth of libraries from sun to find the installation failed...
     
Mac Elite
Join Date: Sep 2000
Location: New York
Status: Offline
Reply With Quote
Sep 17, 2003, 11:31 PM
 
Originally posted by Michel Fortin:
When the ssh deamon will be rewritten in Java.
So that one byte-code version of the exploit can successfully attack different platforms?
     
Dedicated MacNNer
Join Date: Dec 2002
Location: someplace
Status: Offline
Reply With Quote
Sep 17, 2003, 11:34 PM
 
Originally posted by Gul Banana:
That forum is very.. amusing. I don't think we need to worry about the people there.
http://www.undergroundmac.com/hacking.html
or, perhaps more "legit":
https://doris.scriptkiddie.net/PPC_Stuff/

The point being, there are people out there writing tools and developing and testing exploit code. This is happening and it is something of concern for any sysadmin.
(Last edited by gatorparrots; Sep 17, 2003 at 11:45 PM. )
     
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Sep 18, 2003, 09:56 AM
 
Originally posted by gatorparrots:
http://www.undergroundmac.com/hacking.html
or, perhaps more "legit":
https://doris.scriptkiddie.net/PPC_Stuff/

The point being, there are people out there writing tools and developing and testing exploit code. This is happening and it is something of concern for any sysadmin.
That's true - especially the second link, which you could very easily combine with the sshd exploit. My original point remains, though, about freaky.staticusers.net.
[vash:~] banana% killall killall
Terminated
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:30 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2