• On TechRepublic: Windows 7: Slower to boot than Vista?
February 28, 2008 10:00 AM PST

Security glitch exposes OS X account passwords

by Declan McCullagh
  • Font size
  • Print
  • 88 comments

Apple has confirmed a security glitch that, in many situations, will let someone with physical access to a Macintosh computer gain access to the password of the active user account.

The vulnerability arises out of a programming error that stores the account password in the computer's memory long after it's needed, meaning it can be retrieved and used to log into the computer and impersonate the user.

"This is a real problem and it needs to be fixed," said Jacob Appelbaum, a San Francisco-area programmer who discovered the vulnerability and reported it to Apple. He said he disagreed with the company's response: "They won't put it in the latest security update or release a security update just for this issue."

Appelbaum is one of the team of researchers who published a "cold boot" paper last week describing unrelated vulnerabilities in encrypted filesystems, including Apple's FileVault, Windows Vista's BitLocker, and a number of open-source ones.

Unlike the security concerns reported last week, this vulnerability is specific to OS X. It's also more sweeping because it offers--at least in OS X's default configuration--full access to passwords stored in the Keychain, which can include passwords to wireless networks, Web sites, accounts accessed via SSH, network-mounted volumes, and so on.

Apple spokesman Anuj Nayar told me: "We're aware of this locally exploitable vulnerability, and we're working to fix it in an upcoming software update. While no operating system can be 100 percent immune, Apple has a great track record of addressing potential vulnerabilities before they can affect users."

The security glitch works like this: The OS X subsystem that asks for a username and password to log into an account is, reasonably enough, called loginwindow.app. In the default configuration, the account password unlocks the user's keychain and the encrypted FileVault volume (if one is in use).

But instead of immediately erasing the password from memory once the unlocking process is complete, OS X keeps it around. That means someone with physical access to the computer can use multiple methods to extract the contents of the computer's DRAM chips.

Last week's paper described some of those techniques. They include: plugging an iPod into a Firewire port to extract the contents of memory, rebooting the computer and running a memory-extractor over the network or from removable media, or physically ripping out the DRAM chips and inserting them into another computer. (Setting a firmware password can guard against the rebooting-attack threat.)

Turning off your computer and waiting a minute or more protects you from this attack by giving the contents of DRAM time to decay.

Although it's possible that the password stays in RAM even after the user logs out--which would be even more dangerous--Appelbaum hasn't tested that theory.

Trust, but verify

I invited Appelbaum over to News.com headquarters in downtown San Francisco and asked him to demonstrate the vulnerability on my laptop. He showed up with Seth Schoen of the Electronic Frontier Foundation and William Paul, who also worked on last week's paper.

I gave them an Intel-based MacBook with a password-protected account called "Breakme." FileVault was turned on, encrypted swap was activated, and the computer was locked through the screen saver. There was a file on the Desktop called "canyoureadthis"--if they could read its contents, I figured, they proved their attack worked.

What they did first, as you can see in the photographs below, was run an Ethernet cable from the MacBook to one of their laptops. Their next step was to convince the MacBook to run an "EFI memory scraper" program (written by Paul) found over the network through Apple's NetBoot service by holding down N while rebooting. That extracted the contents of the MacBook's memory to a 1.25 GB file. Then they scanned through it for likely passphrases.

