It's 2016. Can we stop using MD5 in malware analyses?

Posted by   Martijn Grooten on   Jul 26, 2016

When a security researcher comes across a new piece of malware, the first thing he (or she) does is check the file hash to see if it has been seen, or maybe even analysed, before. For that reason, if the researcher does end up writing an analysis, it is considered good practice to add the hashes of the analysed samples to the report.

It is still fairly common for these hashes to be generated using the MD5 algorithm, which is odd given that it was officially broken in 2004, when a collision was found. Since then, it has been broken a lot further, and in 2012 it was found that the Flame malware exploited weaknesses in MD5 to create a fake certificate to sign updates supposedly coming from Microsoft.

In recent months I have given a number of presentations on the exploitability of weaknesses in cryptographic protocols, my conclusion being that, while we should stop using weak protocols, the risks vary from small to negligible.

This is also true when it comes to using MD5 hashes in malware analyses. Firstly, to create another file with the same hash as a given piece of malware is not a trivial task, to put it mildly. And secondly, the harm someone with this power could do would likely be restricted to creating some frustration.

Still, there is a strong argument as to why using MD5 is bad even in this case: it reinforces bad practices. Some security products still use MD5 internally, and there have been reported cases of products using MD5 hashes to whitelist previously analysed suspicious files. Given that it would be feasible to create two executables, one malicious and the other harmless, with the same MD5 hash, an attacker could send the harmless file to such a product first and then take advantage of the whitelisting to get a free pass for the malicious file.

So let's just stop using MD5 everywhere. And, while we're at it, do the same with SHA-1, a collision for which is expected to be found this year, and skip straight to SHA-256.

Finally, if you're worried that your Tweets will be too long if you use SHA-256 hashes to refer to malware samples, use a link to the file's report on VirusTotal or malwr.com instead, which takes up fewer characters than even MD5. Or, if you really want to, find a way to encode SHA-256 hashes into emojis.

ostrich.png

twitter.png
fb.png
linkedin.png
hackernews.png
reddit.png

 

Latest posts:

New paper: LokiBot: dissecting the C&C panel deployments

First advertised as an information stealer and keylogger when it appeared in underground forums in 2015, LokiBot has added various capabilities over the years and has affected many users worldwide. In a new paper researcher Aditya Sood analyses the…

VB2019 presentation: Building secure sharing systems that treat humans as features not bugs

In a presentation at VB2019 in London, Virtru's Andrea Limbago described how, by exploring data sharing challenges through a socio-technical lens, it is possible to make significant gains toward the secure sharing systems and processes that are vital…

VB2019 presentation: Attor: spy platform with curious GSM fingerprinting

Attor is a newly discovered cyber-espionage platform, use of which dates back to at least 2014 and which focuses on diplomatic missions and governmental institutions. Details of Attor were presented at VB2019 in London by ESET researcher Zuzana…

Why we encourage newcomers and seasoned presenters alike to submit a paper for VB2020

With the call for papers for VB2020 currently open, we explain why, whether you've never presented before or you're a conference circuit veteran, if you have some interesting research to share with the community we want to hear from you!

VB2019 paper: The cake is a lie! Uncovering the secret world of malware-like cheats in video games

At VB2019 in London, Kaspersky researcher Santiago Pontiroli presented a paper on the growing illegal economy around video game cheats and its parallels with the malware industry. Today we publish both Santiago's paper and the recording of his…

We have placed cookies on your device in order to improve the functionality of this site, as outlined in our cookies policy. However, you may delete and block all cookies from this site and your use of the site will be unaffected. By continuing to browse this site, you are agreeing to Virus Bulletin's use of data as outlined in our privacy policy.