Fortinet Blog | News and Threat Research

  • Products
  • Solutions
  • Service & Support
  • Partners
  • Corporate
  • Resources
  • How to Buy

A cryptographer's eye on antivirus analysis

by RSS Axelle Apvrille  |  February 23, 2009  |  Category: Security Research

Not so long ago, I arrived, all fresh and pumping, from a world full of cryptography – you know, RSA, AES, SHA256 etc. – very excited to discover a new face to computer security. It’s always in such situations you notice the importance of vocabulary, context and shortcuts. All of a sudden, you understand nuts to conversations in your mother tongue. I’ll share a couple of surprises I had.

We have our AV (antivirus) engine scan a “signature” database. In cryptography, a signature consists in processing some input through an asymmetric algorithm with a private key or a symmetric algorithm with a secret key (actually, the latter is rather called a MAC - Message Authentication Code). For the AV industry, a signature database groups various detection patterns for malware. Indeed, like any criminal likes (or is compelled) to sign his/her acts (e.g Jack The Ripper), each cyber malware also has its own style: specific techniques used, payload, targets, messages displayed etc. This is the malware’s signature. It does not mean any “cryptographic signature” is used.

We also use checksums in several cases, mostly CRC32 but also CRC16… and, more surprisingly, in some situations, MD5. As a cryptographer, I barely ever used CRCs and, if I could, would have banned MD5. Technically speaking, MD5 is a hash function, not a checksum. Hash functions are designed for security considerations, to detect malicious corruptions, whereas checksums are built to detect accidental corruptions. Consequently, for instance, hash functions must be difficult to invert (this is called pre-image resistance), whereas checksums need not fulfill this requirement. Hence, cryptographers typically use hash functions, not checksums, while surety processing rather involve checksums (easier and faster to implement).

So, apart from performance issues, using the hash function MD5 as a checksum should be okay: detecting malicious corruptions will also detect accidental ones… except that, lately, several flaws have been identified on MD5 and no cryptographer will recommend its use anymore. This is why I said I had virtually banned it.  The problem lies in the fact MD5 has collisions, i.e different inputs can end up with the same digest. The first theoretical attacks were disclosed in 2004. Since then, the attacks have been improved – such that collisions can be found for inputs with the same chosen prefix - and practical demonstrations have been released.

Let’s go back to our particular case. In some situations, we use MD5 to identify a piece of code as a given malware A. Then, an attacker can probably craft a similar malware B, with the same prefix as A and whose hash matches A’s. This means we’ll wrongly identify malware B as A. As long as we do stop both malware, this doesn’t sound too critical to me (although it’s probably quicker to use CRC32 for not so less security).

The point I really want to make in this article is that statements which are true for a given domain may not be in another: a signature in cryptography has a different meaning than for the AV industry, but both definitions make sense. Similarly, for a cryptographer, using MD5 is nonsense… but it actually depends what you are using it for and which attacks you do consider as valid.

– The Crypto Girl

by RSS Axelle Apvrille  |  February 23, 2009  |  Category: Security Research
Tags: Antivirus Cryptography Research
comments powered by Disqus

Category

  • All
  • RSS Subscribe
  • Security Research
  • RSS Subscribe
  • Industry Trends & News
  • RSS Subscribe

FortiGuard Labs on the Web

  • Twitter Twitter
  • Facebook Facebook
  • LinkedIn LinkedIn
  • Youtube Youtube

Monthly Archives

  • May 2013 8
  • April 2013 17
  • March 2013 12
  • February 2013 11
  • January 2013 12
  • December 2012 8
  • November 2012 7
  • October 2012 4
  • September 2012 7
  • August 2012 7
  • July 2012 9
  • June 2012 17
  • May 2012 14
  • April 2012 16
  • March 2012 15
  • February 2012 11
  • January 2012 6
  • December 2011 4
  • November 2011 6
  • October 2011 11
  • September 2011 2
  • August 2011 2
  • July 2011 4
  • June 2011 6
  • May 2011 6
  • April 2011 5
  • March 2011 7
  • February 2011 5
  • January 2011 7
  • December 2010 8
  • November 2010 11
  • October 2010 3
  • September 2010 8
  • August 2010 4
  • July 2010 9
  • June 2010 9
  • May 2010 9
  • April 2010 6
  • March 2010 8
  • February 2010 6
  • January 2010 9
  • December 2009 8
  • November 2009 6
  • October 2009 6
  • September 2009 8
  • August 2009 5
  • July 2009 8
  • June 2009 7
  • May 2009 4
  • April 2009 7
  • March 2009 9
  • February 2009 4
  • January 2009 1
  • Older

Popular topics

microsoft hashdays Malware Mobile Security reverse engineering mobile malware reversing challenge Zeus botnet UTM mobile phones android Antivirus google zitmo mobile Windows privacy apple network security facebook sms Mac OS X Firewall Threat Landscape Fortinet bredolab webinar Research virut symbianos adobe Anti-Spam derek manky symbian FortiGate Cryptography symbos/yxes SpyEye conference mobile phone Anonymous hacking challenge iphone exploit BYOD trojan Security stuxnet