10

i thought, that it is impossible to decode md5 hashes, but i found tools, which decode them here. but i have no idea, how they do it in such a short period of time(it takes about a second).

Help me please to understand it.

Thanks

ircmaxell
  • 163,128
  • 34
  • 264
  • 314
Simon
  • 22,637
  • 36
  • 92
  • 121
  • 4
    It tells you on the website itself: “This tool searches multiple databases for the unencoded version of a MD5 hash.” – Basic idea: Lots of people add random md5 hashes to a database and you simply reverse lookup them when entering a hash. Has nothing to do with decoding. – poke Jun 15 '10 at 21:17
  • 1
    Why is it difficult to imagine? Disk space is cheap. In MySQL (assuming the key is less than 255 bytes) each row would only be between about 40 and 300 bytes. All you need to do then is write a script that parses a dictionary and adds the md5 of each word... – ircmaxell Jun 15 '10 at 21:20
  • 1
    Even goggling the md5 hash of common words can yield good results. – Alex Jasmin Jun 16 '10 at 13:51
  • To be clear: you are looking up *a* possible origional string, not per se THE original string, as the possible strings you can start with is WAY larger then the possible md5 hashes. – Nanne May 22 '13 at 07:08

6 Answers6

20

It doesn't decode an MD5 hash. It uses what's called a rainbow table... That's why it's so important to use salted hashes instead of storing the hash directly...

ircmaxell
  • 163,128
  • 34
  • 264
  • 314
  • 2
    salted hashes can still be broken. – rook Jun 15 '10 at 21:35
  • Technically, rainbow tables don't even apply to this situation at all since there are an unbounded number of possible strings to be hashed. The site is just using a database of 'common' hashes. Rainbow tables != database lookup. – Charles Jun 15 '10 at 22:04
  • 1
    @Charles, I don't see anywhere the site describes their exact database schema, so I'm unclear why you've concluded there's no rainbow table. – Matthew Flaschen Jun 15 '10 at 22:41
  • Sure, salted hashes can still be broken. But it's significantly harder than unsalted hashes as you'd need to both know the salt, and generate a table for that salt... – ircmaxell Jun 15 '10 at 22:50
4

It is impossible to decode an MD5 hash as it is a one way algorithm, they will have a database of pre-calculated hashes and the string that was used to generate the hash and then perform a lookup.

OdinX
  • 4,135
  • 1
  • 24
  • 33
3

The web page actually contains the answer:

The database contains millions of MD5 hashes and their decrypted forms.

If you hash a somewhat trivial string like "Hello World" chances are it exists in that db. But enter a long string of some weird text like "H3ll0 Wh1rrl3d!?!" and the "conversion" will fail because it will not exist in the hash db. (Though my "weird" string seems to be getting decoded?!?)

IMPORTANT:


  • NOTE FROM THE SITE: Any data which is MD5 hashed is stored for lookups. Do not encode sensitive data using this form

lol. That's why anything you hash with the site will come back as decoded! Everytime you hash something with that site you increase the size and capability of the database!

Paul Sasik
  • 79,492
  • 20
  • 149
  • 189
2

It says clearly: This tool searches multiple databases for the unencoded version of a MD5 hash

Cristian
  • 198,401
  • 62
  • 356
  • 264
0

In general, this is still computationally intractable. However, rainbow tables assist in locating known pre-images. It will only work when the pre-image is based on common strings (e.g. dictionary words) and a salt isn't used. That's what they mean by "This tool searches multiple databases."

Matthew Flaschen
  • 278,309
  • 50
  • 514
  • 539
0

Even though its fair to say that rainbow tables won't crack long strings, someone with a lot of GPUs would be able to bruteforce it within a reasonable amount of money & time

blek__
  • 98
  • 1
  • 7