troubleshooting/tutorials/security

03/08/2006, 10:05am, EST

Wednesday, March 8th

Exploit for pre-Tiger systems?

On the heels of recent Mac OS X worms and exploits--some of which have been recently patched--a newly revealed Mac OS X exploit in pre-Tiger systems may allow an application to gain root access after the computer restarts. "Rogue code and trojans resident on OS X boxes prior to Tiger don't have to work overtime to 'get root'. If they're patient and wait, they get it on next boot with no privilege escalation whatsoever. Any process running in an admin account (and sometimes below) can corrupt the OS X boot sequence on such a machine to get arbitrary code to run as root in single user mode." The site provies a "proof of concept" that demos the exploit, which takes advantage of the operating system default settings to check for a (usually non-existant) StartUpItems folder in the local user's Library folder. [updated]

According to the site, the user's Library folder can include information about which items to launch during startup, allowing any trojan application to create that 'StartUpItems' folder and execute arbitrary code. The exploit has been fixed in Apple's latest Tiger OS, but remains in previous versions. The site recommends 'hardening' the user's 'Library' folder to protect pre-Tiger systems.

"The best you can do is to harden /Library/StartupItems as Apple have done in later releases. /Library should be owned by root:admin and have 1775; /Library/StartupItems must exist, be owned by root:admin, and have 0755.

"If anything is found in /Library/StartupItems on boot and the ownership and mode are incorrect, the Tiger boot sequence will refrain from running the code and ask your advice how to proceed. You can defer your decision, disable the item, or go ahead and fix it. If you decide to fix it, it might fix you - so be careful."

Echoing warnings noted here previously, the website warns that Apple's patch for the Mac OS X Zero Day exploit only protects users running Safari and other Apple applications, leaving users of third-party software--such as Firefox, Camino, etc.--vulnerable to execution of code disguised as a "safe" file. Meanwhile, the newly launched Mac OS X Security Challenge, inviting hackers to compromise a designated Mac on the internet, is still in progress, without any compromise, following a previous challenge in which a user was able to compromise the system within 30 minutes using a (provided) local user account.

The new challenge saw many different types of attacks in the first 38 hours, including web exploit scripts, ssh dictionary attacks, and scanning tools such as Nessus as well as two DoS attacks. However, the site notes that "there were no successful access attempts of any kind, including during the 38 hour duration of the test period, nor have their been any claims of success. The host is still the same host and configuration used for the test."

Update: The MacEnterprise project has posted a response to the claimed exploit: "The only scenario in which there is a possibility of installing code that runs as root _without_ having to authenticate as an admin is if a previous admin or authenticated installer has created or modified /Library/StartupItems with insecure permissions, and additionally under Tiger, only if files with root/wheel owner/group and 0755 mode are moved into this directory. While this is a potential scenario, it is not a common one. You can protect yourself now by either upgrading to Tiger (which has been available for almost a year), or ensuring /Library/StartupItems is owned by root, has group wheel, and has mode 0755."


Filed under: troubleshooting

, , 13comments, del.icio.us, slashdot, digg, buzz


13 comments
Reader Reactions (Please use <i></i> for italic text)

subscribe to comments
for this article




Expand All   Global Settings
Still got to get it there
0
03/08, 10:37am, EST
You still have to trick the user to run something to put an executable in the Startup Items. It can't get there by itself.

To me, the greater risk is to files already in my home folder, not installed software and system files. Sure, it could be used by other people as a spambot or something like that, but that's not my biggest concern.
Professional Poster
Joined Sep 1999
User is offline
More of spreading FUD
0
03/08, 10:43am, EST
This is really more spreading FUD. The MacEnterprise project has a response to this article...

http://macenterprise.org/content/view/204/77/
Fresh-Faced Recruit
Joined Mar 2006
User is offline
Isn't this also dependen
0
03/08, 10:53am, EST
On not already creating a root password? I've been adding root to installations with separate passwords all along. Isn't this what a sys admin is supposed to do? Folks, fyi, admin is not root. The best way to sucure on'es computer these days is to turn it off!
Fresh-Faced Recruit
Joined Mar 1999
User is offline
Not fud
0
03/08, 12:30pm, EST
Its not FUD, as the macenterprise article actually says its possible (and not improbable). Hell, I recall people complaining about one major app whose installer screwed up the permissions of the entire Applications folder.

