Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Security Encryption

MD5 Proven Ineffective for App Signatures 117

prostoalex writes "Marc Stevens, Arjen K. Lenstra, and Benne de Weger have released their paper 'Vulnerability of software integrity and code signing applications to chosen-prefix collisions for MD5'. It describes a reproducible attack on MD5 algorithms to fake software signatures. Researchers start off with two simplistic Windows applications — HelloWorld.exe and GoodbyeWorld.exe, and apply a known prefix attack that makes md5() signatures for both of the applications identical. Researchers point out: 'For abusing a chosen-prefix collision on a software integrity protection or a code signing scheme, the attacker should be able to manipulate the files before they are being hashed and/or signed. This may mean that the attacker needs insider access to the party operating the trusted software integrity protection or code signing process.'"
This discussion has been archived. No new comments can be posted.

MD5 Proven Ineffective for App Signatures

Comments Filter:
  • Nothing new (Score:5, Insightful)

    by grumbel ( 592662 ) <grumbel+slashdot@gmail.com> on Sunday December 02, 2007 @07:43AM (#21550943) Homepage
    Unless I am missing something this is really nothing new. The same has been demonstrated with a webpage and javascript years ago, i.e. two different webpages producing the same MD5, doing it again with an .exe doesn't really sound all that interesting, especially since the attacker still needs to manipulate both the good .exe and the evil .exe and when he has access to the good .exe you are toast anyway.

    This of course doesn't mean we should continue to use MD5, but the attack is really of rather theoretical nature.
  • Well, duh! (Score:5, Insightful)

    by YA_Python_dev ( 885173 ) on Sunday December 02, 2007 @07:59AM (#21550993) Journal

    The problem has nothing to do with salt, and can be certainly temporarily "fixed" switching to SHA-1 or, even better, SHA-2. But the real root of the problem here is that, for the attack to work, someone signed as trusted a binary file that contained malicious code in the first place, even if in a disable form.

    Let me explain that. First, this is very old news: we know since 2004 [wikipedia.org] that collision can be found in MD5 hashes (two different files with the same md5sum), and there now are tools that can generate collisions in seconds. All you need is a common prefix and suffix for both files and two block of 128 bytes that are generated automatically and you can insert between the prefix and the suffix to create the two files.

    Applying this to pretty much any file type that can contain binary data (even XML 1.1!) is trivial. For an executable file you can simply insert code in your prefix/suffix that looks at the pseudo-random 128 bytes and does radically different things depending on it. This as already been demonstrated for HTML+JS and even for postscript files.

    Bottom line: if you have an executable file from an untrusted source it may contain bad things (the attack described requires that both the original signed file and the file that you are actually executing are generated by the same hostile source).

  • by Niten ( 201835 ) on Sunday December 02, 2007 @08:05AM (#21551015)

    MD5 collision attacks aren't really new, although this is a powerful example. An equally meaningful example of a collision attack on the algorithm, in the form of two different PostScript files with the same MD5 hash [cits.rub.de], was provided at least two years ago (IIRC).

    The key to understanding the limits of this demonstration's significance is to realize that a collision attack is quite different from a prefix attack. These researchers were able to create a pair of executables having the same hash value by specially constructing them as such; crafting a new executable to match a specific hash value corresponding to some other party's executable is vastly more difficult to achieve.

    So while this demonstrates MD5 to be useless for uses where the purported signatory is to be included in our threat analysis -- as has already been demonstrated to us by other researchers -- the algorithm is still relatively safe if our only goal is to ensure that a given executable almost certainly came from a specific party (rather than showing that it is a specific executable from said party). In other words, one could conceivably use MD5 to verify that the Ubuntu packages on that FTP server were in fact produced by Canonical. So no, demonstration does not mark MD5 as completely useless for code signing; the most common applications of code signing are entirely unconcerned with collisions in the hash function.

    In conclusion: the title is terribly misleading, or possibly just misinformed. Boo! Hiss!

  • Birthday Attack (Score:5, Insightful)

    by tangent3 ( 449222 ) on Sunday December 02, 2007 @08:15AM (#21551043)
    This is an example of a Birthday Attack [wikipedia.org]. 1. Attacker generates Good.exe and Evil.exe which hashes to the same MD5 2. Attacker passes Good.exe to the key owner to sign 3. Key owner signs and release Good.exe and Good.exe.MD5 4. Attacker releases Evil.exe as Good.exe This of course, requires some serious social engineering to work. MD5 is outdated, yes, but at the moment it is still resilient against a normal attack where an attacker has to generate an Evil.exe to hash to the same MD5 as an already-available Good.exe
  • Use GnuPG instead (Score:5, Insightful)

    by gweihir ( 88907 ) on Sunday December 02, 2007 @08:39AM (#21551125)
    As many projects have done for years. md5 sums as crypto-protection are more or less a historic way to do it.
  • by Nezer ( 92629 ) on Sunday December 02, 2007 @08:49AM (#21551177) Homepage

    This may mean that the attacker needs insider access to the party operating the trusted software integrity protection or code signing process.
    Isn't this a bit like saying that door locks are insecure although you may need access to a party trusted with the keys in order to exploit? Aren't these "trusted parties" *always* a potential weak-link in the security chain?
  • by Matthieu Araman ( 823 ) on Sunday December 02, 2007 @09:05AM (#21551217)
    Real life scenario :

    developper A produce software X(for example openssh), calculate hash of program X and sign the hash with his PGP key.
    He then put all these files on mirrors servers on Internet (but not his private PGP key !)

    One mirror is hijacked by B.
    B wan't to replace X by X' with the same hash than X

    This article doesn't provide anything as it says MD5(X+a)=MD5(Y+a), which imply you have to change A in the first place which can't be done easily (and if you can change the original program, then what's the point ?)
  • Re:Well, duh! (Score:2, Insightful)

    by cheater512 ( 783349 ) <nick@nickstallman.net> on Sunday December 02, 2007 @09:47AM (#21551335) Homepage
    Well every hash function will eventually have flaws like this.
    Its inevitable.
  • Re:Well, duh! (Score:2, Insightful)

    by hotrodent ( 1017236 ) on Sunday December 02, 2007 @10:09AM (#21551413)
    Something I've never understood about this problem: Why is the following not an easy "fix"?


    1) Generate an MD5 hash for a file.
    2) Generate an SHA-2 hash.
    3) .. more as needed ...
    4) Concatenate the results for a "super hash"
    5) Profit?

    Surely to manipulate 2 (or more) schemes to ensure the super hash is the same on a tampered file would be _many_ orders of magnitude harder?
    Trying to make the SHA-2 match would destroy all the previous work done to make the MD5 match, then fixing the MD5 would change the SHA-2 again.
    IANAC (cryptographer) so excuse my ignorance on this if I'm missing something.

  • by Henry V .009 ( 518000 ) on Sunday December 02, 2007 @12:18PM (#21552009) Journal

    A more interesting point was made to me just the other day, which is that there's always enough ambient entropy in any real world system to deviate between trusted and untrusted behavior. In other words, for a turing complete app, you *can't* create a meaningful hash, because you aren't capturing all bits that will drive the execution flow. So, getting code signed really doesn't assert anything other than a business relationship. App signatures don't actually work, for any arbitrarily good hash.
    That is simply wrong. For any "arbitrarily good" hash there exist collisions out there between bad_app and good_app. However, if finding bad_app or bad_app2, etc., is computationally impracticable (which is the definition of a good hash), then the hash is quite useful.

    Currently md5 is fairly broken, in that a person can specially prepare good_app and bad_app. However, it is not yet completely broken (like CRC, if it were ever used as a secure hash), in that it is not yet possible for someone to take an arbitrary md5-signed file (like the recently released ubuntu iso, to give an example) and generate a collision. The birthday paradox makes the former much easier than the later.
  • by gweihir ( 88907 ) on Sunday December 02, 2007 @03:02PM (#21553271)
    I agree that today basically the only use of md5's is integrity checks against transmission and storage errors. I sometimes use them on backups.

    You are quite right, that md5 does not provide and connection to the signer. With a PGP/GPG signature, once I have the correct public key, I can verify all and every signature made with it. And if I do not have the correct key, the first genuine signature will result in an error. Howeber I guess most people do not bother. Even if it is easy. For a kernel download, e.g., it adds about 5 seconds.

Happiness is twin floppies.

Working...