Live data from Hacker News

Abusing Gmail to get previously unlisted e-mail addresses

blog.0day.rocks

21–30 of 51 posts

Re: Abusing Gmail to get previously unlisted e-mail addresses

#21

Earlier quoted context omitted.

> I've never seen anyone else acknowledge "confirmation of email address existence" as a security issue It's usually called "username enumeration" and there's plenty of pen testing firms that include this as a standard part of their process.

How do you prevent username enumeration when you want to have a username taken feature in the sign up process? I suppose a way to handle that would be to throttle the number of times such an IP can make those requests per month or something. This still will not prevent a motivated attacker, or the casual use to check if one or two usernames are registered.

In most cases, you can use an email address as the account name, and send a confirmation email containing a link they can use to sign up.

If the account already exists, you send an email saying something like "Hey, you tried to sign up but you already have an account. If you need to reset your password, follow this link." If the account doesn't already exist, you send the normal "follow this link to confirm your account" email.

From the attacker's point of view all they get told is "Check your email to continue" whether or not the account is already registered, so it doesn't leak this information.

This isn't always suitable – a mail provider like Gmail is an obvious example – but it would work for the vast majority of websites / web applications.

To be honest, I don't really rate username enumeration as a severe problem for most projects – obviously it's a problem if you can determine whether an email address is registered on, e.g. Ashley Madison or similar though. But it's simply not the case that "nobody else acknowledges it as a problem" – it's a very widely used test, even if the severity is usually considered low.

Re: Abusing Gmail to get previously unlisted e-mail addresses

#22

This isn't an issue, you can do the same thing with the main login form and a number of undocumented APIs. I've never seen anyone else acknowledge "confirmation of email address existence" as a security issue and I don't see why Google should be the first.

> I've never seen anyone else acknowledge "confirmation of email address existence" as a security issue It's usually called "username enumeration" and there's plenty of pen testing firms that include this as a standard part of their process.

Username enumeration is useful against a system with 10 or 1000 accounts, but absolutely meaningless on a system with 1,000,000,000 regular users.

Re: Abusing Gmail to get previously unlisted e-mail addresses

#23
post #16
post #14

Earlier quoted context omitted.

No, google SMTP accepts the RCPT TO with 250 "I'll try my best" regardless of the existence of the email.

Nope, it doesn't do that. >RCPT TO: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 https://support.google.com/mail/?p=NoSuchUser j63si2824869ybj.160 - gsmtp >RCPT TO: RCPT TO: 250 2.1.5 OK j63si2824869ybj.160 - gsmtp

Ah! You're right, my bad, I was thinking about VRFY command!

Re: Abusing Gmail to get previously unlisted e-mail addresses

#24
There's a more API friendly endpoint to do this that returns a nice JSON response, like this:

  {"input01":{"Valid":"false","ErrorMessage":"That username is taken. Try another.","Errors":{"GmailAddress":"That username is taken. Try another."},"ErrorData":[""]},"Locale":"en"}
See: https://gist.github.com/saml/2268291

Re: Abusing Gmail to get previously unlisted e-mail addresses

#25

I see companies trying to solve a similar issue on their password reset forms. They ask you to enter an email address - then give you a reply "if that email exists, we have sent a password reminder there". The problem is these sames sites have a self-signup, using a unique email as your login. So you can already find out if an email address is in use or not. If you've going to 'leak' the data one way or another, dont…

This is actually not difficult to address. Modify the account creation process so that the first step is to enter an email address. If the account does not already exist, an account activation link/code is sent. If it does, a password reset link/code is sent.

Re: Abusing Gmail to get previously unlisted e-mail addresses

#26

I see companies trying to solve a similar issue on their password reset forms. They ask you to enter an email address - then give you a reply "if that email exists, we have sent a password reminder there". The problem is these sames sites have a self-signup, using a unique email as your login. So you can already find out if an email address is in use or not. If you've going to 'leak' the data one way or another, dont…

Do the same thing on the signup page: If the email is already registered just progress the same way - send an email to that address and notify them that they already have an account.

Which is great for most accounts, but what about a primary?

How do you sign up for Gmail without an email account in this case?

Re: Abusing Gmail to get previously unlisted e-mail addresses

#27

Earlier quoted context omitted.

> I've never seen anyone else acknowledge "confirmation of email address existence" as a security issue It's usually called "username enumeration" and there's plenty of pen testing firms that include this as a standard part of their process.

Username enumeration is useful against a system with 10 or 1000 accounts, but absolutely meaningless on a system with 1,000,000,000 regular users.

It can be useful in either case. It depends on what the attacker is trying to achieve. If they just want to get in as any user, then your hypothetical system with a billion regular users is going to be even easier, because if even a fraction of those can be enumerated, it's likely that at least some will be accessible using a password-spraying attack using one or two common passwords, or by cross-referencing with passwords disclosed in a breach.

Re: Abusing Gmail to get previously unlisted e-mail addresses

#28

I see companies trying to solve a similar issue on their password reset forms. They ask you to enter an email address - then give you a reply "if that email exists, we have sent a password reminder there". The problem is these sames sites have a self-signup, using a unique email as your login. So you can already find out if an email address is in use or not. If you've going to 'leak' the data one way or another, dont…

This is actually not difficult to address. Modify the account creation process so that the first step is to enter an email address. If the account does not already exist, an account activation link/code is sent. If it does, a password reset link/code is sent.

> If the account does not already exist, an account activation link/code is sent.

That's not great for all use cases, though - if I'm just trying to check out of a store, I don't want to have to bounce to my email to confirm stuff.

Re: Abusing Gmail to get previously unlisted e-mail addresses

#30

This isn't an issue, you can do the same thing with the main login form and a number of undocumented APIs. I've never seen anyone else acknowledge "confirmation of email address existence" as a security issue and I don't see why Google should be the first.

> I've never seen anyone else acknowledge "confirmation of email address existence" as a security issue

Every guide to setting up an email server starts with "turn SMTP verify off if your server has insecure defaults"

Post reply on HN