12 ms·
But why can't I send people their passwords?
Hi all, this is @omervk, one of the co-founders and maintainer of Plain-Text Offenders [1].
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
- omervk 12y agoClickable links: [1] http://plaintextoffenders.com/ http://plaintextoffenders.com/ [2] http://plaintextoffenders.com/faq/devs http://plaintextoffenders.com/faq/devs [3] http://plaintextoffenders.com/faq/non-devs http://plaintextoffenders.com/faq/non-devs
- awsh 12y agoYou've got a typo in the link in dev FAQ #7. Main-In-The-Middle
- couchand 12y agoQuestion #8 on the non-dev FAQ really should be higher up, like #3. That way the early questions mirror their own thoughts: 1. what is this, 2. but I thought it was secure, 3. what can I do?
- omervk 12y agoIt's a good thought, but the FAQ starts with what we are, why and how to contribute.
- jere 12y ago>7. Fine, but I still get to send users their passwords once they created them so they don’t forget them, right? 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. Also, users might have their email accounts abused or hacked into (how many people do you know who have left their GMail logged in on a public computer?). Would you really like someone to gain credentials to your product when this happens? 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.
- weaksauce 12y agoA lot of people use only one password for everywhere... You'd be giving the attacker the keys to the kingdom.
- jere 12y agoThis is certainly a good point.
- kenny_r 12y agoWhich is still true if you don't know their passwords but if you have their email. You can reset the passwords for just about every conceivable account they have.
- mechanical_fish 12y agoIf the password is in the email in cleartext, you don't need an active login for their email. All you need to do is be looking over their shoulder in the cafe, once, when they bring up the email on their iPad.
- octo_t 12y agoGiven an uncertain amount of time. Your process requires access to their email account while you go through and reset all their passwords. Whereas if the passwords are in plaintext, you can download all their email and get access at your leisure.
- LukeB_UK 12y agoI disagree with point 11. You shouldn't rely on someone else's service to be the way for users to access yours.
- troels 12y agoIt's pretty hard not to though. You rely on your hosting provider for service and probably on a multitude of software services too. Of course you have to weigh the value of each further point of failure in your setup, but it's a tradeoff and may well be worth it.
- sp332 12y agoYeah, but I can switch hosting providers. What happens when I switch login providers?
- troels 12y agoValid point. Still - that doesn't categorically make it a bad choice. It just weighs a bit heavier on the con side. There are some positive effects of that dependency as well (User trust and convenience).
- adwn 12y agoActually, that FAQ entry itself already counters your argument: "Treat it like you would payment - you wouldn’t write a whole payment gateway like PayPal - but instead use a 3rd party." Where's the difference? By the way, you can always allow users to connect several OpenIDs to a single account – this way, worried users can provide redundancy themselves, if desired.
- thesumofall 12y agoFor [11]: I think it makes sense to also highlight other approaches than OpenID such as https://passwordless.net https://passwordless.net which is a sort of way in the middle (disclaimer: I'm the author)
- scrollaway 12y agoAs a huge supporter of Persona, I am intrigued. Can you sell me on how this may be better?
- thesumofall 12y agoI think Persona is great and can be the right choice for many scenarios. Browser support, the JS requirement, and the reliance on email (whereas tokens can e.g. be distributed via text message) might however be points that convince developers to go with one-time passwords.
- scrollaway 12y ago> Browser support Persona is just a protocol though, it's implicitly supported by all browsers. Though in-browser auth (which is the ideal case) is only in Firefox so far... > JS requirement Granted. Though theoretically, you don't need javascript. > reliance on email Granted again, but this is a completely acceptable tradeoff for 99% of services which will require an email and usually even use it as the user's identification. Still not sold, but I'll keep your solution in mind. Thanks for alternatives! :)
- thesumofall 12y agoAlso, Persona still relies on passwords which are usually too weak and re-used across the web
- scrollaway 12y agoNo, Persona does not rely on passwords. Persona has authentication providers that rely on passwords.
- blueatlas 12y agoI was a bit surprised by #9.2 - "Don’t put any limitations on the passwords people can use (maximum lengths, disallowing certain characters, etc.)". What's the thinking here?
- scrollaway 12y agoWhat is the thinking behind disallowing certain characters? When you create artificial limitations you have to justify them, not the other way around.
- pdpi 12y agoThere was a discussion here a while back on this matter, where I held very much the same position as you. The other guy convincingly proved that adding the "must use at least one each of these character classes" barely reduces the password space, while promoting increased password complexity for those people who would pick the _really_ easy ones.
- scrollaway 12y agoWhat if I want my password to be "one small step for man one giant leap for mankind" (or something less known)? Do I really have to put a dollar in that to make it secure? Teach good password hygiene. Use keepassx. Use decentralized third party authentication with providers that know what they are doing and use 2FA and such! But password restrictions achieve very little. Let people use their 12345 if they really want, they won't learn by watching the stove but by touching it. Some people are like that and we should educate, not babysit.
- graylights 12y agoWell the other part of weak passwords is for many websites the users care less about account security then the website operator. There are many sites which contain none of my personal info but I have to setup an account just to view website content. If my account gets hijacked, it might be used for spamming. But still If I could make a throwaway account with a blank password I would because I don't care about that accounts security. So surely some restrictions need to be in place if you're going to require signups.
- scrollaway 12y agoCan you please look into Persona and recommend that instead of openid connect? It is a much better approach at decentralized authentication.
- omervk 12y agoI have. Please take a look at another comment that explains the issues with it here: https://news.ycombinator.com/item?id=7943695 https://news.ycombinator.com/item?id=7943695
- scrollaway 12y agoI had already replied to that comment.
- _mulder_ 12y agoI'd suggest starting the answer to each question with a clear Yes or No, Right or Wrong so people can skim through. 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.....
- omervk 12y agoGood idea. Implemented.
- vomitcuddle 12y agoThe dev FAQ should contain information on how to safely (and painlessly) migrate from plain-text/MD5/SHA1 to a more secure algorithm.
- thefreeman 12y agoAck, I accidentally down-voted this comment, someone please right my wrong
- huxley 12y agoI think Django's method is a good one to emulate: https://docs.djangoproject.com/en/dev/topics/auth/passwords/ https://docs.djangoproject.com/en/dev/topics/auth/passwords/ A list of password hashers, on successful login the user is upgraded to the top password hasher. Makes it very simple to switch to a new scheme or work factor.
- masklinn 12y agoOutside Django, if you're using Python, there's no excuse to not use passlib[0] whose cryptcontext object[1] handles this situation fantastically: create a cryptcontext with all the hash types you accept as input, and put any "old" hash in the `deprecated` list (or just set `deprecated=['auto']` in 1.6, it'll deprecate any non-default hash — the default hash is the first of the list, or the one passed as the `default` parameter). Then you can just use the relevant method to know that the authentication was successful and you should update the in-db hash: hash = CryptContext( # upgrading from an md5_crypted system ["sha256_crypt", "md5_crypt"], deprecated=['auto']) # in auth code valid, updated = hash.verify_and_update(password, current_hash) if not valid: # error out if updated is not None: # updated is the new hash to set in database [0] https://pythonhosted.org/passlib/ https://pythonhosted.org/passlib/ [1] https://pythonhosted.org/passlib/lib/passlib.context.html?highlight=cryptcontext#passlib.context.CryptContext https://pythonhosted.org/passlib/lib/passlib.context.html?hi...
- omervk 12y agoThat's a good point, but I think it goes a bit over what I was getting at.
- peterwwillis 12y agoQuestion 8 on the dev faq should emphasize using multiple layers when doing a password reset, partially to avoid the inherent problems with e-mail security (especially as your last bastion of security). Security questions, browser heuristics, login attempts, out-of-band communication (SMS confirmation code, secondary e-mail account, etc). 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/ http://twofactorauth.org/ as an example of how many more places are implementing 2FA. Passwords are dead; long live passwords with 2FA.
- omervk 12y agoRe: Q8. Security questions are an anti-pattern and the rest are outside our mandate. I do not claim to have written the penultimate guide to password security :) 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!
- Flenser 12y agoRe: Q9, you could at least put in a link to zxcvb[1] so that they can be aware that it's an issue and that there's libraries for implementing it. [1] https://tech.dropbox.com/2012/04/zxcvbn-realistic-password-strength-estimation/ https://tech.dropbox.com/2012/04/zxcvbn-realistic-password-s...
- philk10 12y agohttp://plaintextoffenders.com/faq/non-devs http://plaintextoffenders.com/faq/non-devs "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
- omervk 12y ago1. You're right. Fixed. 2. Rephrased.
- ten7 12y agoThanks for doing this, it is greatly appreciated. The list of offenders with screenshots is nice, but what would be really useful is a table that is sortable and filterable so that people (i.e. me) can find out if any of our vendors are offenders. Also, a JSON API would be slick too. Just ideas.
- omervk 12y agoSoon :)
- john2x 12y agoIs a plaintext (heh) list of all the sites available?
- omervk 12y agoSoon :)
- eldelshell 12y agoThis is something that came to mind while reading the comments: Why should me, the owner/developer of some service, care if somehow your password is stolen/guessed by any mean? I'm not saying we shouldn't take care of our users, but how's our fault that their email is hacked? We can't do anything to protect against this and placing more complex policies would hurt users who have enough common sense to this properly and expecting the same from us. P.S. I'm in no way saying to to ditch all security procedures we can, but to one point security is about trust, and if you can't trust your users to keep their freaking passwords and email accounts secured, then hell with them. Put it in plain text in your TOS and be done with it.
- marcosdumay 12y agoDo you have any idea how email works? You could as well just publish your users passwords at your front page, and claim that if a user has a password compromissed because of that, it's his own fault, you should be able to trust them not to use insecure services.
- omervk 12y agoBecause then users would lose faith in your service? Also, your service can then be abused. Think about a hacker ramping up charges on a credit card, only to have fraud detection activated and you losing money (and getting worse rates in the process).
- cincinnatus 12y agoAnd when your server is inevitably compromised and your users passwords stolen from you due to your lack of dillgence and used to compromise logins on other services, what then? Still their problem?
- omervk 12y agoWow, thanks for all of your points and suggestions! Unfortunately, I'll only be able to attend to them in an hour or so, so please bear with me and I promise personal attention to each any every point made here.
- makmanalp 12y agoYour non-devs FAQ is still not quite informative. You still don't explain to laymen /why/ what the sites are doing is wrong, you just say "You should never see your password". 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.
- omervk 12y agoThanks, I've added wording for that.
- ufo 12y agoI prefer makmanalp's explanation to the wording you are using right now. It emphasizes that hashing is an one-way operation and "encryption" or "scrambling" are more familiar and less abstract than "representation". I know its not an accurate usage of the terms but this is the layman FAQ and we could always add a link to a more in-depth explanation using the correct terminology (hashing, salts & key strength).
- ajanuary 12y agoThat's a pretty technical explanation. I think something like this would suffice: > 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.
- prawks 12y agoI like this description. I don't know that you need to explain hashing to laymen, though. Hand-waving is acceptable when communicating to people who aren't skeptics (laymen). If they're really interested in fact-checking you, they can do so on their own time, or you can provide links to detailed explanations. "It is possible to store passwords in a way that the website cannot see your password, but can still verify that a password entered by you checks out." (trust us, after all you're trusting that we know what we're talking about by reading this stuff)
- bdg 12y agoCreating an FAQ for these companies would be useful. Something to arm the devs who work at these places with something when they go to management who's reaction is "yeah I know it's bad.. but... like, we have important shit to do."
- omervk 12y agoWhat would you suggest?
- jchung 12y agoAssume the company is unaware that their developers have implemented the password this way. The FAQ for the company should highlight the exceptionally high cost of losing customer data, the distraction for their team from dealing with any breach, and the incredibly low cost of making the fix. The call to action could be for them to email their developer a link to your dev FAQ, demanding a fix.
- omervk 12y agoThat's a great idea! I'll add "I've been listed! What do I do?" to the FAQ. Thanks!
- jscheel 12y agoOur healthcare provider is storing passwords in plain text. When I went in for my health screening, they had everyone's forms printed out, with our passwords written on sticky notes attached to the front. Hundreds of people's health data, wide open for the taking. I was beyond pissed. Then I found out that they don't use ssl on their service, and the passsword can be retrieved at the click of a button. Ended up speaking with a C-level about it. Her response was that they are perfectly within HIPAA compliance, and that she would have to talk to their CTO about any other problems with their data security. Looking at the HIPAA, I have to say, it's not very clear on the need for hashing passwords. Still, I reminded her of the massive liability they are opening themselves to. She promised to get back in touch with me, but I haven't heard anything since (imagine that).
- moistgorilla 12y agoLol, my dad is an endodontist and he hasn't made his website interactive (patient accounts, interactive appointment scheduler, interactive referrals) yet because he can't afford a webdev that would make it secure (salting/encryption). My dad is an endodontist with zero software/web experience and even he knows not to keep passwords in plaintext and to use ssl. I'm only a CS undergrad and I'm learning webdev so I can implement it for him but I still know to hash and salt your passwords. The fact that people implement these critical systems (and get paid for it) without knowing basic practices makes me worry about the future.
- Jemaclus 12y agoMy 401K company, Kibble & Prentice, does the same thing. They make you call a phone number if you forget your password, and then the operator reads the password out loud to you over the phone. Freakin' amazing. I told HR and they said they'll change companies, but that was six months ago, so... who the hell knows.
- daddykotex 12y agoLet's say I register for a Web Hosting solution. And then I receive a email containing a username built upon the information I gave them and a generated password to access the cPanel. Is this offending? Let's also pretend that I have to change this password upon my first login.
- omervk 12y agoYes, because you might not be the first to use that password.
- aturek 12y agoI've been trying to learn the best practices on password "storage" and verification lately. I thought this was a really good step-by-step technical breakdown of the right way to hash passwords (I have no opinion/knowledge of the hashing algorithms in the article, but I've found a lot of other positive mentions of PBKDF2, bcrypt, and scrypt) http://nakedsecurity.sophos.com/2013/11/20/serious-security-how-to-store-your-users-passwords-safely/ http://nakedsecurity.sophos.com/2013/11/20/serious-security-...
- omervk 12y agoI'd appreciate it if you could post this as a comment to the Dev FAQ page :)
- TallGuyShort 12y agoThis is really good, and I applaud your efforts in that site in general! My one suggestion would be to explain the term "representation" a little better to non-devs so they understand why the secure technique is secure. I like to use the term "one-way encryption" so that it's clearly not some simple derivation of a password, but a mathematical process with proven difficulty and uncertainty when reversing.
- omervk 12y agoI thought of my mom and dad reading this and what they would best understand. I'm worried using something like "one-way encryption" would have their eyes glaze over :)
- TallGuyShort 12y agoProbably. What about something to the effect of just adding, "The representation is created by shuffling and encrypting the password over and over so there's no way to reverse the process" or something like that?
- bwy 12y agoThis isn't really addressing the main issue. You need to emphasize and just drive the point home that people should not even be STORING plain text passwords. Anywhere. Get them to understand that they don't want to, and shouldn't, know anyone's password in plain text, and how. It's a very counter-intuitive concept that makes sense once explained. EDIT: Just saw @ajanuary's child comment on the top-voted parent. The point exactly.
- 7952 12y agoIt is worth remembering that reset links should also be hashed. If the database is compromised the reset ID can be retrieved without needing access to the users email.
- peg_leg 12y agoYou shouldn't be able to see their passwords in the first place, let alone send it to them. You should only store a one-way encrypted string based on the password they typed.
- a1a 12y ago>>(Question 5) What? No! Why use algorithms that have been broken for years? It’s ridiculously fast to break both, along with many other simple algorithms. I'd remove the emphasized text. Yes they are vulnerable to collision attacks but that's completely irrelevant in this context.
- mcovey 12y agoinstead of "shittysecurity.com" you might want to use something like "example.com", for one because some people will see it as inflammatory, and because some eager devs might be presenting this to bosses who will take offense, and based on that emotion, decide the whole thing is bullshit.
- omervk 12y agoGood point.
- pornel 12y agoThe dev FAQ perpetuates a common misconception about "broken" MD5 and SHA1. 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).
- pornel 12y agoThe dev FAQ perpetuates a common misconception about "broken" MD5 and SHA1. 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).
- Frozenlock 12y agoI don't see how sending a reset link is secure. Wouldn't anyone intercepting the email be able to use the reset link themselves and gain access to the account?
- lotyrin 12y agoReset links can at least time out, passwords generally don't. Providers should send you notifications when you reset your password, they generally don't when you just log-in like normal.
- tptacek 12y agoThe "Don't Use Bcrypt" article isn't a good source; the headline message you've taken from it isn't accurate. In fact, bcrypt is significantly better than PBKDF2, and PBKDF2 (with normal parameters) is probably the "least best" of the mainstream options for password hashing. 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.
- omervk 12y agoThanks for the feedback. I went back to the article (which we started linking to a couple of years ago) and saw the comments and, along with what you wrote here, removed the preference of scrypt and PBKDF2 over bcrypt.
- geoffsanders 12y agoOr don't use passwords? https://launchkey.com https://launchkey.com :)
- omervk 12y agoI'd appreciate it if you could post this as a comment on the page itself. :)