It took them a few minutes, but they found the passphrase, "impressive"--as in, if they could find it, the attack was impressive. Once they had the password, they could easily log into the account and read the secret file on the desktop, which contained a relevant quotation from Thomas Jefferson. (They're planning to release the EFI memory scraper and other utilities some time in the next few months, so other people will be able to do this, too.)

Appelbaum reported the problem to Apple on February 5, but Apple didn't fix it in the security update released on February 11. "They should be concerned because it means that things that require password authentication do query this information," he said.

Because Apple wouldn't divulge details, it's a little unclear exactly what happened. But because loginwindow.app dates back to NeXTSTEP in the late 1980s, when nobody was even thinking about this kind of attack, it's possible that the origin of some of the code in use is older than some News.com readers who are reading this article today.*

Rebooting the target MacBook in a studio at CNET on Second Street in San Francisco. From left to right: Paul, Schoen, Appelbaum, and yours truly. We had planned on making a video, which is why we were using the fifth-floor studio, but the plan was nixed by a problem with the output from the camera you can see to the right. These are still images taken from the video.

(Credit: CNET)

Paul is skimming through the contents of the extracted memory--dumped from the Macintosh to his laptop--for possible passwords.

(Credit: CNET)

Eureka! There it is. The account name is 'Breakme' and the password I gave it is 'impressive.'

(Credit: CNET)

With the password, it was easy enough to log into the 'Breakme' account and read the secret file on the Desktop. These are the contents of it.

(Credit: CNET)

* Full disclosure: I worked at NeXT Computer during that time. Yes, that probably makes me old.

Declan McCullagh, CNET News' chief political correspondent, chronicles the intersection of politics and technology. He has covered politics, technology, and Washington, D.C., for more than a decade, which has turned him into an iconoclast and a skeptic of anyone who says, "We oughta have a new federal law against this." E-mail Declan.
Recent posts from News Blog
Nvidia puts NForce chipset development on hold
Opera 10 browser is here
Neil Young Archives Blu-ray: Rip off?
Acronis revises survey results about backup habits
Acronis miscalculates data on users' bad backup habits
Flickr co-founder presses beta button
Comcast, Sony open retail store
Cox to try coaxing the Internet into submission
Add a Comment (Log in or register) Showing 1 of 2 pages (88 Comments)
Be it Windows or Apple...
by RTFM February 28, 2008 10:46 AM PST
Security keeps getting better. There will ALWAYS be vulnerabilities to be exploited. Just use what works best for you. And keep on patching.
Reply to this comment
Very true
by cb3431 February 28, 2008 11:01 AM PST
It's all just a big game between software companies and hackers.

It's shocking how many people refuse to install updates.
It amuses me how...
by NewsReader_ February 28, 2008 11:17 AM PST
CNET constantly portrays OS-X security issues in a kinder fashion than it does for Windows.

This issue for example is described as a 'glitch', a term commonly used to describe very minor issues. This issue however is quite severe as it leaves passwords in user accessible memory with no attempt to obfuscate them. Go pick up any security book and chapter one tells you not to do this.

Had this been found in Windows, the title surely would have been: "Critical security flaw in Windows exposes account passwords"

It would be nice to read unbiased news every once in awhile.
Reply to this comment
minor flaw
by No Man February 28, 2008 11:37 AM PST
This is portrayed in a "kinder fashion" because its not a huge issue. It requires physical access for several minutes to a booted Mac by someone capable of writing their own software to extract the contents of active memory. Ignoring from the training necessary to accomplish this, that basically limits it to coworkers and members of your own household... the type of people who might be able to steal your password by looking over your shoulder when you're not paying attention. Yes, the issue needs to be resolved, but its really not a big deal.
View reply
Read the paper
by Stempnakowski February 28, 2008 12:30 PM PST
"Appelbaum is one of the team of researchers who published a
"cold boot" paper last week describing unrelated vulnerabilities in
encrypted filesystems, including Apple's FileVault, Windows Vista's
BitLocker, and a number of open-source ones."
Didn't anyone catch that Windows was mentioned? And it wasn't
singled out over the Mac. Windows/Apple fanboys need to chill out
and just focus on security.
Because . . .
by fokwp February 28, 2008 1:17 PM PST
. . . so little critical work is being done on Macs.
It's even funnier when you consider...
by Penguinisto February 28, 2008 2:34 PM PST
...that it requires physical access and a reboot, which makes it moot point for 99.999% of all folks who want to break into one.

Any OS is equally vulnerable when physical access is involved, and I think you'd notice someone trying to compromise your machine by that manner.

/P
View all 2 replies
Physical security breach = no security
by usario clave February 28, 2008 11:35 AM PST
It's a given in the security world that once you have physical access to the computer, your security has been compromised. I guess journalists haven't gotten the message yet.

If you had turned off your Macbook first then done a cold boot, would the exploit still work? Probably not.
Reply to this comment
People are the weakest link in security
by Andy kaufman February 28, 2008 11:50 AM PST
many hackers get passwords via social engineering. No security system can stop that.
physical security
by declan00 February 28, 2008 12:06 PM PST
Journalists still may not have gotten the message, but readers still can't read articles. Excerpt:

"Turning off your computer and waiting a minute or more protects you from this attack by giving the contents of DRAM time to decay."

And in terms of physical security, there are different levels of vulnerability. If you use FileVault and the computer is locked with its screen saver turned on, you probably don't expect the account password to be accessible.
You're dead wrong about physical security
by dhavleak February 28, 2008 2:39 PM PST
FileVault and Bitlocker (disk encryption tools) exist precisely for that purpose -- to keep your data safe in the event of your laptop being stolen (i.e. the attacker now has physical possession of your laptop).

So if you're using either of those tools, assuming that the attacker has physical access is a valid assumption. i.e., if this is the line of defence separating the attacker from your data, the attacker already has your machine!
View reply
-0-
by meski.oz February 28, 2008 4:38 PM PST
Do Macbooks have the equivalent of a hibernate file?
View reply
Correction
by menotbug February 28, 2008 11:37 AM PST
"(Setting a firmware password can guard against the rebooting-
attack threat.)"

