Back

How to validate file integrity with checksums

Your vote is:
4.52 of 29 votes

A checksum is a unique string derived from a block of digital data for the purpose of detecting any changes which may have been introduced during its transmission or storage. In short, checksums are a file integrity validation measure. If you download a file from an untrusted source, a checksum can help you validate that the file you have downloaded perfectly matches that which the file issuer intended. In practice, this helps identify any files which have been corrupted or maliciously altered in transit.

Checksums are commonly seen on websites alongside downloadable software binaries, patches, hotfixes, and updates.

Due to their low computational overhead, they are also useful in security operations for fingerprinting malware and can be added to anti-virus signature databases or stored as artifacts for future reference.

 

Windows:

HashTab is a free shell extension for Windows which integrates itself within Windows Explorer as a property page for files with a context menu to generate and compare hashes. Once installed, HashTab can be accessed by right-clicking a target file and navigating to Properties and selecting the File Hashes tab.

HashTab

HashTab will then automatically attempt to hash the target file and report the relevant values.

Alternatively, Windows comes with a pre-installed utility called CertUtil, which can be used to generate hashes.

To generate a hash for a particular file using CertUtil, open CMD (Command Prompt) and type the following:

CertUtil -hashfile [TARGET FILE LOCATION] [DESIRED HASH ALGORTHM]

For example:

CMD Checksum-1

This will generate a SHA256 hash string which can then be compared against the checksum provided by the file issuer to verify the file integrity.

CMD Checksum-2

 

Linux:

Linux comes with a number of pre-installed checksum utilities. To generate a hash for a particular file using these, open terminal and type the following:

[DESIRED HASH ALGORITHM]sum [TARGET FILE LOCATION]

For example:

Linux SHA256

This will generate a SHA256 hash string which can then be compared against the checksum provided by the file issuer to verify the file integrity.

ABOUT THE AUTHOR

Jacob Riggs

Jacob Riggs is the founder of Deadswitch. He is a Security Specialist based in the UK with over a decade of experience working to improve the cyber security of media and third sector organisations. His contributions focus on expanding encryption tools, promoting crypto-anarchist philosophy, and pioneering projects centred on leveraging cryptography to protect the privacy and political freedoms of others.

E3FE 4B44 56F5 69BE 76C1 E169 E3C7 0A52 9AEF DB6F


Subscribe to my Blog

Get my latest posts delivered straight to your inbox.