6 ms·
Security Flaw in OS X displays all keychain passwords in plain text
- herbst 10y agoExactly why i don't trust my mac with my passwords.
- crummy 10y agohow do you login
- herbst 10y agoIt's a huge difference to use system specific passwords on that specific system or to trust a properitary buggy system with passwords to other, potentially critical, services and infrastructure. Which IMO is purely negligently
- pilif 10y agoWhenever you click any "Save my password" option offered by any application on any OS, that password will need to be stored in some reversible encryption somehwere - there is just no way around it. And unless you want to type in a password every time you need to access any of these stored passwords (which would nearly defeat the purpose), then the application or OS needs to keep that password and/or key in memory somewhere. At that point, I would trust an application that runs with privileges that not even root can get (thanks to 10.11's rootless mode) much more than any other application, even given the eventual security flaw. This severely reduces the attack surface to only the keychain application itself and to the component that enforces the privileges, whereas in other cases any root-exploit will cause you to lose your passwords. In the year of 10.11's existence, no security flaw has been found in either system integrity protection (= rootless mode) nor in keychain (the bug listed here isn't a bug. if you ask keychain to give you the password, it will have to give you the password or there would be zero point in even storing it in the first place)
- herbst 10y agoi dont even know which version i run, so no idea if i have to be scared or not. updates are way to painful to do regulary on a working dev machine. (lazy linux user here) anyway i never saved a password, thats exactly my point. There is not a single reason to believe that the apple keychain can be fully trusted, its that simple.
- pilif 10y agoSo how do you manage your passwords you have for multiple sites?
- herbst 10y agoi use a password sheme, and if possible 2fa. A sheme is not perfect ether, but would require to attacker to fetch multiple of my passwords until he can recreate it.
- jrochkind1 10y ago> There is not a single reason to believe that the apple keychain can be fully trusted, its that simple. How do you believe that differs from any other cloud manager, local or cloud-hosted? What reason(s) do you have to believe they can be fully trusted? Or do you not use password managers at all? I assume you don't re-use passwords from site to site (because there's also no single reason to believe any particular site you log into can be fully trusted with a password you've used accross sites), I assume you use secure passwords (because you clearly prioritize security)... how do you remember them all?
- herbst 10y agoI dont use any of these but use the gnome keyring at home. Its OS, based on industrie standards and afaik never had serious issues. (It sure helps that linux has more restrictive user rights) On other places i use a password sheme, and if possible 2fa. A sheme is not perfect ether, but would require to attacker to fetch multiple of my passwords until he can recreate it.
- cocotino 10y agotell process "SecurityAgent" click button "Allow" of group 1 of window 1 I'm pretty certain this is not possible in any recent version of OS X.
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- throwaway2016a 10y agoSame for me: "System Events got an error: Can’t get window 1 of process "SecurityAgent". Invalid index."
- schappim 10y agoI get: "System Events got an error: Can’t get group 1 of window 1 of process "SecurityAgent". Invalid index."
- ajani 10y agoJust tried this on my mac. And yes, It did output something. But the passwords aren't in plain text. It outputs, what looks like at first glance, encrypted passwords. Maybe there is an easy way to decrypt them using some other information in the output, but I haven't looked further.
- aftaylor2 10y agoI can confirm this works on 10.11.5 ( El Capitan ). To confirm, you can "cat keychain.txt | grep -i SECTION_OF_YOUR_PASSWORD". However, you must click Allow on each dialog, or Always Allow.
- gilgoomesh 10y agoDid you run the AppleScript? I got the expected error: > error "System Events got an error: Can’t get group 1 of window 1 of process \"SecurityAgent\". Invalid index." number -1719 from group 1 of window 1 of process "SecurityAgent" You're not supposed to be able to script SecurityAgent – and it doesn't work on my computer. Specifically, security windows should appear empty when read by other processes.
- csydas 10y agoSnippet from the man page for security: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/security.1.html https://developer.apple.com/legacy/library/documentation/Dar... >dump-keychain [-adhir] Dump the contents of one or more keychains. -a Dump access control list of items -d Dump (decrypted) data of items -i Interactive access control list editing mode -r Dump raw (encrypted) data of items I'm not at my Mac so can't test what it means by "dump decrypted", but I don't think it dumps all data in plain-text as the article suggested. I am curious if the keychain was unlocked when they did it for whatever reason. I still question why such an ability exists through terminal without more control, but it's not quite as described. edit: was very unclear I was posting a snippet of the actual command. fixed
- coldcode 10y ago
- jmiserez 10y agoThat only allows exporting the passwords of the currently logged-in user. If you let someone untrusted (!) log in remotely to your computer with your user account or you give it to someone while your user is logged in it's your own fault if your keys get stolen. You should use a guest account with restricted privileges or a separate machine. It's not much different on Linux, if you use Gnome-Keyring (used by default in Ubuntu and others) you can also get the passwords easily, in plain text [1]. Not sure about Windows, but you can most likely get to the passwords without installing anything as well if you're already logged in as the current user. If you're allowed to run executables, there are quite a few already [2]. [1] https://blog.schmichael.com/2008/10/30/listing-all-passwords-stored-in-gnome-keyring/ https://blog.schmichael.com/2008/10/30/listing-all-passwords... [2] http://www.nirsoft.net/password_recovery_tools.html http://www.nirsoft.net/password_recovery_tools.html
- gilgoomesh 10y agoSimply being logged in is not sufficient. The only way this should be possible on the Mac is if a logged in user physically at the computer selects "Allow" or "Always allow" for each security dialog that appears. Remote sessions are not permitted to do this. Security dialogs cannot be scripted under normal circumstances (the AppleScript given in the article simply doesn't work). I suspect it might be possible to do highly dangerous things like blessing the "System Events" tool as an Accessibility tool in the Security System Prefs Pane (which would allow it to send events to security dialogs) but I'm not totally sure that's possible and in any case, I don't think that's happening here. I think the author is simply mistaken or has clicked "Always allow" in the past and doesn't realize that this setting is still active.
- brenton07 10y agoI was actually the author of this article, and am about to update it to address some of the criticisms. We have two machines locked down to only certain functions, down to only certain IP addresses even being allowed to communicate with the machines, and still managed to execute this - it did prompt Allow/Deny windows, but I find that intellectually different than a lack of password prompt. I have dug through security preferences extensively and can't see what setting could be changed or updated to disallow this function. I've updated the article to address and respond to some of the criticisms and feedback.
- zZorgz 10y agoSo there's gonna be arguments both ways whether or not this console command should ask for a password or not since the user is already logged in. The main concern I have is the inconsistency that this command does not request a password while the keychain access app, as far as I know, does request one. Apple has been aware about their security behavior here at any rate.
- NexusGS 10y agoI tried with locked keychain and it requires to enter your password (still something but not everything). This is something that Apple needs to address soon I think.
- ralfd 10y ago> still something but not everything Instead of what? What do you propose would be better?
- wille92 10y agoAs others have alluded to, this is the "Login" keychain--a keychain of usernames and passwords that are unlocked upon a user's login. This is by design, not a security flaw.
- merpnderp 10y agoWhen I tested, I saw banking creds in the ask list. If I want those creds from keychain I have to type my master password. But for some reason if I want all the passwords using this method I just have to click 'Always Allow'. Jacked up.
- cocotino 10y agoThis is bogus. If you execute "security dump-keychain -d login.keychain": 1. If the keychain is unlocked (the keychain is unlocked by default after logging in, and you can check that by opening the Keychain Access app) a SecurityAgent window opens, and you must click the Allow button to dump the keychain. That cannot be scripted in an installation of a recent version of OS X which is not misconfigured. 2. If the keychain is locked (for example, by clicking the padlock in the Keychain Access app to lock it), it asks you for your user password, just like the Keychain Access app does.
- TheWiseOne3 10y agoOh yes we should definitely give apple a free pass on this one too, because it destroys our rapidly fading narrative that OSX is somehow more secure. But we all know that if Windows did the same thing, "cocotino" (name tells you all you need to know) and his herd of drones would trumpet it with glee yet again.
- merpnderp 10y agoI just replicated this and it is true for 10.11.5
- deleted 10y ago[deleted]
- Karunamon 10y agoReplicated it succeeding, or failing? It isn't possible to script the security window; the scripting system can't even see it. http://prntscr.com/bqepwk http://prntscr.com/bqepwk
- headShrinker 10y agoAlso, this ability to parse all the passwords unencrypted isn't a flaw and it isn't new. I ran this very command maybe 5 or 6 years also. Granted I was shocked to see all my passwords dump unhashed but you have to enter the users password and it makes sense that is the computer needs the passwords unhashed, there should be a secure command to gain access to them.
- Angostura 10y agoThis is actually really useful - thank you. I have been looking for an easy way to search for re-use of compromised passwords.
- brenton07 10y agoHa, I had the same response.
- okket 10y ago"working as intended"
- merpnderp 10y agoWhat I don't understand is if I want to access a particular password from keychain I have to enter my master password. But if I let someone use my machine for a few moments all they have to do is hit "Always Allow" and they can have all my passwords? That is jacked up, Apple.
- gwbas1c 10y agoNewsflash: If you let someone into your house, they can steal anything in your home.