Home > Windows Security Tips > Vulnerability/Authentication tips for Windows > Verifying file integrity with MD5 checksums
Windows Security Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

VULNERABILITY/AUTHENTICATION TIPS FOR WINDOWS

Verifying file integrity with MD5 checksums


Serdar Yegulalp
10.12.2005
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


When you download a file or make one available for others, the integrity of the file is just as important as anything in it -- both to guard against tampering and to ensure that files aren't corrupted during downloads or from being transported on bad media. Such things are rare, but they do happen, and they contribute in their own small way to what might be the only available copy of something becoming unusable. If you've ever downloaded something on a high-speed connection, burned it to CD for later use and then found out the burned copy was corrupt, you'll have experienced this firsthand.

What can be done to defend against this sort of problem? Many archives or self-extraction mechanisms have their own file verification systems, but there's something else you can do above relying on such things alone: Create an MD5 hash for the file.

More information
  • ATE: More uses for MD5
  • News: Verify patch integrity
  • The MD5 algorithm, created by Ron Rivest, is a way to "sign" a file to verify its contents mathematically. The hash consists of a 128-bit (16-byte) checksum -- also known as a "digest" -- that is generated cryptographically by using the contents of the file. No two files ever generate the same hash, and it's virtually impossible to craft a file that will have a given checksum ahead of time. This makes it enormously useful for verifying a patch or file archive: If you publish the file along with an MD5 checksum, then the end user or administrator can use a third-party tool to ensure that the file matches the hash.

    One very simple implementation of an MD5 hash tool is DiamondCS MD5 from Diamond Computer Systems Pty. Ltd. It's a freeware app that runs in Windows and can generate an MD5 hash for any given file or even a piece of text. The resulting hash can be copied out (it's plain text) and provided either in a text file with the file itself or in a separate accompanying note. If either the hash or the file is damaged, they will not match, and you'll know something went wrong.

    MD5 hashes are also used in many other contexts. Cryptography packages for e-mail allow you to sign an e-mail with both an MD5 hash and a cryptographic certificate. Doing so verifies that the contents did indeed come from the person in question. Likewise, a binary attachment in an e-mail can accompany an MD5 hash in the body of the e-mail.

    About the author: Serdar Yegulalp is editor of the Windows Power Users Newsletter. Check it out for the latest advice and musings on the world of Windows network administrators -- and please share your thoughts as well!


    Rate this Tip
    To rate tips, you must be a member of SearchWindowsSecurity.com.
    Register now to start rating these tips. Log in if you are already a member.


    Submit a Tip




    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


    RELATED CONTENT
    Post-Patch Problems
    Microsoft releases April trove of patches
    Have my Windows patches actually been installed?
    Microsoft patch management policy
    Microsoft patch maintenance and post-patch security
    What's hot in Microsoft security: Critical patches
    Patch Tuesday: An after-the-fact checklist
    Attacks against MS06-040 on the rise
    Handling patch emergencies
    August patch management woes strike again
    MS06-040 review: 'Urgently critical' patch release
    Post-Patch Problems Research

    Auditing
    Critical systems to focus on during security testing
    Troubleshooting security settings
    Security tips for dealing with a rogue user
    Security tips for dealing with a rogue user, Part 2
    NTFS permissions
    Effective Group Policy
    DumpEvt, a free tool for exporting Windows event logs
    Enabling auditing on a File&Print server
    Audit event log to increase system security
    Testing Group Policy security
    Auditing Research

    Patches
    Microsoft will release three critical patches in May
    October patches fix four threats
    Internet Explorer in Patch Tuesday limelight for August
    Windows XP SP2 installation fouling up system startup?
    Microsoft's August update patches 23 flaws
    Patch management tools: Different types, different approaches
    Should Microsoft change its patching process?
    Microsoft security bulletins for May
    Automatically install approved patches without prompting
    Pair of Microsoft patches fixes seven flaws

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary

    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

    HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsWebcastsWhite PapersIT DownloadsBlogs
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




    All Rights Reserved, Copyright 2004 - 2008, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts