Mac GeekeryGet your geek on. |
|
blog advertising is good for you
recent popular content
User login
|
There exists a pretty significant interface problem with the Apple Installer program such that any package requesting admin access via the By creating a malicious package and setting the authorization level to A secondary problem is that even packages that have been created with the How and WhyWhen a user opens an installer package set to require administrative privileges to install, Installer will check and see if the current user is an administer of the computer. If so, the Installer program will run the entire install process, including any pre- and post-flight scripts/programs as the By using this method, an individual could open a properly-formed Installer package and open themselves up to attack. Similarly, an individual could sit down at any logged-in station and circumvent local password requirements for creating a new account by using a script in the package to create the account, even if the user is using the option in the Security preferences to lock System Preferences when first opened in order to prevent such behavior as this comes in from another angle entirely. Demonstrated DamageTo demonstrate this, I created an installer package set to require only Administrator access that echoed its user ID to a temporary file in both the pre- and post-flight scripts, replaced the /etc/sudoers file with a version that requires no password for any existing admin to become UID ResultsIn both of the scripts the reported user was root: $ cat /tmp/uid uid=0(root) gid=0(wheel) groups=0(wheel), 81(appserveradm), 79(appserverusr), 80(admin) Admin Creation ResultsIn the post-flight script, I used $ nicl . -read /groups/wheel users users: root haxxor Sudoers ResultsThe $ diff /etc/sudoers sudoers 20c20 < %admin ALL=(ALL) ALL --- > %admin ALL=(ALL) NOPASSWD: ALL $ And then after the run: $ diff /etc/sudoers sudoers $ This demonstrates that a properly-formed Installer package could be used to insert user accounts with administrator rights and change root-owned system configuration or binary files without prompting the vast majority of Mac OS X users for a password of any kind. Immediate SolutionRead my previous guide to securing Mac OS X and do not run as an admin user for daily activities. Moreover, if you must run as the administrator, do not install packages from non-reputable sources without cracking open the package and reading the pre- and post-flight scripts, if you know how. If not, research the product more. Normally, programs requesting such rights have to obey rules in /etc/authorization to do so. Indeed, it looks like the system.install.root.admin rule is the one that should cover this. However, in the Sep 14 23:43:57 Macintosh : admin auth received to install I altered the Installer’s stanzas to require the Real-World UseParallels is an honest and valid product from Parallels, Inc. It installs itself with an Installer package that uses The upside is that they do very well to not require a restart after installing the software. The downside is none of this required a password to get Long-Term SolutionApple needs to prompt for a password before any raise in power to root, and the installer is no exception. It would appear that the foundation to do so is in place, but the Installer is going around the normal means and doing something else. That’s unacceptable from a security standpoint. Mac OS X has a powerful security framework in place to protect the users, but it’s only as good as every program that uses it. If someone goes around it and lets someone run arbitrary scripts and programs as root then the whole system becomes insecure. Run as a normal user. Open files you trust. Stick to that and you’ll be fine. Why This Matters
Why This Doesn’t Matter
CreditThis was reported in July, 2006, on the Apple Discussion Boards and was brought to my attention by Mac Geekery user pixelslut. The Apple Discussion board states that the issue was reported to Apple and marked as a duplicate/known issue well over a month ago. The tests done here were performed on an iBook G4 running Mac OS X 10.4.7 with all available updates applied.
About Adam Knight
Author Biography Adam Knight is one of the founders of Mac Geekery and is a geek at heart. Programmer by day, hacker by night, his daily life revolves around the Macintosh platform, which he has been a user and programmer for since the early days of System 7 when his LCII replaced his Apple //c. In-between tech jobs, he’s managed to learn the basics of any web hacker: PHP, MySQL, Perl, Apache, Linux, *BSD, and the intricacies of ./configure —prefix=~/bombshelter/. Today, codepoet is concentrating on blogging again, writing some software for the Mac by himself (including Notae) and for his company (such as Switchblade) and has a few other toys coming out soon. Bug him over AIM or email [link fixed]. |
This is not a security issue. If I am running in the root context on any UNIX based system whether it be Linux, BSD, Solaris etc , I will never be prompted for a password to complete a privelege action. This is the way UNIX works.
Root is God and God never needs permission. Good security is “do not run as an admin user for daily activities.” Microsoft is finally learning this and the next Windows OS (Vista) prompt the user for any system level changes.
“So much of what we call management consists in making it difficult for people to work.” – Peter Drucker
Except we’re not running in the root context by being an admin user. You’re running as a user with id 501 and who is a member of the wheel group. You’re being silently promoted to root to run unknown shell scripts. That’s the problem.
The attention from Digg and Slashdot is not making it clear: the Mac “admin” user is not root, it’s a normal user account
Reading your article about basic security I follow a lot of those guidelines such as turning off sharing, having a strong password, locking down my computer, etc. The possibility exists (remotely) that I could succumb to the exploit, but I guess I am thinking that it would be just as easy for someone to format my drive as to get this.
The vulnerability itself: access to root level from an admin account is the real flaw is something that definitely needs to be patched. I guess the general advice is then we should not take candy from strangers and secondly don’t leave our computer physically open to be compromised.
Wouldn’t it be possible to work around this with a simple helper app for .pkg “files”? It would just search all files in the .pkg (or maybe just .plist files) for AdminAuthorization and replace it with RootAuthorization. I’d code it myself (in Applescript + bash) if I had time, but I don’t right now.
It would solve the issue in the GUI, but not on the command-line, such as with the
installertool.Just thought it worth commenting that this was fixed in Security Update 2006-004 (IIRC).
Passwords is the worst thing created those last 20 years and security is the source of lack of productivity for loads of users:
when you want to work you need a password and that’s so so annoying, it’s clear that fingerprints is the way to go and that passwords need to be eradicated as quickly as possible.
Security is a good way to waste your time because 0.1% of the computer population want to enter your system to steal information they will not be able to use. Before there was papers and drawers, nobody cared about security and suddenly because a few brainy people has some knowledge about how to hack and steal information, we have to all enter in a war attack philosophy.
Really annoying to be turned into a military minded individual because computers come from there…
Trust is what make humanity interesting, without trust we spend our time checking the people we deal with are saying the truth or not… And we waste a lot of time, a LOT…
idiot