I know there are ways to get the cookies from browsers in Windows and retrieve and decrypt saved passwords from them. Is there a similar way to do so on CentOS?

  • Yes it is possible. If it wasn't possible, then saving the passwords would not be useful. (There would be no way to actually use a saved password.) As for how to do it specifically, that isn't really a security related question (and I don't know the answer) and might be better suited for SuperUser. If all you wanted to know is if it was possible though, then the answer is yes it is. – AJ Henderson Jan 24 '13 at 17:33
  • okay then a small follow up, do you think that can be done for a computer connected to via ssh? – Melkar Muallem Jan 24 '13 at 17:42
  • not sure what you mean, like the password is stored in Firefox on a computer you are connected to via SSH and you want to know if you can recover the saved password? If you are able to use the instance of Firefox to access the page, then the saved password would be recoverable. Basically, the way that most saved passwords work is that they somehow protect the passwords and tie them to your user, typically via some system API that ties to the user account (if well designed). They can also work off a separate master password. – AJ Henderson Jan 24 '13 at 17:45
  • As long as you have access to the information it uses to decrypt the saved passwords, the process could be done manually. It should be particularly easy for something like Firefox where the means of protecting the passwords (the algorithms and key derivation) is public information. – AJ Henderson Jan 24 '13 at 17:46
  • @MelkarMuallem How you access the computer is irrelevant. All that matters is that you're logged into the account. – Gilles 'SO- stop being evil' Jan 24 '13 at 19:10

Yes it's possible, even over ssh and quite trivial to do. Enable X11 forwarding over ssh (e.g., -X option), start firefox, go to Preferences -> Security -> Saved Passwords -> Show Saved Passwords.

You could also find them in the relevant files in ~/.mozilla/firefox/{ user_profile } specifically key3.db for the encryption key and signons.sqlite for the encrpyted passwords. (They aren't in plaintext.)

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.