How to check md5 on windows

I need to check the MD5 of a few files on Windows. Any recommendations on either a command line or an explorer-plugin utility?

There’s a built-in PowerShell tool:

CertUtil -hashfile yourFileName MD5

The following rules are as of Windows 7 SP1, Windows Server 2012, and beyond. If they are known to work in older versions, they will be noted with: (independent of Windows version)

  • You will need to open a Command Prompt OR Powershell to run this command
    ** a quick guide to open CMD/Powershell is at the bottom of the answer

  • You can find the checksum for a file using ANY of the following hashing algorithms, not JUST MD5:

     MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512
    
  • To get the current list of supported Hash Algorithms on your specific windows machine (independent of Windows version), run

     CertUtil -hashfile -?
    
  • The full Format is below, optional parameters are in braces — just replace [HashAlgorithm] with your desired hash from above:

     CertUtil -hashfile InFile [HashAlgorithm]
    
  • You can do the command line operation for ANY files, whether they provide a certificate or not (independent of Windows version)

  • If you leave off the [HashAlgorithm], it will default to the SHA1 checksum of your chosen file

  • Its HELPFUL to note that [HashAlgorithm] is case INsensitive in both CMD and Powershell meaning you can do any of the following (for example):

     CertUtil -hashfile md5
     certutil -hashfile MD5
     CertUtil -hashfile sHa1
     certutil -hashfile SHA256
    

Quick: How to Open Command Prompt or Powershell

In case you do not know how to open the Command Prompt or Powershell and you got here by search engine, the following is a quick guide that will work for Windows XP and beyond:

  1. Press [Windows]+[R]
  2. Then, type cmd (or powershell if Windows 8+)
  3. Press [OK] or hit enter


Windows, Windows 10, Windows 7, Windows 8, Windows Server, Windows Vista, Windows XP

  • 01.02.2018
  • 76 628
  • 11
  • 28.05.2020
  • 89
  • 86
  • 3

Как проверить MD5 хеш-сумму файла в Windows

  • Содержание статьи
    • Вариант через расширение для проводника
    • Вариант через командную строку (без установки программ)
    • Вариант через командную строку (с установкой программы)
    • Комментарии к статье ( 11 шт )
    • Добавить комментарий

В некоторых ситуациях, может быть необходимо, посчитать MD5 хеш-сумму для файла, который вы скачали на свой компьютер. Например, чтобы быть уверенным в том, что вы скачали именно тот файл, который хотели и злоумышленник его не модифицировал. В этой статье мы рассмотрим 2 разных способа это сделать: через расширение для проводника, а также через командную строку.

Вариант через расширение для проводника

Для проводника Windows существует замечательная программа Hashtab, которая бесплатна для некоммерческого использования. Скачать ее можно с официального сайта. Выбираем бесплатную (Free) версию и жмем на кнопку «Download».

После установки программы, в контекстном меню проводника появится новая вкладка «Хеш-суммы файлов», выбрав которую, программа автоматически посчитает хеш-суммы для выбранного файла в зависимости от того, какие алгоритмы выбраны в ее настройках.

Вариант через командную строку (без установки программ)

В том случае, если вам не хочется устанавливать какие-либо программы, то можно обойтись встроенными средствами Windows, для этого можно воспользоваться утилитой CertUtil.

Для проверки MD5 хеша, достаточно ввести следующую команду:

certutil -hashfile C:UsersAdminDownloadsHashTab_v6.0.0.34_Setup.exe MD5

C:UsersAdminDownloadsHashTab_v6.0.0.34_Setup.exe — это путь к тому файлу, хеш-сумму которого мы хотим посчитать.

Как видно на скриншоте, хеш-сумма нашего файла 62130c3964… полностью идентична той, которую мы получили с помощью первого способа.

Вариант через командную строку (с установкой программы)

В случае, если необходимо посчитать хеш-сумму файла через командную строку, мы можем воспользоваться утилитой от Microsoft, которая годится как раз для таких случаев. Скачиваем ее с официального сайта Microsoft и устанавливаем. Для этого надо будет создать какую-либо папку на жестком диске и указать ее в процессе установки. В нашем примере, программа была установлена в папку C:Program Files (x86)FCIV. Для того, чтобы посчитать MD5 хеш-сумму файла, нам необходимо запусить командную строку и в ней набрать следующую команду:

"C:Program Files (x86)FCIVfciv.exe" -md5 C:UsersAdminDownloadsHashTab_v6.0.0.34_Setup.exe

Как видите, MD5 хеш-сумма одинакова как для всех трех способов, которые рассмотрены в данной статье.

"C:Program Files (x86)FCIVfciv.exe" — это путь к файлу fciv.exe
-md5 — указание алгоритма по которому fciv.exe будет считать хеш-сумму
C:UsersAdminDownloadsHashTab_v6.0.0.34_Setup.exe — путь к файлу, для которого мы считаем хеш-сумму.

