I know that you shouldn't use unsalted MD5 hashes of passwords in databases. But unfortunately, people do, see https://hashes.org/public.php.

From this site I downloaded a file with passwords which obviously got cracked because their md5 hashes leaked.

It's very clear to me that this file contains short passwords and passwords which appear in a dictionary, since you can get them by brute force.

What I don't understand is: Why are there SHA256 hashes in this file? You simply can't input all SHA256 hashes into MD5 because the input space is way too big.

So how did people find this long, random-looking passwords?

2 Answers 2


You mean, that people use passwords like "abc123" and hash them to SHA-256 to get "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090".

And then they think that the second is more secure than "abc123". But is it?

Yes, the hashed version is in some cases more secure when we're talking about password-entropy. Because it's longer, has more random digits and characters,...

However, this is something we call security through obscurity. This method is secure, as long as no one knows you're using this. Because, it actually is just a case of hashing weak words to SHA-256 and see if they match.

Password crackers when doing a dictionary attack define rules. This can be things like: "also try with '123' after every word in the dictionary", or "make the first letter of the words in the dictionary uppercase", but they can also be "SHA-256 hash every word in the dictionary and try that".

And that rule is probably what this password attacker used. And yes, SHA-256 is relatively slow (which is a good thing), so the attacker would need more and better hardware. But people do have dedicated computer systems with e.g four top-level Nvidia Titan GPU's. Which can still do a lot of MD5(SHA-256($pass)) tries in a given amount of time. And not to mention that botnets are also still a thing, combining loads of computers to have more power.

It's just a question of using good rules. And maybe only SHA-256 the words which are short/weak, instead of all to save time.

Tip for using save passwords:
Take e.g five easy to remember words: e.g: battery, lamp, living room, candle, firespeed. (The battery of my lamp was empty so I took the candle in my living room with firespeed). This way, your password is: batterylamplivin_groomcandlefirespeed This way you have +- 35 characters, we have putted in a random '_' in the middle of a word to make it a lot harder for the attacker to guess. And when the attacker is doing a dictionary attack with rules of combining words. He'd need to combine this five word in the right order, including a word like 'firespeed', and then a rule to place a _ in every place of the string. With other words, this is a strong password, easy to remember and easy to type. A password manager is still better, but the password above could be used as masterpassword for the manager.

Tips for saving passwords in a database:
Use strong algorithms like SHA-256, but even better: Bcrypt. Read papers on how to salt and even pepper, let your code be reviewed by several people before actually using, don't try to make own algorithms.


There is an attack vector called rainbow tables attack.
In it the attacker cross references the md5 sum against a database of known md5 hashes. You don't need to run brute force always.
I believe that this file was populated using this technique.

  • But by using rainbow tables you usually get a lot of hashes of the type you want to crack. Here you would get a lot of md5 hashes, wouldn't you. Please be more precise about the way you think was used.
    – HorstKevin
    Jun 23, 2016 at 13:30
  • I didn't get lots of hashes part. Can you elaborate?? The hashing algorithms are designed to have the same hashcode for same parameters
    – Limit
    Jun 23, 2016 at 13:34
  • It would be very unusual to use SHA256 as the reduction function, wouldn't it?The space is too large and it is very unlikely that people choose SHA256 as passwords.
    – HorstKevin
    Jun 23, 2016 at 14:20
  • It is indeed highly unlikely that someone would use such passwords. The main reason I believe rainbow tables were used is because brute forcing such large text would take a really long time
    – Limit
    Jun 23, 2016 at 14:30
  • 1
    I know that you can compute md5 very fast. But the input space contains 2^256 items. You can't just compute md5 hashes of all of them.
    – HorstKevin
    Jun 24, 2016 at 7:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .