r/computerforensics • u/tacocow1775 • Jan 13 '25
Using an MD5 hash to validate evidence
Hey guys! I've been doing digital forensics for a little while now and we tend to use an MD5 hash to validate that our logical and physical copies have not been tampered with. A bit of background before the question, our network is set up so that we have one server that essentially works as a cloud that we can pull information from and multiple workstations that connect to the network that can access that cloud server. We use that Cloud server in order to transfer information to the workstations. We have found that when we generate an MD5 hash on the cloud server and when we generate it on a workstation AFTER we have locally downloaded the file, we get the same result. But if we open a workstation and drag and drop the logical or physical copy file into our Forensic tool for generating MD5's, we get a different result. I have 2 questions as a result:
1) Why are these producing different results? I know that MD5's take into consideration metadata, but is the fact it's being generated over a network vs being locally hosted a factor?
2) Is there any better way to validate our evidence so that it is more consistent across devices? Potentially SHA-1, SHA-2, NTLM, LANMAN, etc.
TIA
6
u/Affectionate-Egg9944 Jan 13 '25
The hash generating over the network may be an issue in the sense that you might be losing packets/data during the hashing process. It should not be the case but it happens if network devices (switches) can’t handle the steady communication
14
u/BafangFan Jan 13 '25
On one hand you may be generating a hash of the entire container file.
On the other hand, from within your forensic tool, you may be generating a hash of the evidence image file, that is contained within the container file.
1
u/sammew Jan 13 '25
What format are the image files?
3
u/Electrical_Ingenuity Jan 13 '25
One thought is that there is line ending translation happing in the file transfer process between Unix line endings (\n - hex 0x0a) and DOS line endings (\r\n - hex 0x0d 0x0a)
1
u/much_sad_code Jan 14 '25
If you’re going to send files over a network for forensic analysis I recommend using a reliable file upload protocol like tus.io or a protocol that hashes and collects the metadata of the file and sends it before beginning the transfer. These protocols ensure the integrity of the data is kept during transfer :)
-14
u/Stryker1-1 Jan 13 '25
MD5 has to many collisions and shouldn't be used