Win a free GPS from Gadling!
Posts with tag ard

ARDAgent setuid allows root access, but there's a sort-of fix

Updates: See the end of the post for current info.

We've been getting quite a bit of email since yesterday's anonymous Slashdot posting of a security problem with ARDAgent on Mac OS X 10.4 and 10.5, and there's plenty of Twittering going on over the issue.

Here's the deal: ARDAgent is the application that responds to Apple Remote Desktop remote administration requests, screen sharing and the like; you can find it in /System/Library/CoreServices/RemoteManagement on 10.5 machines.

In order to go do the voodoo that you do so well when you're administering remote Macs, ARDAgent needs to be 'setuid root' -- it needs to run with the privileges and access that belong to the system administrator, the same way you do temporarily whenever you unlock a system preference or install an application with Apple's installer. This is normal and expected behavior.

What's not so normal and expected is that ARDAgent will execute the 'do shell script' AppleScript command (on behalf of remote admins, normally, who need to run Unix commands from time to time). The problem here is that since ARDAgent is setuid root, any subprocess it launches is running with administrator permissions, and in fact with the right malicious scripting here it would be possible to do a great deal of damage. Granted, in order to activate this vulnerability the attacker would either have to be at the machine, or logged in remotely with the same account that is currently in use... or just convince the user to run a malicious downloaded application. Yikes.

The good news is, there's a very simple workaround (courtesy of the fine folks at Intego -- note that if you actually use VirusBarrier to disable ARD's shell script access as they recommend, and your machine is managed remotely, your administrator may take some umbrage). It turns out that if ARD's remote access features are turned on, via the Sharing pane in System Preferences, you're clear. Even if there aren't any users permitted to administer your machine, the 'do shell script' command that ARDAgent runs is neutered and cannot be exploited in this fashion. Most home and small office Macs wouldn't normally have this turned on, but once you activate it you should be protected. Our basic instructions can be found here. [See update below -- turns out the fix may not protect you fully.]

Stay safe out there!

Update: Thomas Ptacek of Matasano weighs in on this flaw and offers some additional workarounds, but he doesn't seem overly concerned.

Update 2: Commenter (and Mac OS X security pro) Zack Smith, along with Chris Barker, points out that it's possible to kill the ARDAgent process and immediately run the osascript command, which bypasses the protection that running ARDAgent under launchd provides. Under those circumstances an attacker or someone sitting at your machine could still run commands as root, much to your chagrin.

To prevent this, one approach is to change the permissions on the ARDAgent application bundle -- note that this will both break with future system updates or permissions repairs, and may adversely affect administrative access to your machine from legitimate managers:

sudo chmod -R u-s /System/Library/CoreServices/RemoteManagement/ARDAgent.app

You can also simply archive and remove ARDAgent.app if you don't plan to be managed by anyone.

Thanks to everyone who sent this in, and thanks to Intego for pointing out the workaround.

LANrev releases free version of InstallEase

Who can take some software, bundle it for you? Make a free installer and then seal it up with glue? InstallEase can (with apologies to Sammy Davis, Jr.). The packaging utility, long part of the LANrev crossplatform management & audit tool, is now available free of charge -- making it very complementary to other no-cost packaging tools such as Apple's PackageMaker and the freeware Iceberg, and it compares in functionality to the $99 Casper Composer tool (also available as part of the comprehensive Casper Suite).

The idea behind both InstallEase and Composer is simple: suppose you want to install a new application on 20 computers, complete with plugins and pref files. Rather than walking around to each one, you snapshot your pre-install state on a prototype machine using InstallEase, then install the software; finally, take an 'after' picture. Just like that, you've created a package installer that can be run by the individual users, pushed out with ARD, LANrev, Casper etc., or triggered to run from a remote server. It's a great timesaver, especially for programs that don't leverage Apple's .pkg installer format for standardized deployment -- Office 2004, for example.

If you've got a passel of Macs to manage and you haven't tried InstallEase yet, give it a download and check it out.

Getting ARD Admin to Run on Intel Macs

I spend a significant amount of time using Apple Remote Desktop Admin every day at work. Aside from Radmind, it's my most valuable and useful tool for managing hundreds of Macintosh workstations in our labs and classrooms. I also have a brand-new 20" Intel iMac sitting on my desk, but until today, I've been unable to switch to it as my main computer because the ARD Admin software refuses to run on the new Intel machines.

