I have heard that hashing, such as MD5, is one-way and cannot be cracked. But there are some websites that can decrypt hash, like www.md5hashing.net and some scripts like findmyhash.py. I tested some hash and it was cracked successfully. Why can it do so?

  • 1
    Possible duplicate of security.stackexchange.com/questions/19906/…, and also related to security.stackexchange.com/questions/11717/…
    – esote
    Commented Dec 14, 2016 at 12:27
  • There are lots of different hash algorithms and some are shown to be insecure while others are not yet broken. Your question is very unspecific what you consider as cracked and in which context so I recommend to close it as too broad. But you might start reading more about use and properties of cryptographic hashes at wikipedia and then come back with more specific questions. Commented Dec 14, 2016 at 12:27
  • 2
  • 2
    First, hashing is NOT the same thing as encryption. It is very important for development team members to understand that difference. Hashes are an excellent way to store things like passwords, as they are one way functions. However, there are vulnerabilities when the hash value is known such as collisions in weak hash algorithms en.wikipedia.org/wiki/Collision_attack and rainbow tables. But for that to work the attacker already has to have access to your raw data. But that implies a whole different set of problems. Salting hashes as a first step hardens that step significantly.
    – dmarietta
    Commented Dec 14, 2016 at 15:31
  • Hashes can only be bruteforced and not be reversed due to some mathematical operations they use. For example one of them is modulo which is taking the remainder of a division, so if you had 7/2=3.5 then modulo(7/2) is 5 and there's no way to determine that the number 5 is the result of modulo(7/2) or (5/2) or any modulo operation that results in 5
    – dwkd
    Commented Dec 14, 2016 at 16:04

2 Answers 2


Hashes can be cracked using brute forcing. That means that you test hashing every possible input until you find one that generates the right output. To stop this a hash function used for password storage or key derivation needs to be deliberately slow (so that testing a lot of inputs take a very long time).

A site like the one you mention can also store a big list of known pairs of common inputs and outputs. Therefore they don't need to do a brute force every time someone sends them a hash to crack - they just need to look it up in the table. To stop this you use a salt (so that even a common password gets an unique hash).

You will note that they do not know the value of all hashes, just common ones. An example:

  • 5f4dcc3b5aa765d61d8327deb882cf99 is correctly reversed to password, because that is in their database.
  • 039c004d00c02a193144e96b3e8aa4ba can not be reversed to the random string tUGPP*yq24p+EgpQ that I just generated, because they can not fit all billions of possible random strings into their database.

So how do you protect yourself against sites like this? Use a slow hashing algorithm and a salt.

  • 2
    But now you've posted this, a web-search for 039c004d00c02a193144e96b3e8aa4ba “reverses” the hash… ;-)
    – 5gon12eder
    Commented Jan 12, 2017 at 6:27

This can be done with a dictionary attack. If you have calculated the hashes of many values before, you can just match which hash result corresponds to a given input.

I think you are referring to this script when you mention findmyhash.py; cursory inspection suggests that this script does indeed consult an online database of known hash values.

Also, MD5 is no longer considered secure, so it's possible that a more advanced tool exists to exploit its weakness(es). According to Wikipedia:

The security of the MD5 has been severely compromised, with its weaknesses having been exploited in the field, most infamously by the Flame malware in 2012. The CMU Software Engineering Institute considers MD5 essentially "cryptographically broken and unsuitable for further use".


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