Discover one of the most effective ways to check the integrity of signed executables downloaded from the internet. Learn how to check MD5 checksums and protect your device from harmful downloads

Infected executables are one of the most common malware file types chosen by attackers. These malicious files are often disguised as genuine software updates to trick you into downloading and running their harmful applications to wreak havoc on your device and cost a great deal to your organization. To give you a better idea, Sophos’ State of Ransomware 2021 report revealed that the average total cost of recovery from a ransomware attack went up from $761,106 in 2020 to $1.85 million in 2021.

sophos state of ransomware report 2021

Image Source: Sophos – State of Ransomware Report 2021

In such a dangerous environment, checking that a downloaded file is authentic and hasn’t been modified has become crucial to the safety and security of your organization and its data.

In our first article of this series, you learned that checksums are special strings of data that can help you to truly accomplish this comparison and validation. You then learned how to check a file checksum to verify the integrity of a file. In this last article of the series, we’ll walk you through the process of generating an MD5 checksum to check the veracity of a signed executable’ signature.

Why Checking an Exe’s MD5 Checksum Matters, Even if the File Is Signed

Executables signed with a code signing certificate are already more secure than unsigned ones. However, in cybersecurity, you can never be too cautious. This is why, in addition to checking the code signing certificate, if a checksum is displayed alongside the .exe file, you should also compare it with the one you’ll generate after the download to check if they match.

How to Check MD5 Checksum of a Signed Executable in 5 Easy Steps

Even if you can always use a third-party software to generate MD5 checksums, using Window’s command prompt will avoid you the hassle of installing yet another specific tool. This process is easy, fast, and works like a charm.

1. Download the Signed Executable

To show you how to check the MD5 of a signed downloaded executable file, we’ll download the last version of KeePass installer for Windows. KeePass is a well-known free and open source password manager.

At the bottom of the download page, there’s a link that takes you to the signature and checksum details info that you’ll need in order to verify the executable’s integrity.

keepass integrity page

Image Source: KeePass’s Integrity page

2. Open the Windows Command Prompt Tool

  • Now that you have all the information, open the Window’s command prompt by clicking the Start button.
  • Type cmd in the run bar.
  • Select the Run as Administrator

cmd run as administrator

3. Navigate to the Directory Where You Saved the .Exe

  • Use the cd (change directory) command to go to the folder where the downloaded KeePass-2.50-Setup.exe is saved.

cmd navigate right directory

Image caption: A screenshot showing how to go to the right directory in Windows Command Prompt.

4. Generate the MD5 Checksum Using the CertUtil Command

  • Type certUtil -hashfile followed by the filename (in this case, KeePass-2.50-Setup.exe) and MD5. It would look like this: certUtil -hashfile KeePass-2.50-Stepup.exe MD5.
  • Press Enter.

This will generate the following checksum:

how to generate md4 checksum

Image Source: How to generate MD5 checksum.

5. Compare the Two Checksums

Check that the returned value of the checksum you generated matches with the original MD5 checksum displayed on the download webpage. If they match, the .exe has not been modified and you can install your KeePass without issues. If they don’t, there’s something wrong and you should be careful. The file may be infected, or something may have downloaded incorrectly. Regardless of the reason, you shouldn’t trust the file.

Let’s take a quick look at the two checksums for comparison:

the generated checksum

Image Source: The generated checksum

the keepass 2 50 setup exe original checksum

Image caption: The KeePass-2.50-Setup.exe original checksum from KeePass’s official Integrity page.

How to Generate an MD5 Checksum Using Windows PowerShell

To make it even easier, if you have Windows 8.1 or Windows 10, you can also use PowerShell to generate your checksum as described below:

1. Download the Signed Executable

Let’s take the same .exe file as an example.

keepass downloads page

Image Source: KeePass Downloads Page

2. Open a PowerShell Window

  • In Windows 10, click on the search icon near the Start
  • Type powershell.
  • Select Run as Administrator.

how to open a powershell window in windows 10

Image Source: How to open a PowerShell window in Windows 10.

3. Generate the MD5 Checksum Using the Get-FileHash Command

  • Type Get-FileHash followed by the path where the downloaded .exe is located (which should start with a period) and –Algorithm MD5. The command will look like this: Get-FileHash .DownloadsKeePass-2.50-Setup.exe –Algorithm MD5.
  • Press Enter.

This will generate the checksum.

how to generate the checksum in PowerShell

Image Source: A screenshot that demonstrates how to generate the checksum in PowerShell.

4. Compare the Two Checksums

Now you’re ready to compare the generated MD5 checksum with the original one to ensure they match:

screenshot of the generated checksum

Image Source: A screenshot of the generated checksum

keepass integrity page

Image Source: KeePass’s original checksum from the Integrity page.

