Users login

Create an account »


Users login

Home » Hacking News » @stake 20030414: MacOS X DirectoryService vulnerabilities

@stake 20030414: MacOS X DirectoryService vulnerabilities

by Nikola Strahija on April 14th, 2003 Two vulnerabilities have been found in MacOS X DirecoryServices which, if exploited, may allow a local attacker to obtain root privileges.

Hash: SHA1

@stake, Inc.

Security Advisory

Advisory Name: MacOS X DirectoryService Privilege Escalation
and DoS Attack
Release Date: 04/10/2003
Application: /usr/sbin/DirectoryService
Platform: MacOS X (10.2.4 and below)
Severity: Local users can gain root privileges
Remote users may be able to crash
Author: Dave G.
Vendor Status: Notified, Patch Available
CVE Candidate: CAN-2003-0171


DirectoryServices is part of the MacOS X information and
authentication subsystem. It is launched at startup, setuid root
and installed by default. It is vulnerable to several attacks
ultimately allowing a local user to obtain root privileges.


During the startup of DirectoryService, the application creates a
lock file by executing the touch(1) UNIX command. It executes touch
through the system() libc function. This function is inherently
insecure and its use is strongly discouraged in privileged

Since this call to system() does not specify a full path to the
touch(1) command, it is possible for an attacker to modify the PATH
environment variable to specify a directory containing her own
version of the touch(1) command. In this instance, this would cause
DirectoryService to execute arbitrary commands as root.

In order for an attacker to exploit this vulnerability, they must
first cause DirectoryServices to terminate. This can be done by
simply connecting to port 625 repeatedly using an automated program.


03/25/2003 Apple notified via email.
03/28/2003 Apple verified.
04/10/2003 Coordinated release.

Vendor Response:

Directory Services: Fixes CAN-2003-0171 DirectoryServices Privilege
Escalation and DoS Attack. DirectoryService is part of the Mac OS X
and Mac OS X Server information services subsystem. It is launched
at startup, setuid root and installed by default. It is possible
for a local attacker to modify an environment variable that would
allow the execution of arbitrary commands as root. Credit to Dave
G. from @stake, Inc. for the discovery of this vulnerability.

@stake Recommendation:

@stake recommends that user upgrade to Mac OS X 10.2.5.

Common Vulnerabilities and Exposures (CVE) Information:

The Common Vulnerabilities and Exposures (CVE) project has assigned
the following names to these issues. These are candidates for
inclusion in the CVE list (, which standardizes
names for security problems.

CAN-2003-0171 Directory Services Privilege Escalation and DoS

@stake Vulnerability Reporting Policy:

@stake Advisory Archive:

PGP Key:

@stake is currently seeking application security experts to fill
several consulting positions. Applicants should have strong
application development skills and be able to perform application
security design reviews, code reviews, and application penetration
testing. Please send resumes to [email protected]

Copyright 2003 @stake, Inc. All rights reserved.

Version: PGP 8.0


Newsletter signup

Signup to our monthly newsletter and stay in touch with IT news!

Free E-books

We've got ebooks! But they're not online. :( Please give us a few days to bring downloads back.


Have something to say or just wanna drop us a line? Please keep this in mind: to spam, we reply with spam.

Contact us »