Live data from Hacker News

Password crack [affecting OAuth and OpenID] could affect millions

computerworld.com

21–30 of 61 posts

Re: Password crack [affecting OAuth and OpenID] could affect millions

#21
post #9

"On some login systems, the computer will check password characters one at a time, and kick back a "login failed" message as soon as it spots a bad character in the password. This means a computer returns a completely bad login attempt a tiny bit faster than a login where the first character in the password is correct." This doesn't sound right to me. Aren't passwords usually checked by hashing the entire password an…

[deleted]

Re: Password crack [affecting OAuth and OpenID] could affect millions

#22
post #5

Earlier quoted context omitted.

On the second page of the article: >Program the system to take the same amount of time to return both correct and incorrect passwords. This can be done in about six lines of code, Lawson said.

Only by introducing a delay where is none is needed. This makes things slower for the rest of us. 1 extra millisecond per user * 8 billion users * times 10 logins a day == Lots Of Lost Man Hours, probably enough to rebuild the great pyramids of Egypt by hand every year. Security researchers are the reason we can't have nice things. :)

[deleted]

Re: Password crack [affecting OAuth and OpenID] could affect millions

#23
post #18

Does anyone know how feasible this kind of attack is with real world network latency and server load fluctuations? In the end it comes down to statistics, but i could imagine forging a token this way might take a very high number of failed attempts, which might then trigger other security mechanisms?

From my understanding, actually surprisingly so. Stats allow you to cope with latency and uncertainty - just ask the NTP gurus. There's a reference somewhere, but effectively these attacks are possible over surprisingly long distances/dodgy connections.

Re: Password crack [affecting OAuth and OpenID] could affect millions

#25
post #7
post #2

if timing is so critical to these attacks, it seems adding a tiny variable (on the order of a millisecond) in response times would completely prevent this

No. Adding noise to a signal increases the amount of filtering and the number of measurements you need to take. It doesn't eliminate the signals. The vulnerability is the signal; the fix --- a constant-time HMAC comparison function --- is to eliminate the signal.

So then is the fix as simple as removing the early "break;" statement from a strcmp?

Re: Password crack [affecting OAuth and OpenID] could affect millions

#28
post #11
post #9

"On some login systems, the computer will check password characters one at a time, and kick back a "login failed" message as soon as it spots a bad character in the password. This means a computer returns a completely bad login attempt a tiny bit faster than a login where the first character in the password is correct." This doesn't sound right to me. Aren't passwords usually checked by hashing the entire password an…

Yes, systems that hash passwords aren't timeable, because attackers can't "propose" a hash that is correct to the first N bytes in order to find byte N + 1. If you are comparing literal passwords, you may have something more to be concerned about.

"Not timeable" isn't entirely accurate. There are still ways to make use of timing information; they are just not this particular textbook example.

Re: Password crack [affecting OAuth and OpenID] could affect millions

#29
post #7

Earlier quoted context omitted.

No. Adding noise to a signal increases the amount of filtering and the number of measurements you need to take. It doesn't eliminate the signals. The vulnerability is the signal; the fix --- a constant-time HMAC comparison function --- is to eliminate the signal.

So then is the fix as simple as removing the early "break;" statement from a strcmp?

Perhaps the fix is to comment it out and explain why. ;)

Re: Password crack [affecting OAuth and OpenID] could affect millions

#30
post #7

Earlier quoted context omitted.

No. Adding noise to a signal increases the amount of filtering and the number of measurements you need to take. It doesn't eliminate the signals. The vulnerability is the signal; the fix --- a constant-time HMAC comparison function --- is to eliminate the signal.

So then is the fix as simple as removing the early "break;" statement from a strcmp?

Depends on the rest of the strcmp implementation. You might still leak information such as the number of correct characters if responding to a correct character takes a different amount of time than responding to an incorrect character. Ever played Mastermind? Same theory here.

Your best bet is to generate a huge body of inputs (including the relevant special cases), and tweak the code until it takes the same amount of time for all of them.

Post reply on HN