Laptop used: Macbook Air
File to download: Orcale VirtualBox
What is Hashing?
Hashing is an algorithm performed on data such as a file or message to produce a number called a hash sometimes called as a checksum. The hash is used to verify that the data isn’t modified, tampered with, or corrupted. (Integrity!)
A key point about a hash is that no matter how many times you execute the hashing algorithm against the data, the hash will always be the same if the data is the same. — CompTIA Security + SY0-501 Study Guide By Darrel Gibson.
In the website where you can download the VirtualBox, they have posted there the “checksums to verify the integrity of downloaded packages”. They have the SHA-256 and the MD5 which are both hashing algorithms.
Verifying MD5 Checksum
- Open Terminal from Mac
- Type in the command and press Enter
MD5 /path/to/the/file/VirtualBox-5.2.8–121009-OSX.dmg
3. Gives you the result
MD5 (/Users/path/to/the/file/Downloads/VirtualBox-5.2.8–121009-OSX.dmg) = e4e0cf599c17f9038615ab072342346b
4. Then compare the MD5 Hash/Checksum to the ones in the website
5. If both numbers are the same, then integrity is intact.
Verifying SHA-256 Checksum
- Open Terminal from Mac
- Type in the command and press Enter
shasum -a 256 /path/to/the/file/VirtualBox-5.2.8–121009-OSX.dmg - Gives you the result:
97764ad37c5fafdeccecfb660ce056f625e9048890af772befe0330ed2def1d8 /Users/path/to/the/file/Downloads/VirtualBox-5.2.8–121009-OSX.dmg
4. Then compare the SHA256 Hash/Checksum to the ones in the website if it’s the same or not.
5. If the same, we have verified the integrity of the file
*I researched the steps and followed them for the purpose of learning. :)