Live data from Hacker News

“Invalid username or password” is a useless security measure

kev.inburke.com

171–180 of 188 posts

Re: “Invalid username or password” is a useless security measure

#171

Earlier quoted context omitted.

This is why I like federated login with the options of Google and Facebook. Why go through the hassle of creating a new password and sending a verification email, when the user can just click a couple buttons to sign in with a service indefinitely? The username can be chosen afterwards and never has to be re-typed.

My trouble with these things is that they invariably support multiple services, all of which I have accounts with, and I can never remember which one I'm using for any particular service.

I just default to Google since it's what I'd use for email verification if I were using email.

Re: “Invalid username or password” is a useless security measure

#172
This problem is often referred to as user enumeration, which seems like a misnomer to me.

Whatever you call it, it's good to keep in mind that Google, Apple, Facebook, and Twitter are vulnerable.

The most interesting facet to user enumeration is privacy. If Alice knows Bob's e-mail address, is it right that she can easily check with Carol's web system to see if Bob has an account with Carol? This is like calling a hotel and asking if a certain person is staying there. It leaks information confirming that two parties have a relationship.

What makes the privacy aspect especially interesting is that user enumeration is a bigger problem for small websites than for the Googles and Facebooks. This is because it's not much of a privacy breach to be able to test if a given e-mail address is on Facebook; big whoop, almost everyone is. But it's a much bigger breach to be able to test if a person is a customer of an illicit service. Most systems sit somewhere between those two extremes, and each needs to decide whether to prevent user enumeration.

The main point the author tries to make is quite matter-of-fact: If you are going to try to prevent user enumeration, then you have to do it for real, which usually results in less friendly account creation and password recovery systems.

Re: “Invalid username or password” is a useless security measure

#173

I don't know if it's still the case, but for a long time at Amazon your account identifier was a combination of your email address and password. So you could have two accounts with the same email address and different passwords. Needless to say, this caused some confusion for users.

Wouldn't that also make it impossible to change one's password?

Re: “Invalid username or password” is a useless security measure

#174

Earlier quoted context omitted.

I'm going to guess when a new jsmith comes along and tries to sign up with the same password as another jsmith, you get a helpful 'Sorry, that user name and password combination are already in use.' :P

If they're stupid enough to allow non-unique usernames I wouldn't bet on getting a helpful answer like that :)

You do realize the helpful answer reveals another users username and password...

Re: “Invalid username or password” is a useless security measure

#175

Earlier quoted context omitted.

Please don't always send an email. A malicious person can now start signing up every day with a bunch of emails resulting in users who do have an account receiving an email from your site daily/hourly saying "we noticed you're trying to sign up again". At which point they become annoyed with your service and either unsubscribe or delete their account. Hotmail do this everytime someone tries to reset my password which…

An attacker could already do this via nearly every service's "forgot my password" functionality, as you noted yourself in the case of hotmail. As the original author noted, rate limiting is also a fundamental requirement for security. Eventually no more emails are sent because the offending IP addresses are effectively blocked. Make email notifications an option for users (enabled by default, with an easy link in the…

Regarding rate limiting, must really suck to live in Qatar and be behind a proxy server with a single IP address with the whole rest of the country...

Re: “Invalid username or password” is a useless security measure

#176
post #132
post #54

Earlier quoted context omitted.

"is still the more correct and useful statement" No, it is usually incorrect and it is much less helpful than identifying which is incorrect. "it is entirely likely that the mistyped username is somebody else's valid username" No, that's highly unlikely. If the email isn't in the DB, just say so. If the password doesn't match, just say so.

> No, it is usually incorrect... If either the username does not exist, or the password does not match the existing username, then "incorrect username or password" is correct by logic. It might be incorrect if assuming xor meaning, because both could be wrong -- username and password. The parent's point also was that the service can not identify which one is wrong. Was it the username if the password did not match bu…

Yes, you're correct that it's logically correct. I was responding more to "more useful" when it is obviously less useful.

It's unlikely that a typo'd email address is in the DB.

Re: “Invalid username or password” is a useless security measure

#177

Earlier quoted context omitted.

An attacker could already do this via nearly every service's "forgot my password" functionality, as you noted yourself in the case of hotmail. As the original author noted, rate limiting is also a fundamental requirement for security. Eventually no more emails are sent because the offending IP addresses are effectively blocked. Make email notifications an option for users (enabled by default, with an easy link in the…

Regarding rate limiting, must really suck to live in Qatar and be behind a proxy server with a single IP address with the whole rest of the country...

Context for those unaware:

https://en.wikipedia.org/wiki/User_talk:82.148.97.69

Re: “Invalid username or password” is a useless security measure

#179
Alternate view, I hate sites which require login & password, especially to only view content. I try to ignore every such site, because those are designed really badly. As well as I don't get it what's the correllation between email and registration. I don't want to give my email, nor I want to register. If I need to give email, I can give any random temporary email. Signup procedures on many sites are horrible. Best sites do allow at least accessing content without these hindrances. Logging in, especially on mobile, is painful anyway. Using some kind of federated login is privacy issue (in most cases), so it doesn't solve anything either. For lulz, how about just PGP signing nonce? They can verify it against my public key. PGP also allows me to easily create as many parallel identifies with strong authentication as I want to.

Re: “Invalid username or password” is a useless security measure

#180

Leaving security aside, "incorrect username/password" is still the more correct and useful statement. Consider the case where you mistype your username (email). For sites like amazon, gmail, hotmail, yahoo, twitter, etc, it is entirely likely that the mistyped username is somebody else's valid username, you typed the password correctly, and "incorrect password" would hide the problem.

I've worked with a CRM product that allowed non-unique usernames. That's right the usernames could be duplicated, so we had like 10 jsmith's. It would parse the username/password combo, and if one matched, that's who you logged in as. I never got to test what happened when jsmith had the same password as another jsmith. I'm sure the results would have been terrifying and hilarious. Apparently, the history here is tha…

I think Amazon used to do this back in the depths of time.
Post reply on HN