[NEWS] Apple Mac OS X File Rewrites and Privilege Escalation
- From: SecuriTeam <support@xxxxxxxxxxxxxx>
- Date: 6 Mar 2006 13:01:44 +0200
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
Apple Mac OS X File Rewrites and Privilege Escalation
------------------------------------------------------------------------
SUMMARY
Improper handling of file permissions allows attackers to rewrite file
content on Apple Mac OS X.
DETAILS
Vulnerable Systems:
* Mac OS X Version 10.3.9
* Mac OS X Server Version 10.3.9
* Mac OS X Version 10.4.5
* Mac OS X Server Version 10.4.5
BOMArchiveHelper:
"BOMArchiveHelper is the default archive file handler in Mac OS X. It is a
service application that has no GUI when double-clicked, rather it is
invoked by opening its associated files or by choosing "Create archive of
'file'" in the Finder's File or contextual menu. It is located in
/System/Library/CoreServices/BOMArchiveHelper.app," or by using safari.
A specially crafted archive utilizing a Directory Traversal in
BOMArchiveHelper allows attackers to rewrite existing files and gain root
privileges by executing arbitrary programs.
Exploitation could allow a remote attacker to overwrite a file with
user-supplied contents. This can be leveraged to gain code execution on
the target machine by overwriting executable files such as login scripts.
Workaround:
To prevent exploitation from occurring through the Safari web browser,
disable the 'Open safe file types' option in Safari. To achieve this,
within Safari choose Preferences, then choose General, then uncheck the
'Open safe file types' option.
passwd file:
The /usr/bin/passwd binary is a setuid application which allows users to
change their password. There are two related vulnerabilities.
The Mac OS X version of the passwd utility accepts options specifying
which password database to operate on. The passwd binary does not check
that the user has permissions to create a file in the location specified
and does not set the created file permissions. By setting the file
creation mask to 0 a user can create arbitrary files owned by root, with
permissions which allow any user to change the contents.
The second vulnerability exists in the insecure creation of temporary
files with predictable names. The temporary filename created by the
process is in the form /tmp/.pwtmp.<pid> where <pid> is the process id of
the passwd process. By creating a symbolic link to the target file, and
then changing the password, it is possible to put controllable contents
into the target file.
Successful exploitation of either of these vulnerabilities would allow a
local attacker to gain elevated privileges in a number of ways.
In the case of the first vulnerability, a new file could be created in the
/etc directory, such as etc/rc.local_tuning, which is sourced if it
exists during the system start up process as the root user.
The second vulnerability would allow an attacker overwrite a file with
user controlled contents. This can be leveraged to provide privilege
escalation by, for example, creating a new /etc/sudoers file.
Workaround:
Remove the setuid bit from the /usr/bin/passwd binary by executing the
following command as root:
chmod -s /usr/bin/passwd
This workaround will prevent non-root users from being able to change
their password.
Vendor Status:
Apple has released Security Update 2006-001 to address the
BOMArchiveHelper Directory Traversial vulnerability:
<http://docs.info.apple.com/article.html?artnum=303382>
http://docs.info.apple.com/article.html?artnum=303382
Apple have released an update for the passwd vulnerabilities, details of
which are available at the following location:
<http://docs.info.apple.com/article.html?artnum=61798>
http://docs.info.apple.com/article.html?artnum=61798
Apple security updates are available via the Software Update mechanism:
<http://docs.info.apple.com/article.html?artnum=106704>
http://docs.info.apple.com/article.html?artnum=106704
Apple security updates are also available for manual download:
<http://www.apple.com/support/downloads>
http://www.apple.com/support/downloads
CVE Information:
<http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-0391>
CVE-2006-0391
<http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-2713>
CVE-2005-2713
<http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-2714>
CVE-2005-2714
Disclosure Timeline:
08/23/2005 Initial vendor notification
08/27/2005 Initial vendor response
03/02/2006 Coordinated public disclosure
ADDITIONAL INFORMATION
The information has been provided by
<mailto:idlabs-advisories@xxxxxxxxxxxxxxxxxx> iDEFENSE Labs.
The original article can be found at:
<http://www.idefense.com/intelligence/vulnerabilities/display.php?id=399>
http://www.idefense.com/intelligence/vulnerabilities/display.php?id=399,
<http://www.idefense.com/intelligence/vulnerabilities/display.php?id=400>
http://www.idefense.com/intelligence/vulnerabilities/display.php?id=400
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@xxxxxxxxxxxxxx
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@xxxxxxxxxxxxxx
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
- Prev by Date: [UNIX] Bitweaver CMS User Comment Title XSS
- Next by Date: [NEWS] Cube Engine Multiple Vulnerabilities (Exploit)
- Previous by thread: [UNIX] Bitweaver CMS User Comment Title XSS
- Next by thread: [NEWS] Cube Engine Multiple Vulnerabilities (Exploit)
- Index(es):
Relevant Pages
- Re: Mac OS X Server
... Security Updates ... Information on obtaining Mac OS X can be found on
the Mac OS X website ... Information on obtaining Mac OS X Server can be found on the Mac
OS X ... vulnerability and does not obtain a CVE ID. ... (Pen-Test) - Security analysts: Mac attacks rare but may rise
... But as more people use Apple products, experts say the company is increasingly becoming
a target for cyber pranksters and criminals writing viruses and other forms of malware. ... The
threat was highlighted earlier this week after a handful of the company's iPods were shipped with the
RavMonE.exe virus, which targeted iPods used with Microsoft Windows-based computers. ...
Oliver Friedrichs, director of security response at Symantec, a leading anti-virus software vendor,
said 72 vulnerabilities were discovered in the Mac's OS X operating system in 2006, up from 19 in 2004.
... And Symantec identified six threats of malicious code written for the Mac OS X operating
system in the first half of 2006, versus zero in the second half of 2005 and two the year before that.
... (comp.sys.mac.advocacy) - Re: Help With School Report: Are Macs Safer Than PCs From Viruses?
... I see areas of concern in the security implementation. ... access to the actual
"system", you'd have to log in as root to accomplish that, which is another reason why osx is
so rock solid. ... the sony stuff was never any concern to mac users. ... Nothing
in the Apple security model prevents that. ... (comp.sys.mac.advocacy) - Re: Mac OS X no longer immune to viruses!
... UC Boulder and he had been hit by this Mac virus. ... If the MacIntosh becomes
more common, it's security by obscurity security ... Apple done anything to dispel
its zealots claim that the Mac OS is immune. ... (comp.os.vms) - US-CERT Technical Cyber Security Alert TA06-132A -- Apple Mac Products Affected by M
... Apple Mac Products Affected by Multiple Vulnerabilities ... Security
Update 2006-003 for further information. ... (Cert)