There we go — no sweat! You’ve learned two easy ways to generate an MD5 checksum of an executable with minimal effort.

Final Thoughts on How to Check an MD5 Checksum

I hope these three articles on checksums helped you to learn a new method to protect you and your organization from malware and installation errors. While organizations have already implemented good security practices, attackers continuously develop new ways to infiltrate genuine files with malicious codes.

Even if there’s no silver bullet in IT security, understanding how to protect your devices and data at the fullest extent and with the right tools can make a difference. Including checksums in your security best practices is a way to perform a more in-depth security check, helping you and your organization to mitigate risks and stay ahead of downloading threats.

Don’t take unnecessary risks — leverage the power of checksums to keep your organization and its data secure!

generate md5 checksums on windows

MD5 is a hashing function that is often used to check if a file transfer is complete and the file has not been corrupted during it. On each system there are different tools you can use to a file checksum, and in this article we’ll see how to do this on Windows.

On Windows 10, a MD5 checksum can be done natively with PowerShell, by using the Get-FileHash cmdlet. Open the powershell app and use the command syntax: “Get-FileHash <filename> -Algorithm MD5” to get the corresponding checksum hash.

Hide your IP address and location with a free VPN:
Try it for free now, companies are paying for you.
1500 servers in 120 countries. It’s free. Forever. No email required.

No worries, if you are new to this, I’ll explain everything in this article.

Stay tuned with the latest security news!
You’ll enjoy receiving the recent articles directly in your inbox every week!

The easiest way to generate a MD5 checksum for a file on Windows is to use PowerShell. It’s available by default and can be used without installing anything else. The command to use is “Get-FileHash”.

Even if MD5 is no longer safe to use for encryption, it’s still an excellent solution to quickly check if a file transfer has been successful or not. The idea is to get the MD5 fingerprint of the file before and after the transfer. If it’s the same value, the file transfer is OK, if not the file is corrupted.

The Get-FileHash cmdlet display the hash value of a file. By default, it uses the SHA256 algorithm, but we can add an extra parameter to use MD5.

Complete Security Course
Become a cyber security specialist.
Network Security, WiFi Security, WiFi Hackers, Firewalls, Wireshark, Secure Networking. + Password Managers.

Start now

Here is the cmdlet syntax:
Get-FileHash [-Path] [[-Algorithm] ] [Options]

Alternatives to PowerShell to Create a Checksum on Windows

Stay tuned with the latest security news!
You’ll enjoy receiving the recent articles directly in your inbox every week!

Even if PowerShell is convenient because it’s available by default, that not the easiest way to check a MD5 checksum on Windows. You have to use command lines and remember them, which is not the common way to do things on Windows 🙂

Other apps are available to do the same thing in a simpler way. I highly recommend reading this article to find the best apps I recommend if you are on Windows (there are even a few for Android users.)

How to View the MD5 File on Windows

If the downloaded file comes with a MD5 file, you can open it on Windows with any text editor. Double-click on the file and choose an app in the suggested list (Notepad, for example). Inside, you’ll find the MD5 hash and the file name.

Now, you can use Get-FileHash in Powershell or any other tool of your choice to generate the checksum corresponding to the download file (an ISO file for example), and compare it to the MD5 indicated in the MD5 file.

If the two MD5 are the same, you can consider your download is complete and the file is safe to use. If not, it’s better to download it again to avoid any problem while using this file.

Hi, my name is Patrick, I’m a web developer and network administrator. I have always been interested in security, and I created this website to share my findings with you.

In Windows you can make a checksum of a file without installing any additional software.

For this you can use the certUtil – built-in command-line tool that works both in Windows CMD and PowerShell.

In this note i will show the examples of how to make md5sum and sha256sum of a file in Windows from the command line.

Cool Tip: zip and unzip from the command line in Windows! Read more →

Checksum a file in Windows using the built-in certUtil command-line utility:

C:> certUtil -hashfile <PATH_TO_FILE> <HASH_ALGORITHM>

MD5 checksum example (md5sum):

C:> certUtil -hashfile C:file.img MD5

SHA256 checksum example (sha256sum):

C:> certUtil -hashfile C:file.img SHA256

Get only hash value:

# Windows CMD:
C:> CertUtil -hashfile C:file.img MD5 | findstr /v "hash"

# Windows PowerShell:
PS C:> $(CertUtil -hashfile C:file.img MD5)[1] -replace " ",""

Available hash algorithms:

MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512

Hash Algorithms: Note that on Windows 7, the hash algorithms are case-sensitive. Be sure to type, for example, not “md5” but “MD5”. In the subsequent versions of Windows the case doesn’t matter.

Get help:

C:> certutil -hashfile -?

Понравилась статья? Поделить с друзьями:
  • How to check jdk version on windows
  • How to check java version on windows
  • How to check hostname in windows
  • How to check graphics card windows 10
  • How to check gpu on windows 10