In the previous post we identify the good in hashing. In this post we will focus on the bad.
The two files we are using are "hashing_lab.txt" and "hashing_lab.txt.copy".
In the previous post we also identified that the 2 files are an exact match, so we can confirm the integrity of these files. I will show it here again for clarity.
Simply change any one character (byte) and the hashes of this file differs completely.
Let's add the letter "z" to the file ""hashing_lab.txt.copy"" to see how this one character changes the hashes.
root@securitynik:~# echo "z" >> hashing_lab.txt.copy
Verifying the new hashes
root@securitynik:~# md5sum hashing_lab.txt.copy
As we can see the hash above is now different from that of the original file.
Let's now put these 2 files together to see the results up close and personal.
From the above we see that the two files differ. Now while this may be good to confirm that two files are not the same, it in no way tells us if they are similar. Similarity becomes important when dealing with Polymorphic code.
See you in the next post on Similarity.