Apple Lion Vulnerable To Password Hack

Flaw in Mac OS X 10.7 allows logged-in attacker to change password without knowing previous one.

Apple WWDC Visual Tour: First Look At iCloud, Lion, iOS 5, And More
Slideshow: Apple WWDC Visual Tour: First Look At iCloud, Lion, iOS 5, And More
(click image for larger view and for slideshow)
A flaw in Apple OS X 10.7, aka Lion, would enable an attacker to change a user's system password without having to know the previous password. As a result, an attacker--albeit with physical access to the machine--would be able to change the boot password, as well as the password used by Apple's full-disk encryption tool, FileVault2.

The vulnerability appears to stem from a change in Lion's security model. Previous versions of OS X--back to 10.4--gave each operating system user a shadow file, or hash database (using SHA512 plus a 4-byte salt)--which could only be accessed by a user with admin-level privileges.


More Security Insights

Webcasts

More >>

White Papers

More >>

Reports

More >>

"It appears in the redesign of OS X Lion's authentication scheme a critical step has been overlooked," according to a blog post from security researcher Patrick Dunstan, who discovered the new password vulnerability. "Whilst non-root users are unable to access the shadow files directly, Lion actually provides non-root users the ability to still view password hash data. This is accomplished by extracting the data straight from Directory Services." Dunstan has also released a Python script to simplify the password hash cracking process.

[Apple has new leadership, but the company can be expected to continue on the path defined by its former CEO. See Jobs's Legacy: 8 Reasons Apple Will Dominate The Decade.]

But apparently, cracking password hashes--after they've been retrieved--isn't even necessary. According to Dunstan, "it appears Directory Services in Lion no longer requires authentication when requesting a password change for the current user." Instead, users can just enter command-line code to call the directory services (dscl) feature built into OS X, and employ it to immediately change any user's password.

How damaging could this attack be? "This is particularly dangerous if you are using Apple's new FileVault 2 disk encryption. If your Mac were left unlocked and someone changed your password you would no longer be able to boot your computer and potentially would lose access to all of your data," said Chester Wisniewski, a senior security advisor at Sophos Canada, in a blog post.

According to Dunstan, malware could also make use of the vulnerability to exploit Macs. For example, if an attacker could get a user to run a malicious Java applet--perhaps present on a website--then the applet could establish a control channel with a command-and-control server, then change the password of the logged-in user. If that user had administrative-level rights, the applet would then possess the admin password and thus gain root access to the Mac and the ability to push and execute any code.

Wisniewski said he'd confirmed with developers testing the forthcoming 10.7.2 update that the flaw is still present. Until the flaw gets patched, Dunstan said a temporary workaround would be "to limit standard access to the dscl utility."

Wisniewski said the attack serves as a security reminder that Mac users should disable automatic logins, set screensavers to require a password to unlock, and before leaving a Mac unattended, "use a 'hot corner' or the keychain lock to lock your screen."

The vendors, contractors, and other outside parties with which you do business can create a serious security risk. Here's how to keep this threat in check. Also in the new, all-digital issue of Dark Reading: Why focusing solely on your own company's security ignores the bigger picture. Download it now. (Free registration required.)


Related Reading




Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

InformationWeek encourages readers to engage in spirited, healthy debate, including taking us to task. However, InformationWeek moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing/SPAM. InformationWeek further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
Subscribe to RSS

Resource Links