Flaw Found in Apple Bug-Fix Tool
eldavojohn writes "The Month of Apple Bugs (MOAB) is well under way with a startling bug released Monday. From the description: 'Application Enhancer (APE) is affected by a local privilege escalation vulnerability which allows local users to gain root privileges.' APE is the same software used to deploy fixes during 'The Month of Apple Fixes' (MOAF). I know it's confusing but MOAB came first and MOAF was a developer's answer to the bugs — after all, the purpose of posting bugs is to have them identified, confirmed and eradicated. The article talks about potential remote root access by an intruder. Note that this is third party software that all of the bugs seem to be stemming from. I guess Apple has made a fairly secure system but they can't expect all third party developers to follow the same rigorous standards."
I see it now. This entire MOAB thing is just there to tout how great and secure Apple Products are, and that the only bugs possible HAVE to come from 3rd party software!
It is all a plot by Jobs!
A PLOT I TELL YOU!
[/psycho]
Do Or Do Not, There Is No Spoon, There Is Only Zuul. Everything in the above post is probably opinion.
So, this is the best MOAB has to offer? A security bug in a third-party "enhancement"?
This is scaremongering at its best. Nothing to see here, move along.
The Secret of Life: Proteins fold up and bind things.
What do you have to say for yourselves now, Apple fanboys? With this glaring bug, coupled with the other devastating bugs, it now is clear that your smug castle is crumbling. Maybe it's time to give the rock-solid Vista another chance, no?
"I use a Mac because I'm just better than you are."
So far MOAB has released 2 bugs for QuickTime, 1 for iLife, 1 for DiskManagement/diskutil, and 1 for Finder.
The Online Slang Dictionary
MOAF moabs you.
Or something like that.
Rather than just tell people not to use APE, Landon Fuller (who reported this bug on his blog), should have written an APE SHell Investigative Tool to help people find and fix this error.
Technology needs more catchy acronyms
Crack - Free with every butt and set of boobs
Does that make it the Mother Of All Bugs?
This is a sig. It is like every other sig in the world, except that it is mine, and it is different.
Why would anyone who is serious about computer security use a THIRD PARTY app to fix a security issue?
This is my opinion. To make sure you don't steal it, it's covered by the DMCA.
From reading the article it looks like the people over at MOAB are rather pissed at Landon and this is just being spiteful.
'Application Enhancer (APE) is affected by a local privilege escalation vulnerability which allows local users to gain root privileges.'
should be...
'Application Enhancer (APE) is affected by a local privilege escalation vulnerability which allows local ADMINISTRATOR users to gain root privileges.'
From Anatomy of the Runtime MoAB Patches
...
------
01:04 Tue, 09 Jan 2007 PST -0800
Anatomy of the Runtime MoAB Patches
Introduction
For the past few days I've been releasing patches for software vulnerabilities in an assortment of Mac OS software. This project was intended to be a technical one, and I've never sat down to explain, in clear terms, how the patches work, what Application Enhancer is, or what the potential risks are in running these patches. I'm also not the first one (not by a long shot) to think of implementing third party patches for unpatched software vulnerabilities, either, and I'd like to discuss those efforts.
Here goes
Third Party Patches, Past and Present
Generally speaking, a software vulnerability is usually announced in coordination with a vendor-supplied software update. However, there are cases when a vendor patch is not available for a critical software vulnerability, leaving the user with limited options. Relatively recently, the idea of a "third party patch" has emerged; when a vendor patch is not available, a third party can reverse engineer the software in question and produce a temporary bug fix.
This technique has previously been used for both unpatched Windows and Mac OS X vulnerabilities. In 2006, Alexander Sotirov presented "Hotpatching and the Rise of Third-Party Patches" at the Las Vegas Black Hat conference, and is responsible for implementing two patches for unfixed Internet Explorer vulnerabilities. ZERT (Zero-day Emergency Response Team), who is composed of an impressive array of individuals, "work(s) together as a team to release a non-vendor patch when a so-called '0day' (zero-day) exploit appears in the open which poses a serious risk to the public, to the infrastructure of the Internet or both." On the Macintosh, Unsanity released Paranoid Android, a run-time patch for a critical vulnerability in Mac OS X's document handling. I believe the award for the first third party Windows patch for an unfixed vulnerability goes to Ilfak Guilfanov's December 2005 WMF patch. Guilfanov is the author of the excellent IDA Pro disassembler and debugger.
Risks and Benefits of Third Party Patches
A vendor-supplied update is always preferable to a third party patch. Third party patches are created by reverse engineering the vulnerable code, and are subject to limited testing and potential implementation deficiencies -- like the author of the vulnerable software, patch implementors are human, too. It is always possible that a bug in the patch could result in instability, or potentially expose a new exploit scenario.
On the other hand, a third party patch can provide protection against a critical vulnerability before the vendor is able to implement, test, and release a fix. The decision to use a third party patch should be made after a careful assessment of the vulnerability's risks and your own requirements -- it's never unreasonable to wait for an officially provided vendor fix.
Patching (more) Safely with Application Enhancer
The patches we've provided have all been implemented using Unsanity's Application Enhancer, and are "run-time patches" -- the patches insert themselves into applications at runtime, find the vulnerable code, and apply a band-aid. Nearly all of the patches released so far work by wrapping the vulnerable code and providing additional data validation, rejecting data that would otherwise cause the vulnerable code to malfunction (and thus allow the exploit to succeed). There are other options for implementing run-time patches on Mac OS X, including the open source mach_star -- I've previously used mach_star to implement runtime security patches for software on my own Mac. However, for the purposes of providing these fixes, I decided upon Application Enhancer.
Application Enhancer provides a nice, easy to use GUI for installing Applicati
So it's Linus' fault if Apache or Sendmail has a security problem?
The software has to be secure from top to bottom. If your PHP app has a security problem, it can do bad things on your machine no mather the OS.
Menzoberranzan Networks
The vulnerability is that APE installs itself in /Library where its supposed to go. /Library is writable by local admins. So a local admin can replace the APE executable and gain root privileges. Read that again. A local admin can replace the APE binary to gain root access.
A local admin, an effective root user account, can gain root access.
Or they could open up NetInfo Manager and enable the root account and enter in a password of their own choosing and then log into the GUI as root. Or they could open up Terminal and run sudo sh and get a root shell.
This is simple revenge. Rosyna called them trolls and linked to an APE fix for one of their bugs. I think Rosyna may be right of the 9 published bugs, 4 of them are not from Apple provided software.
An Apple Bug-Fix Tool? Err, um, no and no.
APE is developed by Unsanity and it's not a "bug fix tool."
It's a third party framework and daemon used for a number of thing.
"Things are more moderner than before- bigger, and yet smaller- it's computers-- San Dimas High School football RULES!"
Yes, my initial thought on using APE was: Its very cool of them to patch the bugs, but I'm not going to install APE on my system. A couple of years ago I read some info on APE that outlined how it modifies the system and because of that it is a potential security risk.
From what we're starting to see now, January 31 is going to be a long way off. Perhaps they should have waited until February for their Month of Apple Bugs. Less space to fill.
Even more interesting LMH ran a canary trap and caught Jason Harris of Unsanity in it.
l eak-and-mole.html
The canary trap the leak and the mole:
http://applefun.blogspot.com/2007/01/canary-trap-
This is also enlightening reading:
http://rixstep.com/1/1/20070109,02.shtml
I wouldn't have used APE before, but you'd have to be out of your tree to use it after this idiocy and shenanigans.
This statement doesn't make sense. The MOAB issues outlined to date have been a combination of Apple and 3rd party issues. See the following break down...
MOAB #1 - Apple issue
MOAB #2 - 3rd party issue
MOAB #3 - Apple issue
MOAB #4 - Apple issue
MOAB #5 - Apple issue
MOAB #6 - Apple and 3rd party
MOAB #7 - 3rd party issue
MOAB #8 - Apple and 3rd party
MOAB #9 - Apple issue
The "designated location" is actually one of several: /Library/InputManagers/ or ~/Library/InputManagers/. In other words, it doesn't take special privileges to make an InputManager bundle active on a given system for a specific user. You do have to have admin privileges to place the bundle into /Library/InputManagers/ so that all applications executed by all users are touched, but that's it.
Objective-C lets objects of one class "pose" as objects from another class. Posing is like dynamic subclassing; method dispatch happens against your class first and then on up to the original class if you didn't implement it or if your method specifically calls the "parent." This is where code injection comes in. You write a new class that poses as some class in the application and intercept the calls; your code starts executing.
Figuring out the application's classes isn't difficult. A free utility like class-dump can be used to grab an OS X application's class and data structure definitions, and from there it's easy write your own posing classes. Lots of bugs arising from injected code is due to sloppiness on the part of the programmer, and some of it is due to an InputManager modifying an application's data at the wrong time (which is easy to do, because the application rightfully believes that it owns its data).
I was going to write something about the security issues this entire scheme raises, spelling out how a nefarious programmer could hijack passwords and the like. I'll leave that to your imagination, though.
Shameless plug: While I didn't use APE, I did use InputManager technology in order to create Concierge (a bookmark manager for Safari, in the form of a drawer).
When I find a bug in my apple, I throw it away..
The vast majority of the virus scanning/blocking software is THIRD PARTY, as is much of the spyware detection software. For your reference:
http://www.symantec.com/
http://www.mcafee.com/
I suggest for the next few thing on this topic:
;)
MOSES
BALAAM
This isn't necessarily off-topic, although it would benefit from an explanation that the new acronym used in the article and the story may be confused by those in the weapons industry for something else....for about 5 seconds.
" I guess Apple has made a fairly secure system but they can't expect all third party developers to follow the same rigorous standards."
/. , but I have a relatively high user ID, so I just want to be sure I understand the logic...
So, when Apple does it, it's OK, but when Microsoft does it, they've obviously made a flawed system and deserve to be beaten about the head with an office chair?
I know this is
If I knew the wedgies I gave you back in 6th grade would have resulted in this . . . I might have taken a moments pause.
APE is not a bug fixing tool. APE is a hack to the core of the OS. APE lets you run other hacks to reroute your audio, change the action of menu buttons and things like that.
I thought that the MOAB was going to look at Apple Software not software for Apple computers.
MOAB came first and MOAF was a developer's answer to the bugs
What about MOOF???
Have you read my journal today?
"I guess Apple has made a fairly secure system but they can't expect all third party developers to follow the same rigorous standards." That's about right. *stares long and hard at Javascript and Flash*
Still waiting on Serviscope_minor to wake up to fucking reality and realize that Jessica Price isn't going to fuck him.
I'm surprised APE doesn't spontaneously mutate into a backdoor shell on port 6666 SIMPLY THROUGH A COINCIDENCE OF CODING ERRORS.
Seriously, if you're using APE, get it off your Mac NOW.
It is one of the major jobs of an OS to keep one out-of-control app from hosing your entire machine, whether that app is out of control due to hacking, user error, or other bugs. If your PHP app has a problem on a good OS, the attacker may be able to change files owned by the apache user, while on a bad OS they might undetectably rootkit your machine.
- None can love freedom heartily, but good men; the rest love not freedom, but license. -- John Milton
"Fuck it dude, let's go bowling."
Reading that summary as a Mac user, I just can't be bothered to sort all of this out.
"So it's Linus' fault if Apache or Sendmail has a security problem?"
Why not? It's Bills fault whenever a bug on WinTel platforms is found.
If I knew the wedgies I gave you back in 6th grade would have resulted in this . . . I might have taken a moments pause.
The bug is that /Library/Frameworks is group-writable by users in the admin group.
/Library /System /Applications -perm -022
ANY application run setuid, or any framework or plugin used by any application run setuid, could have been used to demo it. It's got nothing to do with APE. This is no different from the many privilege escalation issues in Windows caused by writable executables and system directories.
To tell if your Mac is susceptible to this kind of privilege escalation attack, run this command:
find
If there are no results, then your system is probably safe. If there are more than a few results, then you're likely vulnerable.
Try it and see.
Even funnier, Microsoft talks about how secure everything is in Windows. Marketing Machine in Motion. They never seem to talk about tens of thousands of flaws actually exploited in Windows. After 6 years of OS X and 6 years of XP, I'd say the percentages are dramatically in Mac OS X's favor.
Most of the stuff on
http://apple.slashdot.org/comments.pl?sid=216122&c id=17546398
http://apple.slashdot.org/comments.pl?sid=216122&c id=17546398
The vulnerability is that APE installs itself in /Library where its supposed to go. /Library is writable by local admins.
/Library is writable by local admins.
/Library and piggyback their way to root on any privileged application.
Too many words. Let me fix that for you: The vulnerability is that
Even if you don't install APE on your system, an attacker who has the ability to execute this exploit can simply drop an input manager or other plugin into
The problem is not that a malicious admin can gain root access -- of course he can, as you pointed out. No surprise there.
A malicious application running as an "admin" should not be able to gain root access.
No wonder Apple didn't care that aliases bypass traverse checking. That's a *minor* problem by comparison.
So the real problem is either that too many Mac users are running as admin, or that admin users have too broad write permissions without using sudo.
The real problem is that admin users have too broad write permissions.
Tens of thousands? Hyperbole much?
Either way, as soon as you're running malicious code, you're already screwed.
Not to minimize the problem (and it IS a real problem) but this is important.
Security is like sex. Once you're penetrated you're fucked.
You should never run applications from a source you do not trust.
Don't forget to turn off "Open 'Safe' Files After Downloading" in Safari.
I don't agree to that neither.
It's Bill's fault if Internet Explorer automatically installs a spyware, but not if John Doe's software let's viruses through.
Remind's me of old times, when it was Win95 vs MacOS 7. A PC crashed, it was the application's fault. A Mac crashed, the Mac was the problem. It's still a lot like this these times...
Menzoberranzan Networks
I don't know whether resetting those permissions will break anything or not.
I don't have a scratch Mac to test it on, anyone?
You may not even need to be admin.
/Library /System /Applications -perm -02". Any files or directories that show up there are world writable.
Try "find
True, but the responsability still lies in the PHP app.
Not only it can change apps, but it execute commands with it's priviledges too. (like download a mass mailer and start sending junk mail).
Menzoberranzan Networks
Well, privilege defines the difference: if an unprivileged app can be hacked in such a way as to escalate privileges, that is the fault of the OS, no matter what the app did wrong. If it can be hacked only so that a remote user can execute arbitrary commands with the privilege of the process they hacked, that is the fault of the app.
- None can love freedom heartily, but good men; the rest love not freedom, but license. -- John Milton
Note that this is third party software that all of the bugs seem to be stemming from. I guess Apple has made a fairly secure system but they can't expect all third party developers to follow the same rigorous standards."
Quicktime, Finder and iPhoto are third party now?
I guess the kernel is also third party by zealot logic then - or at least it will be after they start publishing the kernel level exploits. Kind of like what happens after a proof of concept virus gets announced for OSX - the zealots simply redefine what 'virus' means.
While you're looking at APE, have a look in /Library... maybe you'll be the first to find some spyware hiding in there thanks to all the world-writable files and directories... ... because that's the real problem. They didn't need APE, they could have used their own Input Manager instead. They just picked APE to thumb their nose at Landon Fuller.
Hell, Windows depends on this bug. The bug is... Apple left parts of /Library writable. Microsoft requires that every user have write access to parts of the system file tree to handle things like printing and web-page caching. Instead of fixing that, they've added a subsystem to monitor it and undo changes to system files... and of course there are viruses that use that subsystem to hide in so they get put back after they're removed by AV tools.
But more importantly, in Windows everyone runs as a member of Local Administrators anyway... and you don't need an exploit to become "root" from there, you *are* root.
Vocabulary issue, I think.
You're interpreting 'holes' to mean specific vulnerabilities, where the GP would have reasonable grounds for claiming a 'hole' is any vector for exploitation.
Due to the deeply and intricately connected nature of Windows, there are legitimate arguments either way. A buffer-overrun in, say, the PNG codec is a single vulnerability, but there are lots of different attack vectors. One vector would be the web browser. Another would be the email client. A third would be any file that reaches the computer by removable media.
To the average user, different paths of exploitation most likely equal different 'holes'.
I believe it was on Red Hat 5.0 that the 'graphical RPM installer' (was it called 'glint'??) had a bug in it. You couldn't use the graphical installer to install the fixed version. Whoops. _Everybody_ needed to know how to manually install an RPM-encumbered upgrade.
"The approach for fixing the MoAB issues is actually making Apple boost it's vulnerability handling process, and not leveraging the work to a jackass third-party which has no security background at all... -- http://projects.info-pull.com/moab/MOAB-08-01-2007 .html [info-pull.com]"
Gosh, yeah, that sounds real "professional' there.
And despite all this, there has not been a real security breach on OSX. I agree with some people here that the MOAB people seem to want to create on, so that they can be proven right.
This is like building a list of windows bugs and submitting a norton product as an exhibit. If this is the week of APPLE bugs, why are we hearing about macintosh software developers? Must be slim pickins in Mac OS X for security holes?? I thought they were going to post some real apple bugs? This is very disappointing, though I suppose it's nice to see they are having this problem.
I work for the Department of Redundancy Department.
MacOSX, almost as dangerous as Windows*. *In theory, actual results may vary. Offer not available in RI, WI. See you dealer for details.
Wow, I got modded as a troll. I didn't mean it as a troll, I just don't want to install APE. I am glad that Landon Fuller and others are doing the patches.
At one point 95% of all the crashlog submissions to Apple stemmed from APE. At that time Apple, upon receiving the crashlog, immediately searched for APE. If found, they discarded the log. And it's not because they're lazy. Because of the way APE operates, it1 can do very unexpected things that application developers aren't expecting, which can easily (very easily) cause applications to crash. There's nothing Apple can do about this - it's entirely APE getting in the way of what an Application expects to be norm and screwing with things.
I don't know if Apple's still receiving that high of a percentage of APE crashlogs, but I'm sure enough people are foolish enough to use that thing to make it fairly high. Eye Candy and Stupid GUI Tricks aren't "cool" enough to make up for all the lost time & work.
As for anyone releasing patches using APE, I don't know exactly what to say - install a framework that causes applications to crash, in order to fix a security hole that may or may not be a real-world problem? For christs sake, there's got to be a better way. Hell, third parties released updated Windows files for both VML & WMF vulnerabilities without any help from Microsoft, shouldn't someone be able to do something similar for OS X?
In short, screw haxies. The two OS X systems I interact with on a daily basis have been almost rock solid ever since I dumped APE oh-so-many years ago. I'm not going to open that can of worms and unleash the forces of bug hell on myself all over again.
Did he not even look at the list of errors? The majority exist as first party issues.
It was a canary trap.
The library folder has to be accessible to applications (and thus the current user) without authentication, because of the Application Support and Preferences directories, which they write to all the time.
Folders like Input Managers, Internet Plug-Ins, Widgets, and perhaps LaunchAgents need to have limited access though - that definitely needs to change, and I'd advise anyone who hasn't to change the permissions on those folders so that they require authentication for changes. Otherwise applications could silently install things in there without you knowing (some already do when they install things like 'Smart' Crash Reporter without asking for permission).
Thanks for the clarification!
From TFA:
No remote exploit. Nothing to see here. This only affects machines with the third-party "Application Enhancer" (APE), which I have always been reluctant to install (and I now know why)
The library folder has to be accessible to applications (and thus the current user) without authentication, because of the Application Support and Preferences directories, which they write to all the time.
/Library.
/Library without sudo-ing first is broken.
They should not be writing to
They should be writing to ~/Library (that is, the Library subdirectory in your home directory)
Any application that attempts to write directly to
you're basically telling me that a local admin user can change something in the system to give themselves root privileges?
/Library give any local user write access to an awful lot of files. All you have to do is drop a plugin somewhere under /Library and wait for a priviliged program to launch and execute it.
It's worse, any user on an OSX box can probably give themselves root privileges with a little patience. The default permissions on
How is this really any different from simply being an admin? AFAIK, they're basically the same thing on an OSX box.
An admin user theoretically can only perform administrative duties by going through the security dialog that lets him run a program as root. Clearly this is not the case, but it should be.
This is like building a list of windows bugs and submitting a norton product as an exhibit.
/Library is writable... and in investigating I've found that even after "fixing permissions" there's an awful lot of /Library that's not just writable by administrators... but by anyone.
This is not a flaw in APE. Any existing plugin or a new plugin could have equally well been used. The flaw is that
In the course of running repair permissions, I noticed a number of disturbing lines like "Permissions differ on
Apple needs to fix this. They should of course make sure there's nothing in the basic system that requires write permission there (there shouldn't be), then "Repair Permissions" should be updated to revoke non-root write for any file under
As a consumer workstation, its security is "good enough" for the average user.
I used to think so, but after their stupid response to the Safari/Helpviewer hole and the subsequent holes (all of which could have been fixed for good in June 2004), and now this... I'm not so sure.
Compared to Windows, it's good. It may be comparable to Red Hat, I don't know... but Red Hat's local security isn't "good enough" either.
Apple admits to and thanks those who submit bugs to them. I've never heard of them trying to cover one up.
They don't cover them up, they just ignore them. I sent them a report on the way aliases bypass traverse checking and can be used to 'tunnel' through top level directory permissions between accounts, and I've had no response. They still haven't changed the default "Open 'Safe' Files After Downloading" behaviour in Safari, or fixed the LaunchManager design flaws. Their response is like Microsoft's... they will apply a patch to fix a specific instance of a bug, but they don't touch the root cause.