Actually, setting a firmware password will also mitigate the iPod
attack.
Reply to this comment
Ha har!
by Andy kaufman February 28, 2008 11:48 AM PST
Mac OSX can be broken into easily. Fix it Steve!
Reply to this comment
Broken easily
by egarc--2008 February 28, 2008 2:27 PM PST
It can also be secured easily via firmware.

My computer will ONLY boot from the internal hard drive without a
password; then requires a password to log in. It won't boot into
Target Disc Mode or from the OS install DVD without a password.

btw, is your name really Andy Kaufman? I laugh just thinking about
him.
View reply
Really?
by Penguinisto February 28, 2008 2:38 PM PST
How easily d'ya think it is to break into someone's house to, in turn, break into a Mac?

With the risk level to the attacker now fully assessed (damned high), I doubt we'll see anyone attempting it on a criminal level any time soon.

/P
View all 2 replies
Duh?
by amandachuck February 28, 2008 11:51 AM PST
If someone has direct access to my computer, without any
supervision, I expect that my computer can be hacked. If not in
this method, than in myriad other ways. It's a no brainer.

The only way to prevent this is to disable your internal HD, use
an external for everything, and take it with you no matter what,
in essence making the computer a dumb machine. Of course,
then someone can steal your HD and plug it in, clone it and
crack it at their leisure.

The moral? Don't let people have access to your computer
without supervision. :)
Reply to this comment
If it's so easy...
by amandachuck February 28, 2008 11:54 AM PST
Do it right now. To my MacBook Pro. But I won't give it to you and
leave you alone with it. You have to find another way. But it's on
the internet, right now, and with enough work, you can probably
find out what IP address I'm writing from. So have at it!

Hey, now it's not so easy... ;)
Reply to this comment
Funny you should mention that.
by contentcreator--2008 February 28, 2008 12:12 PM PST
There's another hole in OS X that allows you complete access to a Mac's hard drive if SAMBA is turned on, regardless of what folders are shared, once you guess the password. Apple introduced it in Leopard as a special 'feature'. If your network traffic light goes on and stays on, you'll know why.
View all 2 replies
Could be worse...
by gsmiller88 February 28, 2008 12:30 PM PST
No one has physical access to any of my Macs but me, so I won't
sweat much until a patch is released :)
Reply to this comment
I have a very smart cat and a dog who both have access to my computers.
by ralfthedog February 28, 2008 3:13 PM PST
Just yesterday I came home and found "Truth about cats and dogs" charged to my credit card from iTunes.
Just don't save passwords
by rcrusoe February 28, 2008 12:39 PM PST
I quit saving passwords years ago when I learned how easy it was
to extract them from NT4.

I'm sure the situation has improved but why take the chance?
Reply to this comment
Track record because no competition
by fokwp February 28, 2008 1:16 PM PST
"Apple has a great track record of addressing potential vulnerabilities before they can affect users"

Translation: "a great track record of being such a small platform that very few people care about cracking us. That's why at Apple we're focusing on selling lots of iPods, and not lots of computers, because we wouldn't know how to live in that world."
Reply to this comment
Apple's track record is good
by hoho2 February 28, 2008 2:23 PM PST
And I'm a user, so I would know.

