News for hackers. Stuff that matters.
Re:League of Legends database compromised, passwords hashed ... by bobobojer on Saturday June 09, 2012 @01:52AM (#4087363)
Out of curousity - is it a salt if you do something like this:

salty = md5(md5(pw) . pw . 'poniesaremagical' . md5(username));?

It is per-user... how is it different than using a timestamp which will be as unique as username?

Re:League of Legends database compromised, passwords hashed ... by Jach on Saturday June 09, 2012 @02:14AM (#4087401)
Technically yes, but don't use md5 for anything security-related ever. It's broken. http://www.mscs.dal.ca/~selinger/md5collision/ is just one example. (I also remember reading some years ago that md5s within md5s can make the resulting hash more vulnerable to certain attacks but I don't have any formal knowledge in cryptology to say for sure.) Use bcrypt/scrypt and you're automatically protected from both rainbow tables and brute force.
Re:League of Legends database compromised, passwords hashed ... by mwyvern on Saturday June 09, 2012 @05:44AM (#4087739)
H(Salt . H(Password)) is a lot like an hmac (minus the secret part and the padding). I'm not sure about the pre-image vulnerability mentioned on wikipedia's md5 page, but as for collision vulnerabilities, according to wikipedia's hmac page, "HMACs are substantially less affected by collisions than their underlying hashing algorithms alone. Therefore, HMAC-MD5 does not suffer from the same weaknesses that have been found in MD5."
Re:League of Legends database compromised, passwords hashed ... by jackalope on Saturday June 09, 2012 @12:39PM (#4088461)
It's not salty enough for my taste. What you've done is no different than:

  H(H(Password) + Salt)
If I steal your db and have another db that contains your user's unsalted password hashed with the same hash function, I can easily test if the same password is used in both places, simply by replacing H(Password) with the other hash. This leaks information and provides incentive to continue trying to crack the easiest target, if I really want what you have.

A simple change makes this comparison impossible:

  salty = H(H(Password + Salt)
Now there's no place to plug in the other hash, so I can't tell if the accounts share passwords until I successfully crack one and try it on the other. I might not bother and focus on lower hanging fruit.

Always assume your salting method is public, even if you make attempts to keep it secret. And remember that your site isn't in isolation; your user and every site they interact with are also potentially weak links in the chain.

Note that the examples above are oversimplified. You should look to a better authority on how to properly store passwords. In a future leak, we'll be surprised that the sites involved only salted their passwords.

Re:League of Legends database compromised, passwords hashed ... by drivebyacct2 on Saturday June 09, 2012 @02:31AM (#4087426)
Yes, as long as you use some salt data that is unique per user (timestamp, random number/guid/whatever) (you have to store that obviously), then it's fine. The problem is acting as if a site-wide salt is an ok-thing. It's not.
Re:League of Legends database compromised, passwords hashed ... by chc on Saturday June 09, 2012 @03:43AM (#4087547)
Incidentally, as the guy who started this whole thing, I'd just like to note that I actuslly agree with this. When I said they were "OK" or whatever, I meant it in the sense of "I guess it's good they're doing something," not like I'd recommend it. Please nobody get that idea.