Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Security Open Source News

OAuth, OpenID Password Crack Could Affect Millions 304

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."
This discussion has been archived. No new comments can be posted.

OAuth, OpenID Password Crack Could Affect Millions

Comments Filter:
  • by MankyD ( 567984 ) on Friday July 16, 2010 @03:12PM (#32930244) Homepage

    "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."

    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?

  • by betterunixthanunix ( 980855 ) on Friday July 16, 2010 @03:13PM (#32930256)
    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.
  • by Enleth ( 947766 ) <enleth@enleth.com> on Friday July 16, 2010 @03:16PM (#32930320) Homepage

    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.

  • by Anonymous Coward on Friday July 16, 2010 @03:18PM (#32930372)

    Which is just a waste of CPU resources. It's better to use the function that returns immediately, and sleep briefly instead. At least then you're freeing up the CPU for other processes that may have real work to do.

    I know, I know, you'll say it's "not a big deal", but you probably just don't deal with real servers that experience heavy load.

  • by betterunixthanunix ( 980855 ) on Friday July 16, 2010 @03:21PM (#32930428)
    You'd be surprised. Salting and hashing passwords seems like common practice, but most programmers have minimal security training (yes, even those programmers who implement password based authentication systems) and may fail to realize the significance of not hashing.

    Now, the fact that open source projects have this problem is a bit disturbing...
  • by tthomas48 ( 180798 ) on Friday July 16, 2010 @03:26PM (#32930510)

    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?

  • Re:lolswordfish (Score:1, Insightful)

    by AnonymousClown ( 1788472 ) on Friday July 16, 2010 @03:37PM (#32930724)
    The movie makes me hard....Halle Berry topless and the thought of some hot blond giving a bj while working at the computer.....

    Suspension of disbelief, dude.

  • by Anonymous Coward on Friday July 16, 2010 @03:40PM (#32930786)

    Absolutely not. There is valuable computation done when hashing passwords. There isn't when you continue comparing passwords well after you know they don't match, when you could just as easily yield the CPU to other processes.

    You've been proved wrong. Try to argue the point next time, rather than throwing up strawmen.

  • Seriously? (Score:4, Insightful)

    by FranTaylor ( 164577 ) on Friday July 16, 2010 @03:44PM (#32930850)

    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?

  • by kyrio ( 1091003 ) on Friday July 16, 2010 @03:55PM (#32931028) Homepage

    It's you who is sounding like a troll. The AC is correct, you are not.

  • Re:Seriously? (Score:4, Insightful)

    by disambiguated ( 1147551 ) on Friday July 16, 2010 @04:09PM (#32931260)
    Compiler-optimized code on a 64 bit machine compares 8-bit characters 8 at a time. This guy is trying to force a context switch (upwards of thousands of instructions) to save 4 or 5 instructions. It doesn't save CPU (because of the context switch), it increases the latency, it's harder to code, and may be still vulnerable! sweet.
  • by Anonymous Coward on Friday July 16, 2010 @04:50PM (#32931974)

    Yes, you're going to run each password a bunch of times and average them. Are you completely stupid or what? The average of random data converges to a fixed value. Adding random noise to the same value over and over merely biases the average by the average of the random noise over time.

    Open any image in GIMP. Add random RGB noise. Be generous, go for uncorrelated independent RGB at 1.0 (i.e. ±255) on all three channels. Save the picture as noise-1.png.

    Open original image and repeat. Save it as noise-2.png. Repeat through noise-5.png.

    Now average them: Open noise-1.png. Then open as layers noise-2.png through noise-5.png. Set the opacity on the 2nd bottommost layer to 50%, next up 33.3%, 25%, 20%. Observe.

    The result will much better resemble the original image than any one of the noisy image did. You absolutely did not destroy the signal (image), you just added noise to it.

  • by droidix55 ( 1197447 ) on Friday July 16, 2010 @05:37PM (#32932542)
    Say you have two hashes
    1. break each into an array of integers, create a result array with the same size
    2. XOR the two arrays containing the hashes into the result array
    3. OR all of the ints in the result array together
    4. if the result is 0 then the authentication is successful

    Would that work?

  • by clone53421 ( 1310749 ) on Friday July 16, 2010 @09:29PM (#32934324) Journal

    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.

  • by Ant P. ( 974313 ) on Saturday July 17, 2010 @09:57AM (#32936574)

    So in your system, I could lock you out of the site simply by doing a bad login on your username three times? Nice.

We are each entitled to our own opinion, but no one is entitled to his own facts. -- Patrick Moynihan

Working...