New (local) Mac OS X vulnerability : Passwords in Swap files
| Email weblog link | ||
| Discuss | ||
| Blog this |

Nitesh Dhanjani
Jun. 27, 2004 07:37 PM
Permalink
![]()
URL: http://securityfocus.com/archive/1/367116/2004-06-24/2004-06-30/0...
Came across this posting on BugTraq. Apparently, swap files in Mac OS X (as of 10.3.4) contain user passwords in clear text.Run the following on your Mac OS X box to see if you can find your passwords stored in clear text:
sudo strings -8 /var/vm/swapfile0 |grep -A 4 -i longname
At first, this 'vulnerability' may not seem like such a big deal. After all, the swap files are only readable by root. However, a system administrator should not have it so easy if he or she would want to obtain user passwords. Passwords should never be stored in clear text _anywhere_. A malicious trojan with root privileges can now steal user password in clear text, and many users use same passwords for other accounts, so this is a big deal. In addition, Keychain passwords are also apparently stored in clear text within the swap files (I haven't tested this). I hope Apple fixes this soon!
Nitesh Dhanjani is a well known security researcher, author, and speaker. Dhanjani has been invited to talk at various information security events such as the Black Hat Briefings, RSA, Hack in the Box, Microsoft Blue Hat, and OSCON.
Showing messages 1 through 15 of 15.
-
please help
2005-08-09 17:37:57 beth1979 [Reply | View]
i just got my computer and thought i would call myself the admin. the password i created was on a paper that my son threw away. i cant for the life of me remember what it was. is there anyone that can help me recover or change my password please?!?!?!?!?!?!?!?!?
-
fixed in Tiger
2005-06-20 09:10:21 frankie1969 [Reply | View]
Since no one else appears to have mentioned this yet: System Preferences -> Personal -> Security now has a checkbox for "Use secure virtual memory".
-
<strong>FUSSY TIME FUSS</strong>
2005-01-20 21:30:32 the.security.cow [Reply | View]
This bug better than 600 bugs in Oracle!
root should not have it so easily!
the.security.cow
-
What process is the password being swapped in?
2004-07-02 01:34:57 recusant [Reply | View]
One an application retrieves the password from the keychain, Apple cannot enforce that the key is used in a secure manner.
If these passwords are being swapped to disk by third party applications that are being granted the passwords, there's little Apple can do to prevent it.
Is KEYCHAIN swapping the passwords out, or programs getting the passwords through keychain?
-
A Joke?
2004-06-28 09:07:58 BlueWorld [Reply | View]
>>> However, a system administrator should not have it so easy if he or she would want to obtain user passwords.
You're kidding right? As root, I could copy your entire user directory to a new user and view all your files as that user and you would never know.
What exactly would a root user need your password for?
More importantly, wouldn't same admin have set your password to begin with?
-
Nothing new and not just Macs
2004-06-28 08:03:00 timharig [Reply | View]
This is not new and it is not just a Mac problem. This is why so many passwords, credit card numbers, etc. are found on old hard drives. The same thing happens in Windows, Unix, and any other operating system that uses virtual memory. The only problem is Macs so brilliant ideas to store passwords in a an appication so that they can be swapped to a disk although ssh and pgp/gpg key agents have a simular program. Also note that anything you type into a browser might also be swapped to the disk. If you have typed passwords, SSNs, credit card numbers into a site such as Ebay, then you need to assume that those numbers are stored on your hard disk. The only solution is to prevent trojans/crackers etc. out of your system and to make sure to wipe your disks clean before you ever discard them. Most people think that a reformat will distroy this information. The only way to insure that it is gone is to write over each sector specifically. Preferably several times using different data patterns, ie, all zeros and all ones.
-
dammit
2004-06-28 06:42:08 mp_nl [Reply | View]
Okay - that worked on one machine, and it returned an odd string that I don't know about, so I'm going to presume I've been rooted.
What would be the best next-step (now that we're panicking?) Formatting, fresh-installing are clear, but there're alot of preferences in the system; can I keep 'em? Also, is my keychain compromised? Do I have to start from scratch?
-
yep, worked for me
2004-06-28 05:11:05 cool_fritz [Reply | View]
Sure enough there was my password in plain text. This is not good. Hope Apple jumps on this.
-
Yep! It works for me. . . .
2004-06-28 03:03:24 rbannon@mac.com [Reply | View]
There it is, my password in plain text after running the command. Not good.
-
Of course...
2004-06-27 23:20:12 recusant [Reply | View]
Your password will have to have been swapped out for this to work. There's always the possibility that it just hasn't been swapped out yet.
Pull out all except 128MB of RAM and try again :-)
-
Doesn't seem to happen on my PowerBook
2004-06-27 22:34:34 James Elliott |
[Reply | View]
I've looked through all my swapfiles using that grep command, and although my user name shows up a number of times, followed by the word "password", my actual password does not appear anywhere.
I wonder what the difference is? I am also running OS X 10.3.4:
%uname -a
Darwin Alacrity.local 7.4.0 Darwin Kernel Version 7.4.0: Wed May 12 16:58:24 PDT 2004; root:xnu/xnu-517.7.7.obj~7/RELEASE_PPC Power Macintosh powerpc
-
works when searched on password
2004-06-27 22:25:00 jaccorens [Reply | View]
I found 2 instances of my cleartext password. but i think these entries are related to other applications than Apple's own. Going to try it today on a fresh install. Grepping on your password comes up with the entries if they are there.
-
tried other combinations, no luck
2004-06-27 21:06:52 dtrickey [Reply | View]
I also tried using the command verbatim. I also used \ to indicate a space in my long name.
No clear text password.
Doug
-
Didn't find my password
2004-06-27 21:02:37 dtrickey [Reply | View]
I replaced longname with my longname surrounded by double quotes. I found several instances of my username, but no cleartext password.
Doug
| Showing messages 1 through 15 of 15. |
Return to weblogs.oreilly.com.
Weblog authors are solely responsible for the content and accuracy of their weblogs, including opinions they express, and O'Reilly Media, Inc., disclaims any and all liabililty for that content, its accuracy, and opinions it may contain.
This work is licensed under a
Creative Commons License.






