But why can't I send people their passwords?
201 points| omervk | 11 years ago
I've just finished creating two FAQs: One for developers who come to the site and don't understand what's wrong with what they're doing [2] and another for the laymen who want to understand what we're all about and how to protect themselves [3]. The idea is that people could also send these links around to educate others.
As HN is one of our main supporting communities, I'd love to hear your thoughts about both of these new pages.
[1] http://plaintextoffenders.com/ [2] http://plaintextoffenders.com/faq/devs [3] http://plaintextoffenders.com/faq/non-devs
[+] [-] jere|11 years ago|reply
This is one I always struggled to understand. If email is compromised, the attacker can request and immediately intercept a password reset anyway.
[edit: Many excellent points below. I think some of these should be in the FAQ.
[+] [-] ajanuary|11 years ago|reply
That said, it can be more secure. Firstly, people reuse passwords, so intercepting a plaintext password gives you access not only to the account on that site, but also several others.
Secondly, if the link expires you can't use old account recovery emails to find out passwords. If you manage to compromise an account (rather than mitm), you can search through for old "here is your password" emails and use those without even having to initiate a new password recovery process, which in this age of mobile devices and push notifications risks the victim seeing the email and getting suspicious.
[+] [-] jaredmcateer|11 years ago|reply
[+] [-] pmjordan|11 years ago|reply
Additionally, even if your reset request is harvested via MITM, if you use a single-use reset token, and an attacker uses it before you can, you know something is up. Even if it's not single-use, your password suddenly no longer working should ring alarm bells.
[+] [-] weaksauce|11 years ago|reply
[+] [-] krambs|11 years ago|reply
[+] [-] 3pt14159|11 years ago|reply
[+] [-] cookingrobot|11 years ago|reply
This would close the "I accidentally left my account logged in" hole.
[+] [-] chacham15|11 years ago|reply
[+] [-] biggerfisch|11 years ago|reply
> Email is not a secure medium. It was never designed to be one. It’s susceptible to Man In The Middle (MITM) attacks and a slew of other issues.
Email by default right not isn't encrypted. Anyone (eg, a 3-letter government agency or a malicous actor on an unencrypted wifi network) who can intercept your traffic can read that password - and you can't even tell. At least with a password reset there's the "notification" of "my password doesn't work anymore". That's mitigated by SSL/TLS, but it's still an important point to consider.
[+] [-] blkhawk|11 years ago|reply
Not really the main issue - if you always send the password the Thief controlling the email does not even need to reset the password. he can get in without leaving any trace at any time. It also allows the collection of all the Passwords from all the users in bulk. And if your users are reusing their passwords everything else is open too.
Sending the Password is just a stupid policy. Its up there with restrictive Password requirements and Server-side unhashed Password storage.
[+] [-] Mithaldu|11 years ago|reply
[+] [-] unknown|11 years ago|reply
[deleted]
[+] [-] unknown|11 years ago|reply
[deleted]
[+] [-] jcampbell1|11 years ago|reply
Basically you could visit a malicious webpage, and all emails containing the word "password", would be sent to the attacker.
[+] [-] Sami_Lehtinen|11 years ago|reply
[+] [-] powatom|11 years ago|reply
[+] [-] SkyMarshal|11 years ago|reply
[+] [-] kateperry|11 years ago|reply
[deleted]
[+] [-] omervk|11 years ago|reply
[1] http://plaintextoffenders.com/ [2] http://plaintextoffenders.com/faq/devs [3] http://plaintextoffenders.com/faq/non-devs
[+] [-] _mulder_|11 years ago|reply
Example:
>7. Fine, but I still get to send users their passwords once they created them so they don’t forget them, right?
No, Email is not a secure medium.....
[+] [-] vomitcuddle|11 years ago|reply
[+] [-] jscheel|11 years ago|reply
[+] [-] makmanalp|11 years ago|reply
edit:
Maybe something along the lines of:
> Modern cryptography allows websites to save passwords in a form that is un-decryptable even to the site itself. This works because to check the validity of logins, the unencrypted (plain) version of the password is never needed. The fact that a site stores the password in a decryptable format and decrypts it to show it to you means that an attacker could potentially decrypt the password in the exact same way. Or even worse, maybe they never encrypt it in the first place! This potentially compromises the safety of the password you use because it lets an attacker steal your password.
[+] [-] ajanuary|11 years ago|reply
> If the website can pull out your password to show it to you, an attacker can pull out the password to steal it.
As ever, the issue is explaining hashing.
[+] [-] omervk|11 years ago|reply
[+] [-] tptacek|11 years ago|reply
By citing an inside-baseball controversy, you're making it harder for developers to do a good job storing passwords, because you're creating the impression that developers need to carefully choose which password hashing algorithm they use, and be careful about making the wrong choice.
In reality, what developers need to be careful about is choosing a password hashing algorithm, and not a general-purpose cryptographic hash. The right message is that PBKDF2, bcrypt, and scrypt are all fine options.
So my feedback is that your developer FAQ is trying to be a little too clever for its own good. I'd revise it.
[+] [-] couchand|11 years ago|reply
[+] [-] peterwwillis|11 years ago|reply
Question 9 should include a sub-section .3 which explains that if you unrestrict the password field, you need to include a basic password cracker or strength requirement, usually along with a client-side "strength" meter. The backend should reject all simple passwords and the frontend should help the user pick a simple yet strong password.
And ideally this page would also link the dev to http://twofactorauth.org/ as an example of how many more places are implementing 2FA. Passwords are dead; long live passwords with 2FA.
[+] [-] omervk|11 years ago|reply
Re: Q9. Again, that's a great pattern, but is not a requirement to not be on our list.
This is linked to from the non-dev FAQ, but I'll make sure to add a section about 2FA to the dev section.
Thanks!
[+] [-] awsh|11 years ago|reply
[+] [-] vadvi|11 years ago|reply
[+] [-] omervk|11 years ago|reply
[+] [-] a1a|11 years ago|reply
I'd remove the emphasized text. Yes they are vulnerable to collision attacks but that's completely irrelevant in this context.
[+] [-] aturek|11 years ago|reply
http://nakedsecurity.sophos.com/2013/11/20/serious-security-...
[+] [-] blueatlas|11 years ago|reply
[+] [-] furyg3|11 years ago|reply
I had a password for a credit card account which could not be more than 8 characters and couldn't contain 'special' characters or punctuation. This was probably done to either make the password human readable (over-the-phone, horrible idea), or because of some legacy system on their end. At some point the organization got smart and made a minimum of 6 characters, of which two needed to be numbers (but kept the other restrictions). This effectively narrows down pool the possible passwords for an attacker to guess, the opposite of what you want to do.
[+] [-] scrollaway|11 years ago|reply
[+] [-] adwn|11 years ago|reply
I sucks for people that generate individual passwords based on a common password and site-specific data.
[+] [-] user24|11 years ago|reply
[+] [-] jabbrwcky|11 years ago|reply
In the old days, if you stored the unencrypted password, it had to have a maximum length because somebody decided to make the db column 16 chars....
Same goes for charset limitations (e.g. try storing unicode characters in a database set to US-ASCII charset...) - with a hash your input does not matter - it is just a sequence of bytes that are hashed.
Lastly, the source of disallowing certain characters is the laziness of the implementers that couldn't be bothered to implement proper input encoding in their frontend
[+] [-] Grue3|11 years ago|reply
[+] [-] 7952|11 years ago|reply
[+] [-] bwy|11 years ago|reply
EDIT: Just saw @ajanuary's child comment on the top-voted parent. The point exactly.
[+] [-] TallGuyShort|11 years ago|reply
[+] [-] pornel|11 years ago|reply
MD5 and SHA1 are bad for password hashing indeed, but that's because they're fast, not because they have known collisions.
Collision attack has nothing to do with password security. For passwords the relevant attack is the preimage attack, which is a different thing and there are no feasible preimage attacks against these hashes (yet, of course).
[+] [-] scrollaway|11 years ago|reply
[+] [-] omervk|11 years ago|reply
[+] [-] mcovey|11 years ago|reply
[+] [-] philk10|11 years ago|reply
"We explain in everything our About page." - doesn't read right, maybe 'we explain everything on our About page"?
"your post was deleted with prejudice" ?? needs rephrasing