I don't envy MS the challenges they must have dealing with
security on their platform. But Apple is selling more computers
than ever, and it's clear to everyone that one of the big
advantages is that they have done an very good job of keeping
up with security issues. If the Mac is more secure in part
because it's less ubiquitous, it's stil more secure, and that's a
good thing. It doesn't mean Apple can't compete. I don't work
for them or own stock or anything and I don't think Steve Jobs
walks on water. Just so you know.
What is the big deal?
by daedbird February 28, 2008 1:21 PM PST
I don't understand what the big deal is, since there is an even
easier way to break the password encryption.........Instead of doing
all this stupid stuff freezing RAM, all you have to do is pop an OS
DVD in the drive, boot up from it and change the password there.
Who needs all this crap....
Reply to this comment
OS X boot-DVD password reset doesn't break FILE VAULT
by hoho2 February 28, 2008 2:04 PM PST
Interesting thought but: the MacOS X boot-disk password reset
can be used to reset an admin account password. This gives a
nefarious user admin access to the machine. But if there is an
account on the machine, admin or no, using File Vault, then
FileVault has encrypted the date using the login password.

The admin user can reset the login password for any account on
the Mac, but he can't recover any existing ones. Thus there is no
way to recover FileVault data using the boot-DVD.

Once a user has physical access to your machine (like to rip out
DRAM), then unless you are using FileVault or some other form
of file encryption, all bets are off in terms of data security. For
example, the nasty person could plug in a FireWire cable and
start your Mac up in Target-Disk mode, which would let them
clone the whole darn thing if they wanted to.

On an almost marginally related note, I believe Apple should
ship the computers with two accounts by default, one for user
work and one for admin/maintenance.
Install DVD
by misha1035 March 1, 2008 12:39 PM PST
Lol...so true!
And Apple makes no secret about this.
If you own the original system install DVD, you own the computer!
A boot disk (Like an install disk) will not break encryption.
by ralfthedog March 1, 2008 10:33 PM PST
It will bypass non encrypted OS level protection. The only way to break encryption is to steal the password or spend a few hundred thousand years with a super computer (assuming a reasonably long key and there is no flaw in the cryptographic algorithm).
Doesn't matter
by hybridmachine February 28, 2008 1:57 PM PST
If they have physical access, they can reboot your machine in single user mode and get into your account that way. Physical access to the machine equals no security.
Reply to this comment
Nothing new here...
by dawho9 February 28, 2008 2:03 PM PST
OK, its physical access. I have the following tools I can use if I have physical access to your computer:

