Clan x86

Technical (Development, Security, etc.) => General Programming => Topic started by: Nate on July 01, 2005, 05:41:17 pm

Title: MD5
Post by: Nate on July 01, 2005, 05:41:17 pm
Ok, if i did something like hashed my name "111787" using the MD5 algorithm, is it possible to unhash it if you know the end result?
Title: Re: MD5
Post by: Sidoh on July 01, 2005, 06:59:48 pm
No. Hashing algorithms are irreversable. They're commonly used in data integrity algorithms and things of that nature.

Quote
Producing hash values for accessing data or for security. A hash value (or simply hash), also called a message digest, is a number generated from a string of text. The hash is substantially smaller than the text itself, and is generated by a formula in such a way that it is extremely unlikely that some other text will produce the same hash value.
Title: Re: MD5
Post by: Blaze on July 01, 2005, 07:50:33 pm
You can brute force values though..
Title: Re: MD5
Post by: iago on July 01, 2005, 07:53:39 pm
Yes, you can find it by brute forcing, but that might take a long time.

With MD5, however, there is a weakness.  Although you can't reverse it, it isn't impossible to find two strings that hash to the same value.  Those collisions can cause problems.
Title: Re: MD5
Post by: Sidoh on July 01, 2005, 08:01:11 pm
Yes, you can find it by brute forcing, but that might take a long time.

With MD5, however, there is a weakness.  Although you can't reverse it, it isn't impossible to find two strings that hash to the same value.  Those collisions can cause problems.

Which are usually found by brute forcing. Is it just me or would that take an increadible amount of time? :)
Title: Re: MD5
Post by: iago on July 01, 2005, 09:50:48 pm
Yes, you can find it by brute forcing, but that might take a long time.

With MD5, however, there is a weakness.  Although you can't reverse it, it isn't impossible to find two strings that hash to the same value.  Those collisions can cause problems.

Which are usually found by brute forcing. Is it just me or would that take an increadible amount of time? :)

No, because MD5 has a vulnerability that certain patterns or something can be forced or are predictable.  I don't know the details, but MD5 collisions can be forced without a lot of work.
Title: Re: MD5
Post by: Sidoh on July 02, 2005, 12:20:18 am
Yes, you can find it by brute forcing, but that might take a long time.

With MD5, however, there is a weakness.  Although you can't reverse it, it isn't impossible to find two strings that hash to the same value.  Those collisions can cause problems.

Which are usually found by brute forcing. Is it just me or would that take an increadible amount of time? :)

No, because MD5 has a vulnerability that certain patterns or something can be forced or are predictable.  I don't know the details, but MD5 collisions can be forced without a lot of work.

Then use a different hashing algorithm? :)
Title: Re: MD5
Post by: Quik on July 02, 2005, 12:44:45 am
SHA-1 is proven to have collisions as well, and that was thought to be perfect. However, it will take longer than one's willing to wait, and a very high-powered machine to do so.
Title: Re: MD5
Post by: Sidoh on July 02, 2005, 01:53:08 am
SHA-1 is proven to have collisions as well, and that was thought to be perfect. However, it will take longer than one's willing to wait, and a very high-powered machine to do so.

I'm sure all hashing algorithms that have less than infinite outcomes will have the possibility of collisions. Though the chances are low, they're sitll existant. There's an infinite number of possible messages and a finite number of outcome hashes. :)
Title: Re: MD5
Post by: iago on July 02, 2005, 04:07:51 pm
SHA-1 is proven to have collisions as well, and that was thought to be perfect. However, it will take longer than one's willing to wait, and a very high-powered machine to do so.

I'm sure all hashing algorithms that have less than infinite outcomes will have the possibility of collisions. Though the chances are low, they're sitll existant. There's an infinite number of possible messages and a finite number of outcome hashes. :)

Yes, but collisions can be induced in MD5 and SHA1 without brute-forcing.  That's the danger.
Title: Re: MD5
Post by: Blaze on July 02, 2005, 04:11:40 pm
Find me something that will hash to this value: ec0e2603172c73a8b644bb9456c1ff6e
Title: Re: MD5
Post by: iago on July 02, 2005, 04:32:51 pm
As far as I know, you need to control both of the strings to induce a collision. 
Title: Re: MD5
Post by: Quik on July 02, 2005, 05:44:00 pm
You could, however, use that string to find something that hashes to the same value and therefore affectively find out his password (theoretically). Would take a while, though.
Title: Re: MD5
Post by: iago on July 02, 2005, 05:50:23 pm
You could, however, use that string to find something that hashes to the same value and therefore affectively find out his password (theoretically). Would take a while, though.

No, because you need to be able to control both things.


And Blaze --
Quote
iago@Slayer:~/downloads/mdcrack-1.2$ /usr/sbin/mdcrack ec0e2603172c73a8b644bb945                        6c1ff6e

<<System>> MDcrack v1.2 is starting.
<<System>> Using default charset : abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHI                        JKLMNOPQRSTUVWXYZ
<<System>> Max pass size = 12 >> Entering MD5 Core 1.

Password size: 1

Password size: 2

Password size: 3

Password size: 4

Password size: 5

Password size: 6


----------------------------------------
Collision found ! => batman


Collision(s) tested : 4253876600 in 2322 second(s), 778 millisec, 126 microsec.
Average of 1831988.2 hashes/sec.
Title: Re: MD5
Post by: Warrior on July 02, 2005, 06:22:42 pm
nice
Title: Re: MD5
Post by: Quik on July 02, 2005, 07:41:00 pm
No, because you need to be able to control both things.

So just with that, you couldn't put that in an existing program, give it a dictionary, and have it hash every one of those entries to find a match? ;)
Title: Re: MD5
Post by: iago on July 02, 2005, 07:53:21 pm
You would need to look up more on the vulnerability, but I'm pretty sure that if you hash the dictionary every one of them will be unique.  The problem comes with longer documents, not short words.

But you'd have to look up more details to be sure.  I don't know exactly how it works.
Title: Re: MD5
Post by: Blaze on July 02, 2005, 08:03:25 pm
That was the magic word iago. :)
Title: Re: MD5
Post by: Quik on July 02, 2005, 08:31:39 pm
Yes, but if the hash that you're trying to match is part of your "dictionary", then you would theoretically be able to find the word. That's all I'm saying. Usually, brute force attacks don't require collisions.
Title: Re: MD5
Post by: Sidoh on July 14, 2005, 12:36:29 am
Yeah. If the password's good, though, you'd have to have a password list of more than just the dictionary.
Title: Re: MD5
Post by: Lenny on July 17, 2005, 06:15:53 pm
(http://www.localinfinities.com/salt/images/pile.jpg) is used to thwart dictionary attacks.
Title: Re: MD5
Post by: Warrior on July 17, 2005, 08:50:08 pm
Salt...smooth.