• Log In
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • HomePage
  • About
  • Structure
  • Schedule
    • First Half of the Semester
      • Week 1: Overview of Course
      • Week 2: TCP/IP and Network Architecture
      • Week 3: Reconnaissance
      • Week 4: Vulnerability scanning
      • Week 5: System and User enumeration
      • Week 6: Sniffers
      • Week 7: NetCat, Hellcat
    • Second Half of the Semester
      • Week 8: Social Engineering, Encoding, and Encryption
      • Week 9: Malware
      • Week 10: Web application hacking, Intercepting Proxies, and URL Editing
      • Week 11: SQL injection
      • Week 12: Web Services
      • Week 13: Evasion Techniques
      • Week 14: Review of all topics and wrap up discussion
  • Assignments
    • Analysis Reports
    • Quizzes & Tests
  • Webex
  • Harvard Coursepack
  • Gradebook

ITACS 5211: Introduction to Ethical Hacking

Wade Mackay

Create Your Own MD5 Collision

October 24, 2016 by Loi Van Tran 3 Comments

We’ve talked briefly at MD5 collision in the last class, and some people has some questions about it.  The two links provided below; the first is explaining what MD5 collision is and the second will let you create your own collision.

Basically, collision occurs when two completely different files have the same digest.  When you use a hash algorithm: 1st you take the original message (plaintext), add some padding, run it through the hash algorithm (in this case MD5), and then it returns a message digest (ciphertext).  Each file, if not exactly the same, should have a different digest.  Nat McHugh has found a way to add prefixes to the plaintext (files: jpg, txt, etc) that would make the hash algorithm return the same hash even if the files were different.

He has created a Amazon Web Service (AWS) image that would allow you to download and run the script for about 7 cents an hour.  I’ve tried it and it took about a day to create a collision.  So I was able to create a MD5 collision for less than 2 bucks.  If you are interested you can try it out:

http://natmchugh.blogspot.com/2015/09/md5-collisions-in-ssh-keys.html

http://natmchugh.blogspot.com/2015/02/create-your-own-md5-collisions.html

 

 

Filed Under: Uncategorized Tagged With:

Reader Interactions

Comments

  1. Ahmed A. Alkaysi says

    October 25, 2016 at 4:20 pm

    This is really cool Loi. Although hash collisions are supposed to be statistically unlikely, people are obviously starting to create them like you have. Maybe other hashing methods that are more than the 128 bit that MD5 outputs need to start being used. Will definitely look into testing this experiment out.

    Log in to Reply
  2. Vaibhav Shukla says

    October 25, 2016 at 11:26 pm

    The article is great and I feel the hash collision can also be created if we convert the hex code into the binary code.
    The main vulnerability exploited in MD5 collision is the length extension because of this length-extension behavior, we can append any suffix to both messages and know that the longer messages will also collide.

    Log in to Reply
  3. Jason A Lindsley says

    October 26, 2016 at 12:06 am

    Interesting article and a good reason to use SHA-2 (e.g. 512 bit) for hash functions. MD5 could result in the use of fake SSL certificates and files sent with MD5 hash signatures could have their integrity compromised.

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Weekly Discussions

  • Uncategorized (133)
  • Week 01: Overview (1)
  • Week 02: TCP/IP and Network Architecture (8)
  • Week 03: Reconnaisance (25)
  • Week 04: Vulnerability Scanning (19)
  • Week 05: System and User Enumeration (15)
  • Week 06: Sniffers (9)
  • Week 07: NetCat and HellCat (11)
  • Week 08: Social Engineering, Encoding and Encryption (12)
  • Week 09: Malware (14)
  • Week 10: Web Application Hacking (12)
  • Week 11: SQL Injection (11)
  • Week 12: Web Services (10)
  • Week 13: Evasion Techniques (7)
  • Week 14: Review of all topics (5)

Copyright © 2025 · Magazine Pro Theme on Genesis Framework · WordPress · Log in