Windows 2000 to XP (haven't tested on Vista)
- CD Rom that boots into a linux kernel that allows me to reset the administrator password.

Novell NetWare 4.x & Greater
- Program that I can run from the console which builds a new user at the root of the tree

Linux
- Boot into Single User Mode and reset password

As many have said. If you have physical access to the box you can do just about anything under the sun.

dw9
Reply to this comment
Security tips
by drukenhard February 28, 2008 2:26 PM PST
it is recommended that you create a second user account without
admin for day to day stuff.......so if they can only get the passwords
from the active profile then who cares?

If you can get your hands on a computer that's logged
on.....wouldn't you have access to everything anyway?
Reply to this comment
Now all they have to do is...
by Penguinisto February 28, 2008 2:30 PM PST
...break into my house, reboot the Mac, and oh, wait... if someone's going to break into my house, I doubt they'd do it just to figure out what the password on the machine is.

It is an admitted potential break-in point, but honestly, it's pretty convoluted and low priority at best.

After all, If I have to reboot a machine to get the contents, I could just as easily use a live CD to modify the Windows SAM account file and get whatever I want out of that... which has been the case ever since Windows NT came out.

Point is, anyone with physical access to any machine will have the contents of it.

/P
Reply to this comment
The point is that it should be fixed
by Vegaman_Dan February 28, 2008 3:06 PM PST
Regardless if you consider this a security risk or not, the demonstration clearly shows that it is. I trust that Apple will come out with a patch for this soon.
View reply
Download DRAM memory, or Remove DRAM chips - Alarmism
by Thomas, David February 28, 2008 2:35 PM PST
OK

Seriously, the removal of the DRAM chips is extremely sketchy
because it would require the DRAM chips to almost immediate
be placed, in correct order, into a container providing power,
and access.

Downloading the DRAM memory ... I think this tactic pretty
much will work with most computer systems. Not downplaying
the resourcefulness, and usefulness of this tactic, but
opportunity is a HUGE issue.

Bottom line. If someone went to resorting to these tactics, all
they need is a spy-camera to watch you type in your password.
This "security" issue alarm is a little far-fetched for 99% of the
people using their systems. This story illustrates alarmism
inching into the under-cover agent realm. In which case, there
is almost no security, if you are a target.
Reply to this comment
OS X still rocks
by RompStar_420 February 28, 2008 2:43 PM PST
I have never encountered an OS flaw free, since I started to use computer in 1984. Not in Windows, Not in Mac, Not in Unix and Not in Linux, and whatever else there is.

I still enjoy OS X the best, my machine can take 16GB of ram, the older G5 powermac and I have 4.5 installed and it creams!!!! leaves everything in dust and it's based on the older PowerPC processor the 2GB dual CPU model.

I can edit video, sounds and many other apps in real time, flawlessly, no waiting for stuff to happen or catch up. I have a PC at home too, I keep it for work, that has 4GM of RAM and it still sucks! It still crashes, it still freeses, SO take that to the bank.
Reply to this comment
Too Late
by Thomas, David February 28, 2008 2:45 PM PST
There was an excellent comment by someone here. This is an
example of story with limited legs. At least on this point. The
"glitch" describes a physical assault in which the "hacker" already
has you computer, a computer that is turned on, and logged on.

Too late. Nothing is going to protect you from that.
Reply to this comment
muppets
by asdasd1111 February 28, 2008 4:32 PM PST
1) They were logged in. The screen saver is a weak protector of
the machine - this couldnt happen on fast user switch.
2) There is no way loginwindow stores memory on logout
because it relaunches,
3) loginwindow does not enter the password no more - the
application which does that is SecurityAgent.app
4) autologin is probably turned on. that is the only reason the
loginwindow would need the password - which is stored on
disk. the best way to "break" into this machine is to reboot.
Apple clearly says that autologin is nonsecure.

if logged out there is no store of memory.

with physical access any machine can be broken into. without
the firmware password there are much easier ways of getting
into OS X than this nonsense. Muppets.
View reply
Weak Password
by p40tomahawk February 28, 2008 3:01 PM PST
"scanned through" ? Scanned through how? If you want to keep your system secure, use a real password. The pw in the article fails on many grounds: too short, no number characters, no non-letter characters, dictionary pw. It's a very, very fast password crack to uncover "impressive", nothing impressive about that. If the password had been "uGd&45nmn7S2", would they still have cracked the system?
Reply to this comment
Yes.
by ralfthedog February 28, 2008 3:22 PM PST
They did not guess the password, the read it from memory. On the other hand, we all now know that your password is "uGd&45nmn7S2". :)
password
by declan00 February 28, 2008 3:24 PM PST
Sigh. It wasn't a brute force or dictionary attack on the password; it was grabbing it from memory. It didn't matter what the password is.

uGd&45nmn7S2 is just as easy to nab from memory.
View reply
Security improvment for Windows PCs and Macs.
by ralfthedog February 28, 2008 3:23 PM PST
I would love to see a firmware update that writes 0s to your ram on boot. (That is ram, not hard drive)
Reply to this comment
RE
by unknown unknown February 29, 2008 2:53 PM PST
One of easiest solutions seems to be to have programs and OS's just over write the memory used to store passwords and encryption keys when they're not need anymore.

The other problem is preventing keys from being paged into virtual memory.
True
by DrtyDogg March 1, 2008 10:03 PM PST
It should be implemented
Showing 1 of 2 pages (88 Comments)

A CNET Conversation with Eric Schmidt

CNET's Tom Krazit and Molly Wood sit down with Google CEO Eric Schmidt to discuss the future of Android, the Chrome OS, the problem of real-time search indexing, and more.

Verizon tests sending RIAA copyright notices

The No. 2 phone company, known for its reluctance to intervene in antipiracy cases, strikes an agreement to forward copyright notices on behalf of the music industry.

About News Blog

Recent posts on technology, trends, and more.

Add this feed to your online news reader

advertisement
advertisement

Inside CNET News

Scroll Left Scroll Right