OAuth, OpenID Password Crack Could Affect Millions
CWmike writes "Researchers Nate Lawson and Taylor Nelson say they've discovered a basic security flaw that affects dozens of open-source software libraries — including those used by software that implements the OAuth and OpenID standards — that are used to check passwords and user names when people log into websites such as Twitter and Digg. By trying to log in again and again, cycling through characters and measuring the time it takes for the computer to respond, hackers can ultimately figure out the correct passwords. This may all sound very theoretical, but timing attacks can actually succeed in the real world. Three years ago, one was used to hack Microsoft's Xbox 360 gaming system, and people who build smart cards have added timing attack protection for years. The researchers plan to discuss their attacks at the Black Hat conference later this month in Las Vegas."
It's just a matter of time. Anyone seen Swordfish?
Wait, doesn't slashdot use OpenID?
hahahah
DISREGARD THAT I SUCK COCKS
If you do almost any sort of reasonable hashing or encryption algorthm on a password, this becomes a moot point, since the place that fails to match in the string will change. Are there still sites out there that don't do this? Really?
-dave
http://millionnumbers.com/ - own the number of your dreams
This is neither a new problem nor an unsolved problem. This problem stems from using functions like strcmp, which return as soon as a difference is detected, and are thus unsuitable for password checks. Solution? Set a flag when the first difference is found, and continue checking subsequent characters.
Palm trees and 8
That movie makes me cringe.
No, a random delay just makes it harder for an attacker to determine the nect correct character. The exact theory behind eliminating the random factor eludes me, but several smart people found a way and it's supposedly correct.
I think the proper way is to "pad" the time so that it's constant. Say, if the password checking algorithm can take from 50us up to 600us, pad it to 1500us (safety margin!) with as much precision as posiible. There might be other code paths to pad, too, such as the one that fires when there's not even such a user, but you still want to display the "wrong password" message, as some systems do.
This is Slashdot. Common sense is futile. You will be modded down.
Not good enough. A random delay will add noise, increasing the number of attempts required, but will not break the attack vector.
What is needed is to insure that the algorithm will respond in the same time when a match fails, regardless of how close the match is. If this were a simple string comparison, you would need a function that compares every character in the input to a padded version of the password, not one that stops at the first mismatch. In most cases, that same approach can be extended to cover more complicated situations.
I hate this kind of announcement because it usually ends up that they found a hack in a revesion Bozo's poorly constructed library from 5 years ago, but I like this kind of announcement because it makes me consider my security.
I'm using a PHP OpenID library that's using md5 for comparison in the database. I don't really see how that would be feasible, since even if you were cycling through characters you need all characters to make the hash which mysql is making its string comparison based on.
Or am I missing something?
The exact theory behind eliminating the random factor eludes me, but several smart people found a way and it's supposedly correct.
It is fairly basic and necessary to pull off the attack (i.e. because this is being done over a network). Let's simplify things and suppose that the comparison is performed bit-by-bit rather than byte-by-byte; we want to determine if a particular bit is a 0 or a 1. We'll take 1000 measurements when the bit is a 0, and 1000 when it is a 1, and then take the average of the delays in each case. Invoking the law of large numbers, we can conclude that despite random noise, the average of a large number of samples should tend towards the expected value -- effectively, the noise will be removed (or more precisely, the average value of the noise will be added to both the 0 measurement and the 1 measurement, which is no different than just having a slower computer on the other end).
Now, for this to work properly, you need a large enough number of samples. The larger the range of random delays, the larger the number of samples will have to be. This creates a fairly typical security trade-off: too large of a range, and your users will be angry because they have to wait too long to log in, and too small of a range means that attackers have an easy time cracking passwords.
A better solution is to have a constant delay for every password check, regardless of whether the password is correct.
Palm trees and 8
The sarcastic answer is development.
Nerd rage is the funniest rage.
I suddenly wish I hadn't posted in this thread so I could mod up you to offset that troll mod someone lacking a sense of humor gave you.
Are you serious?
In the course of an entire web session's worth of CPU consumption, you are worried about the time taken to compare password characters? Any modern optimized processor should require one clock cycle per character.
Do you actually profile your code or do you just make funny noises? Or maybe you're running your web server on a Commodore 64?
No, the signal is the amount of time it takes to do the password comparison, and the noise is the random amount of time on top of it.
To circumvent: try each password 100 times. It'll become clear what the actual time to compare the password is.
the amount of delay caused by the password check and the amount of delay randomly added can NOT be differentiated.
Take a bunch of samples, average them.
Yeah. Would you choose a neurosurgeon who pokes around people's brains in his spare time? I wouldn't.
http://bash.org/?5775
I always thought a big flaw in the movie War Games was that the launch code was figured out one character at a time. Now this happens and flips my world upside down.
Would that work?
GODDAMN. You really ARE that stupid.
We are NOT fucking talking about a SINGLE measurement of time.
We are talking about hundreds - possibly thousands - of "value", plus your random number. Guess what. Your stupid random number averages out to its median over about 1000 attempts. Meanwhile the CONSTANT value remains CONSTANT and as only the RELATIVE position of the values was important, we can compare it to OTHER attempts and determine which was faster REGARDLESS of your stupid random number.
You average it out.
No, I do not expect you to understand that any more than you understood the more helpful (and less insulting) version. You are an idiot.
Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
So in your system, I could lock you out of the site simply by doing a bad login on your username three times? Nice.