On not already creating a root password? I've been adding root to installations with separate passwords all along. Isn't this what a sys admin is supposed to do? Folks, fyi, admin is not root. The best way to sucure on'es computer these days is to turn it off!

This has nothing to do with it, does it? Programs just try to get privilege escalation to then be able to do their work. If they escalate to Root, they don't need a password.

And most people don't turn on the root user, but that doesn't mean the user's disabled. It just means you can't log in as root.

Oh, and since when does a home user now have to be a sys admin just to use a computer?
Fresh-Faced Recruit
Joined Aug 2001
User is offline
Once again...
0
03/08, 1:35pm, EST
If this is still the best the "hackers" and FUD mongers can come up with, I have to say I continue to feel safer than ever using Mac OS X. Look at all the attention Mac OS X has been getting recently, and still no "in the wild" virus or other "exploit" that actually does damage to the Mac using community. Only these pathetic "concept" exploits...
Fresh-Faced Recruit
Joined Nov 2001
User is offline
Re: Not fud
0
03/08, 1:40pm, EST
Ok, it might be possible(and not improbable) on Mac OS X 10.3.x systems. But, it isn't an issue Mac OS X 10.4.x. Mac OS X 10.4 not only provides default secure permissions for /Library/StartupItems, it refuses to run Startup Items that do not have user 0, group 0, and mode 0755.

So, my point is that it isn't an issue in the latest OS, so, the article's name is a little misleading "Apple's 'Unix' Runs Arbitrary Code on Boot?". Or statements like"If they're patient and wait, they get it on next boot with no privilege escalation whatsoever." Hum, or if they upgrade to Mac OS X 10.4 they don't need to be patient and wait ;-) So, NOT completly FUD, but a little 8-)
Fresh-Faced Recruit
Joined Mar 2006
User is offline
You mean to tell me...
0
03/08, 1:57pm, EST
that for this exploit to work, I have to be using an old version of Mac OS X, AND if you are using less than Mac OS X Tiger, the access to the StartUpItems folder must have been reset to something other than Root, AND this malware code must still somehow end up in the StartUpItems folder. My Mac is more likely to be damaged in an earthquake than by this so-called exploit.

BTW - Just checked. I use Mac OS X 10.3.9 and my StartUpItems was to set Root access without me doing anything special to get it that way.
Fresh-Faced Recruit
Joined Nov 2001
User is offline
Re: not fud
0
03/08, 2:59pm, EST
So, my point is that it isn't an issue in the latest OS, so, the article's name is a little misleading "Apple's 'Unix' Runs Arbitrary Code on Boot?".

Well, technically, most exploits are announced after a patch is made, so, therefore, not an issue with the latest OS.

It just makes that assumption that everyone wants to update to the latest OS. (Ah, the OS X subscription model....)
Fresh-Faced Recruit
Joined Aug 2001
User is offline
Clearly a bug
0
03/08, 5:12pm, EST
BTW - Just checked. I use Mac OS X 10.3.9 and my StartUpItems was to set Root access without me doing anything special to get it that way.

root/admin. You can make a folder in that directory easily enough. So try creating a StartupItems folder.

Apple knew this was a bug so they fixed it.

Forum Regular
Joined Apr 2003
User is offline
Old news
0
03/08, 7:39pm, EST
I remember reading about the security problem with /Library/Startupitems back when I was running Jaguar, a few years ago. To avoid it, just do as the article says after you repair permissions. Just enter the following into Terminal:

chmod 1775 /Library sudo chmod 0775 /Library/Startupitems

and enter your admin password when prompted!
Fresh-Faced Recruit
Joined Jan 2005
User is offline
additional comments:..1..2..Next
Your Comments

In order to post comments: If you are a registered member, please login with your MacNN Forums username and password otherwise please uncheck the checkbox below.


Registered Member?
macnn forums login:

macnn forums password:

Not a member of the MacNN forums? Register now for free.

RSS Feeds

Have the latest content delivered to your desktop via RSS. Use the links below to get access to a specific blog, news, or reviews feed.



  MacNN -all

  MacNN Reviews

  MacNN Podcasts

  iPodNN

  Electronista

  Left Lane News
Want To Sell Your Laptop? Any Condition - receive Top Cash. Get an instant quote. Free shipping www.CashForLaptops.com
Buy from The Apple Store, iTunes.com, Amazon.com, TechDepot, OfficeDepot, Computers4Sure, or donate.