Slashdot Log In
MD5 To Be Considered Harmful Someday
Posted by
michael
on Tue Dec 07, 2004 04:06 PM
from the house-built-on-sand dept.
from the house-built-on-sand dept.
Effugas writes "I've completed an applied security analysis (pdf) of MD5 given Xiaoyun Wang et al's collision attack (covered here and here). From an applied perspective, the attack itself is pretty limited -- essentially, we can create 'doppelganger' blocks (my term) anywhere inside a file that may be swapped out, one for another, without altering the final MD5 hash. This lets us create any number of binary-inequal files with the same md5sum. But MD5 uses an appendable cascade construction -- in other words, if you happen to find yourself with two files that MD5 to the same hash, an arbitrary payload can be applied to both files and they'll still have the same hash. Wang released the two files needed (but not the collision finder itself). A tool, Stripwire, demonstrates the use of colliding datasets to create two executable packages with wildly different behavior but the same MD5 hash. The faults discovered are problematic but not yet fatal; developers (particularly of P2P software) who claim they'd like advance notice that their systems will fail should take note."
This discussion has been archived.
No new comments can be posted.
MD5 To Be Considered Harmful Someday
|
Log In/Create an Account
| Top
| 401 comments
| Search Discussion
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
damn (Score:2, Interesting)
Re:damn (Score:4, Insightful)
(http://www.networkboy.net/)
-nB
Re:damn (Score:5, Insightful)
Another condition is obviously that the message should not be reconstructable from the hash.
Almost forgot (Score:4, Interesting)
(http://slashdot.org/ | Last Journal: Saturday November 03, @04:58AM)
Where time isn't critical (eg: creating and validating checksums for files), I'd say use both. The overhead isn't great, and you'd get much more security.
Where time is critical AND you don't have to be concerned with computers not under your control, use Whirlpool. Rijndael is fast, SHA-1 is slow. Whirlpool also offers a longer hash string than SHA-1.
In any other situation, use SHA-1. Whirlpool might turn out to be the greatest algorithm out there, but that doesn't help if you're trying to talk to a remote computer that doesn't support it.
Re:damn (Score:5, Interesting)
(http://slashdot.org/)
Yes, but a good hash makes it *extremely* difficult to find them. MD5 is looking pretty mediocre right now.
Two files with the same md5 hash? (Score:5, Funny)
Re:Two files with the same md5 hash? (Score:5, Informative)
(http://www.touset.org/)
MP5 harmful? No way! (Score:5, Funny)
(http://finnbiff.multiply.com/ | Last Journal: Saturday May 12 2007, @10:04AM)
Exploit? (Score:5, Interesting)
(http://fedoraproject.org/wiki/JonCiesla | Last Journal: Thursday December 05 2002, @02:46PM)
Re:Exploit? (Score:4, Insightful)
(Last Journal: Tuesday September 07 2004, @10:01PM)
Re: Exploit? (Score:4, Informative)
This would worry me, except that BT uses SHA1, not MD5, so this is irrelevant. MD5 has seemed suspect for years, & Bram's the sort to pay attention to that sort of thing.
I checked; Edonkey is based on MD4. Gnutella variants might use MD5.
Re:Exploit? (Score:4, Informative)
file1: xxxxccccccc....
file2: yyyyccccccc....
%file1 = %file2
Which is the example given in the article.
However, Wang said she could get to a collision from any intermediate hash code within the hour (according to the article). That would mean:
file1: ccccxxxxccccccccc......
file2: ccccyyyyccccccccc......
%file1 = %file2
Where xxxx and yyyy are (pre?)calculated and cccc.... is the payload.
If _I_ am not mistaken.
In english (Score:4, Funny)
Re:In english (Score:5, Informative)
Short version: A common technology for verifying that a file you've downloaded is legitimate and untampered-with, known as MD5, isn't as secure as people thought.
Slightly longer version: MD5 is a way of generating a checksum -- a single, comparable value -- from a file. Ideally it is supposed to give you different numbers for different files, so if a web site advertises the checksum a file should have, you can compare that with one generated from the file you actually got to see whether the file you've downloaded has been modified, potentially maliciously.
The research shows that it is possible for someone to construct a drop-in replacement for the file you thought you had that generates the same MD5 checksum as the original, so anyone attempting to validate the file this way would think they had the real thing. If it turns out that you can construct a damaging replacement for a common file -- perhaps an installer for a popular application like Firefox or OpenOffice that's usually downloaded from a public server -- then this could open a loophole for viruses, worms, etc. that would slip through the security net often used by cautious people when downloading such programs.
What does this mean (Score:2)
Good analysis (Score:5, Funny)
I am glad somebody does.
Re:Good analysis (Score:4, Funny)
Homer: Say it in English, Doc.
Hibbert: You're going to need open heart surgery.
Homer: Spare me your medical mumbo jumbo.
Hibbert: We're going to cut you open and tinker with your ticker.
Homer: Could you dumb it down a shade?
http://www.tvtome.com/tvtome/servlet/GuidePageSer
Let's face it (Score:3, Insightful)
Cryptographic stacking potentially harmful (Score:4, Insightful)
(http://www.iccs.inf.ed.ac.uk/~s0239229/ | Last Journal: Wednesday May 23 2007, @03:28AM)
Maybe, maybe not. The new technique would certainly be more difficult to analyse mathematically, but just stacking complicated but flawed methods does not necessarily result in a more secure method: typically, the security of the weakest link determines the security of the whole system.
What you say reminds me of Don Knuth's experience when he wrote his first innocent 'super' pseudo random number generator (reported in his Art of Computer Programming, Volume 2, page 4: "Algorithm K" ;-): he composed all sorts of complicated operations, but had to learn the resulting number sequence was far from more (pseudo-)random, in fact much worse than the the standard 1-line modulo function.
Another case of (false sense of) security through obscurity?
--
Try Nuggets [mynuggets.net], our SMS search engine which uses question answering technology; now available across the UK.
md5 vs sha1 vs ? (Score:5, Informative)
(http://guerillartivism.net/ | Last Journal: Monday July 11 2005, @05:48PM)
here is a very good link about the algo...
This is almost appropriate... (Score:4, Funny)
And your double-clicking icon puts your window in the trash,
And your data is corrupted 'cause the index doesn't hash,
Then your situation's hopeless and your system's gonna crash!
Correct me if I'm wrong, but... (Score:5, Insightful)
(http://www.youtube.com/watch?v=bA-DReZYftg | Last Journal: Sunday November 12 2006, @01:05AM)
He can create a file that MD5sum's to the same result as a legitimate file, but does not have full control over the content or size of the result (making this a mostly useless avenue of exploitation except for people who want to spread trash on P2P networks -- I.E. it shouldn't particularly bother anyone except people who already don't care about security).
Or he can create two files that MD5sum to the same result. But he has to have control over both files, which offers effectively no advantage to someone who is trying to spread malware or tamper with existing archives that have been MD5summed.
Consequently, while this is of academic interest I don't see what the big deal is; any time you reduce a large file to a fingerprint you will inevitably run into problems like this because it is impossible to represent one-to-one every individual possible combination of a large set of data in smaller sets ("fingerprints"). You can reduce the risk by increasing the set domain with a larger variadic function but it is impossible to escape this constraint without using fingerprints as large as the data itself.
Re:Correct me if I'm wrong, but... (Score:4, Informative)
(http://blog.case.edu/moof/)
Re:Correct me if I'm wrong, but... (Score:5, Insightful)
(http://www.cs.cmu.edu/~leak)
Secondly, this is quite a signifigant break. Once a hash function has had an attack like this discovered, it often becomes completely useless not long down the road. I work in cryptography, and the people I know have written off MD5. Heck, the people I know are also quite worried about SHA-1, and the current best attack against that one isn't nearly as strong.
The upshot of this is that this hash function should NOT be considered secure any more. For now, if you are not protecting anything of high value, you're probably fine. Tomorrow? Possbily. But soon, you're not going to be protected at all, and so you should start worrying about that now, instead of when you're already in trouble.
Lea
You're wrong. (Score:5, Informative)
He can create a file that MD5sum's to the same result as a legitimate file, but does not have full control over the content or size of the result (making this a mostly useless avenue of exploitation except for people who want to spread trash on P2P networks -- I.E. it shouldn't particularly bother anyone except people who already don't care about security).
Suppose you're storing passwords as encrypted hashes, so that intercepting the hashes doesn't tell you what the password is. But if you can generate a password to match that MD5...
You know that GPG keys are identified and signed by their MD5 hashes? Suppose that I can generate a GPG key that would be identified as yours, and distributed it.
Or he can create two files that MD5sum to the same result. But he has to have control over both files, which offers effectively no advantage to someone who is trying to spread malware or tamper with existing archives that have been MD5summed.
There's a coin-flipping protocol that goes as follows. Suppose that Alice and Bob want to flip a coin (over the Internet), but they don't trust each other.
Now, suppose that Alice generated multiple files in step 1. When Bob makes his guess, she tries to pick a file that will make her win. If she generated only two files, completely randomly, this would let Alice win 75% of the time.
These are just the first ideas I thought of. If I were looking for other problems, I'd think about undeniable signatures [rsasecurity.com], keysigning (which as GPG and X.509 SSL are heavily based on) and other specialized signature systems. In particular, I expect that the first type of crack could cause issues with SSH keys, both user keys (used for authentication) and host keys (to prevent man-in-the-middle attacks).
Digital signatures are used for much more than just testing for file tampering.
I have a novel solution (Score:1)
(http://www.quux.info/)
Buy it instead.
I'm kidding. I download Linux distro's via bittorrent all the time and willfully ignore the MD5 sum, and now I come to find that it's compromisable. OH SNAP!
I can envision something being added on to bittorrent to prevent bad blocks being passed around via ... magic. Okay. I can't really envision it, but I'm sure it can be done.
On to the next topic I'm not qualified to comment on...
Not just MD5 (Score:3, Interesting)
SHA-256 is a good replacement. SHA-1 should be fine but if you are going through the trouble of an upgrade, why not make it sufficiently future proof?
If I Had A Million Terabytes... (Score:5, Funny)
Two files with the same MD5 hash at once. Aaw yeah.
FYI (Score:1)
The exploit has used the properties of the MD5 algorithm to create two executable files with the same MD5 sum.
The "Detailed Summary" (Score:5, Informative)
(http://www.doxpara.com/)
I've been doing some analysis on MD5 collision announced by Wang et al. Short version: Yes, Virginia, there is no such thing as a safe hash collision -- at least in a function that's specified to be cryptographically secure. The full details may be acquired at the following link:
http://www.doxpara.com/md5_someday.pdf
A tool, Stripwire, has been assembled to demonstrate some of the attacks described in the paper. It may be acquired at the following address:
http://www.doxpara.com/stripwire-1.1.tar.gz
Incidentally, the expectations management is by no means accidental -- the paper's titled "MD5 To Be Considered Harmful Someday" for a reason. Some people have said there's no applied implications to Joux and Wang's research. They're wrong; arbitrary payloads can be successfully integrated into a hash collision. But the attacks are not wildly practical, and in most cases exposure remains thankfully limited, for now. But the risks are real enough that responsible engineers should take note: This is not merely an academic threat, systems designed with MD5 now need to take far more care than they would if they were employing an unbroken hashing algorithm, and the problems are only going to get worse.
Some highlights from the paper:
* The attack itself is pretty limited -- essentially, we can create "doppelganger" blocks (my term) anywhere inside a file that may be swapped out, one for another, without altering the final MD5 hash. This lets us create any number of binary-inequal files with the same md5sum.
* MD5 uses an appendable cascade construction -- in other words, if you happen to find yourself with two files that MD5 to the same hash, an arbitrary payload can be applied to both files and they'll still have the same hash. This leads to...
* Attacks are possible using only the proof of concept test vectors released by Wang -- the actual attack is not necessary.
* Stripwire emits two binary packages. They both contain an arbitrary payload, but the payload is encrypted with AES. Only one of the packages ("Fire") is decryptable and thus dangerous; the other ("Ice") shields its data behind AES. Both files share the same MD5 hash.
* Digital Signature systems are vulnerable, as they almost always sign a hashed representation of data rather than the data itself.
* This is an excellent vector for malicious developers to get unsafe code past a group of auditors, perhaps to acquire a required third party signature. Alternatively, build tools themselves could be compromised to embed safe versions of dangerous payloads in each build. At some later point, the embedded payload could be safely "activated", without the MD5 changing. This has implications for Tripwire, DRM, and several package management architectures.
* HMAC's invulnerability has been slightly overstated. It's definitely possible, given the key, to create two datasets with the same HMAC. Attacker possession of the key violates MAC presumptions, so the impact of this is particularly questionable.
* Very interesting possibilities open up once the full attack is made available -- among other things, we can create self-decrypting executables (fire.exe and ice.exe) that exhibit differential behavior based on their internal colliding payloads. They'll still have the same MD5 hash.
* Several doppelgangers may (relatively quickly, as per Joux) be computed within a single multicollision-friendly block. As such, the particular selection of doppelganger sets within a file can itself be made to represent data. It's relatively straightforward to embed a 128 bit signature inside an arbitrary file, in such a way that no matter the value of the signature, a constant MD5 hash is maintained. This is curiously steganographic.
* Many popular P2P networks (and innumerable distributed content databases) use MD5 hashes as both a reliable search handle and a mechanism to ensure file integrity. This makes them blind to any sign
Cash Money? (Score:2)
(http://grendel.dyndns.org/)
--grendel drago
I studied different hashes.. (Score:1, Funny)
______ with be harmful/obsolete in the future.. (Score:3, Insightful)
For the most part, big deal, all of current security procedures will be harmful ie compromised in the future...
Solution: Use more than one hash algorithm (Score:3, Informative)
(http://itheresies.blogspot.com/ | Last Journal: Wednesday April 28 2004, @12:06AM)
Using MD5 with SHA1, or even the older MD2 or MD4 will reduce the probability of creating a compatable binary with the same checksum to virtually zero.
If only one checksum is required then just XOR the resulting checksums from each algorithm.
birthday attack (Score:2)
(heh, Wang)
Switching to SHA1 (Score:2)
md5_hex to sha1_hex
It actually easy to see this (Score:2, Interesting)
sort 15,000 jpg image files to remove duplicates.
Since the names varied, and it is not uncommon
to have many images with the same length, it
seemed like a good idea to use md5 hashes.
So I coded it up in python to do the md5 hash,
and then stuffed the file name into a table
keyed by the md5 hash. Big suprise when multiple
different files landed in the same hash.
Some property of jpgs probably reduces the
randomness of the files and increases the
probability of hash collisions.
Time is of the essence (Score:1)
(http://www.s5h.net/)
Inherent to any hashing mechanism (Score:1)
If you have a 4-byte hash value of a 1000-byte character string, you have 4+ billion possible hash values. But the number of possible 1000-byte strings? What's 256^1000? So, on average, there would be 256^4 / 256^1000 source values that would generate each individual hash value. The only way to avoid this is to have a hash value that is as long as the source value, which eliminates much of the benefits of a hash.
I like the idea someone else posted about using multiple algorithms because it would dramatically reduce the number of possible values that would generate the same hash value using 2 different methods.
hash, equals (Score:2)
(http://freality.org/~pablo/)
Thing search(Thing thingToFind) {
thingList = hashSearch(hash(thingToFind));
for each thing in thingList
if (thing == myThing)
return thing;
return null;
}
MD5 To Be Considered Harmful Someday (Score:2)
(http://booktextmark.mozdev.org/)
Maybe start consider adopting magnet links (Score:2)
(Last Journal: Monday February 13 2006, @07:11PM)
I personally think any clients that don't support magnet links should really start consider adopting those -- DC++, most Gnutella clients, and Shareaza already do.
A magnet link can look like something like this:
magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZ
what about stuff that's harmful NOW? (Score:2)
Yeah, yeah, Obligatory Microsoft Slam. But I don't see any great stampede to isolate and neutralize the threat that this Typhoid Mary of OS's presents to communication stability. Why are we preparing for a threat that barely exists, when we refuse to deal with the present, much greater threat?
Is a two-pass just as vulnerable? (Score:3, Interesting)
(http://slashdot.org/~davidwr/journal/ | Last Journal: Friday November 09, @09:19PM)
Is doing a 2nd pass helpful?
In other words, if
ABCfireDEF
and
ABCiceeDEF
hash the same, does
ABCfireDEFABCfireDEF
necessarily, or even frequently, hash to
ABCiceeABCiceeDEF?
Even if it were to provide protection, in practical terms,
1) other hashing althorithms are likely faster than "MD5 times two"
2) there may be some - hopefully a lot fewer - places in a long file where where
ABCfireDEFABCfireDEF
can be replaced with
ABCiceeDEFABCmeltDEF
I'm beginning to like the "pick two algorithms and call me in the morning" approach.
My humble proposal for a solution. (Score:1)
Dijkstra Considered Dead (Score:2)
You are missing the point. (Score:1)
I could see game and movie companies releasing bogus versions of their pirated apps to break the releases. after all, you cant de-compress corrupt zips, rars and etc. the musics would have cracks and noises because of the bogus versions. P2P as it is now would be ruined
Jesus, I hope I'm wrong... I would have to acctualy buy MS crap.
Re:You are missing the point. (Score:5, Insightful)
Your statement is ironic in the extreme. The big risk here is NOT P2P apps. Here's the real risk.
Using one of these collision generators, I can create two x.509 certificate requests which have the same MD5 hash. One request says, "I am John Smith, kshdfkhs8i76y238888888" and the other request says, "I am Microsoft Corp., oiushir87dsfhgkjshdfg"
Now, I get Verisign to issue me a certificate for the first request. Since the hash is the same, I can rewrite the certificate to say that I am Microsoft Corp, and nobody will ever be able to tell the difference. Now, I am able to sign code as if I were Microsoft, and Dominate The Earth.
Time to move on (Score:2)
(http://venganza.org/)
Everything is considered harmful eventually (Score:1)
(Last Journal: Wednesday July 06 2005, @10:01PM)
what kind of language is this? (Score:1)
The biggest problem is still human falibility (Score:3, Insightful)
THAT is the biggest problem with MD5 for most users.
what's next.... (Score:1)
(Last Journal: Sunday July 11 2004, @12:27AM)
Asymetric Key Encryption (Score:1)
(http://www.battlebazaar.net/)
Asymetric key encryption is. You have a trusted authority issue a key, and sign it. You can verify the key file hasn't been tampered with, and they can revoke the certificate. It's harder to fake, even if they can spoof a MD5, because you can connect out to the certificate authority and ask if the certificate is valid, and they can revoke them if there's problem.
If you're downloading a package, presumably you're wanting to know that it's the right package, and that it's from whomever it says its from. An MD5 hash does not get you that capability, asymetric encryption does.
Only someone who knows your distribution's private key can produce your distribution's packages. The public key is verified by a neutral 3rd party that can revoke accidents or hackers once they're discovered.
So you know both that the distribution wasn't tampered with (because it decrypts) and that the distribution is from who they say it is from (because it decrypts), and you have a neutral 3rd party vouching for the facts who has a vested interest in retaining business by not letting people fake other people's signatures.
Double Hashes? (Score:1)
(Last Journal: Tuesday November 02 2004, @06:32PM)
Would it therefore be safe to calculate two hashes (MD5 and SHA-1) for the file, distribute the file and the two (or three, or four) separate hashes, and use the incompatible nature of the hashes as an extra "guarantee" of data integrity?
A: MD5 of an empty string (Score:2)
(http://bitmason.com/)
Q: What is d41d8cd98f00b204e9800998ecf8427e ?
MD6 (Score:3, Funny)
(Last Journal: Sunday August 20 2006, @09:16PM)
What's the big deal? (Score:1)
(Last Journal: Sunday July 30 2006, @11:04PM)
All that means is that we will move to another digest algorithm when this one will become too easy to tamper with. A lot of people already provide sha-1 or a signiture of the files they provide. And that will be our solution until it fails. Just like cryptography.
Strong -> stong -> weaker -> weak -> time to move on
What about SHA-1? (Score:2)
(http://russp.org/)
Two hashes (Score:1)
old news (Score:1)
Someday? maybe not in your life time. (Score:1)
28bc8c78881b2f89bbeab4f9bb8fbeda is the md5 of "clue", I can bet my hash farm and a hash laced brownie that you'll never find anything other than "clue" that hashes to the same md5, at least not "someday" in your life time.
Re:Already Happening (Score:4, Informative)
(http://www.uiuc.edu/~menscher/ | Last Journal: Wednesday February 25 2004, @10:31PM)
I'll give you $50 if you can back that claim up. I want to see two video files. They must start out the same, but have a difference about half-way through. And they have to have the same md5 sum. Just post where I can download the two files, and your paypal address.
The way I see it, you've got a 1/2^64 chance of being right. So I'm risking $50/184467440737095516, which isn't a whole lot.
Re:Already Happening (Score:1)
Re:MD5 is obviously less secure (Score:3, Informative)
Sure, there are an infinite number of possible passwords, but they're all impossibly huge. I can come up with a password which is one trillion characters long and which hashes to the right result, but that's not practical.
Re:Already Happening (Score:2)
Re:Already Happening (Score:1)
Re:MD5 is obviously less secure (Score:2)
(Last Journal: Friday September 27 2002, @02:14PM)
Re:Already Happening (Score:1)
(http://www.hoeg.com/)