Behold, a smart Mac admin somewhere has has figured out how to get ARD Admin to run on an Intel Mac, and it's as simple as removing the Intel version of the ARD agent, allow the Admin software to self-heal, and then relaunching the Admin app. More info and discussion here.

Now I can make my Intel iMac my main Mac desktop! So exciting the life of a Mac admin! Heh.

TUAW Features

iphone app store tuaw tests
Mac 101 ask-tuaw
Mac News
WWDC (251)
.Mac (64)
Accessories (639)
Airport (75)
Analysis / Opinion (1358)
Apple (1659)
Apple Corporate (561)
Apple Financial (190)
Apple History (48)
Apple Professional (54)
Apple TV (162)
Audio (447)
Bad Apple (120)
Beta Beat (152)
Blogging (85)
Bluetooth (17)
Bugs/Recalls (56)
Cult of Mac (873)
Deals (219)
Desktops (115)
Developer (262)
Education (99)
eMac (10)
Enterprise (139)
Features (403)
Freeware (386)
Gaming (376)
Graphic Design (33)
Hardware (1286)
Holidays (37)
Humor (578)
iBook (65)
iLife (235)
iMac (184)
Internet (334)
Internet Tools (1321)
iTS (977)
iTunes (814)
iWork (22)
Leopard (370)
Mac mini (112)
Mac Pro (53)
MacBook (202)
MacBook Air (79)
Macbook Pro (220)
MobileMe (35)
Multimedia (445)
Odds and ends (1450)
Open Source (279)
OS (915)
Peripherals (210)
Podcasting (182)
Podcasts (91)
Portables (197)
PowerBook (135)
PowerMac G5 (50)
Retail (594)
Retro Mac (48)
Rig of the Week (42)
Rumors (633)
Software (4344)
Software Update (417)
Steve Jobs (252)
Stocking Stuffers (50)
Surveys and Polls (97)
Switchers (112)
The Woz (34)
TUAW Business (242)
Universal Binary (281)
UNIX / BSD (61)
Video (905)
Weekend Review (83)
WIN Business (47)
Wireless (85)
Xserve (39)
iPhone/iPod News
iPhone (1620)
iPod Family (2065)
App Store (81)
SDK (19)
Mac Events
One More Thing (27)
Liveblog (1)
Other Events (226)
Macworld (489)
Mac Learning
AppleScript (3)
Ask TUAW (103)
Blogs (85)
Books (26)
Books and Blogs (62)
Cool tools (445)
Hacks (464)
How-tos (486)
Interviews (44)
Mods (187)
Productivity (590)
Reviews (112)
Security (156)
Terminal Tips (59)
Tips and tricks (567)
Troubleshooting (168)
TUAW Features
iPhone 101 (34)
TUAW Labs (3)
Blast From the Past (17)
TUAW Tips (144)
Flickr Find (36)
Found Footage (86)
Mac 101 (94)
TUAW Interview (31)
Widget Watch (198)
The Daily Best (1)
TUAW Faceoff (5)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Sponsored Links

The Unofficial Apple Weblog (TUAW) bloggers (30 days)

#BloggerPostsCmts
1Cory Bohon844
2Robert Palmer5839
3Steven Sande5423
4Dave Caolo480
5Mat Lu4010
6Erica Sadun333
7Scott McNulty320
8Mike Schramm201
9Brett Terpstra191
10Michael Rose1221
11Giles Turnbull80
12Christina Warren821
13Chris Ullrich30
14Joshua Ellis23
15Kent Pribbernow10
16Jason Clarke10

Featured Galleries

Macworld 2008 Keynote
Macworld 2008 Build-up
Apple Vanity Plates
DiscPainter
Crash Bandicoot Nitro Kart 3D
Macworld Expo 2007 show floor
Apple Texas Hold 'Em
The Macworld Faithful in Line
iPhone First Look

 

    Most Commented On (7 days)

    Recent Comments

    More Apple Analysis

    More from AOL Money and Finance

    Other Weblogs Inc. Network blogs you might be interested in: