Skip to main content
QUICK REVIEW

[Paper Review] Similarity-based matching meets Malware Diversity

Mathias Payer, Stephen Crane|arXiv (Cornell University)|Sep 27, 2014
Advanced Malware Detection TechniquesComputer Science43 references6 citations
TL;DR

This paper introduces malware diversity, a technique that extends software diversification to randomly alter both code and data in malware binaries, rendering similarity-based detection ineffective. By leveraging an LLVM-based multicompiler to apply instruction replacement, reordering, garbage insertion, and data encoding, the authors demonstrate that diversified malware instances share minimal common subsequences or structural features, breaking signature-based and similarity-based detection even with advanced tools like bindiff.

ABSTRACT

Similarity metrics, e.g., signatures as used by anti-virus products, are the dominant technique to detect if a given binary is malware. The underlying assumption of this approach is that all instances of a malware (or even malware family) will be similar to each other. Software diversification is a probabilistic technique that uses code and data randomization and expressiveness in the target instruction set to generate large amounts of functionally equivalent but different binaries. Malware diversity builds on software diversity and ensures that any two diversified instances of the same malware have low similarity (according to a set of similarity metrics). An LLVM-based prototype implementation diversifies both code and data of binaries and our evaluation shows that signatures based on similarity only match one or few instances in a pool of diversified binaries generated from the same source code.

Motivation & Objective

  • To address the vulnerability of similarity-based malware detection in the face of evolving malware families that reuse common source code.
  • To investigate whether software diversification techniques can be repurposed by malware authors to evade detection by reducing binary similarity.
  • To evaluate the effectiveness of a prototype malware diversification engine in breaking common similarity metrics used in antivirus and malware analysis.
  • To explore the feasibility of creating a virtually unlimited number of unique malware instances through systematic code and data randomization.

Proposed method

  • Extends the LLVM-based multicompiler to support malware-specific diversification by modifying both code and data regions of binaries.
  • Applies instruction-level transformations including replacement, reordering, and garbage insertion to increase binary-level diversity.
  • Employs control-flow randomization via basic block reordering and function call obfuscation using randomly generated wrapper functions.
  • Uses multiple data encoding schemes to diversify data structures and constants, preventing data-based signature matching.
  • Evaluates similarity using multiple metrics: common subsequence length, structural similarity via bindiff, and byte-wise similarity.
  • Employs canonicalization techniques (e.g., instruction histograms, control flow graph matching) to assess whether diversified binaries can be mapped back to a common source.

Experimental results

Research questions

  • RQ1To what extent does malware diversity reduce the similarity between functionally equivalent malware binaries under common similarity metrics?
  • RQ2Can existing malware detection tools like bindiff and ClamAV still identify diversified malware instances as part of the same family?
  • RQ3How effective are structural similarity metrics (e.g., bindiff) in detecting diversified malware, and what are their computational and detection limitations?
  • RQ4Can canonicalization of diversified binaries recover a common representation, and how does this affect the reliability of signature-based detection?

Key findings

  • The average length of the longest common subsequence between diversified malware instances was less than 10 bytes, rendering signature-based detection ineffective.
  • Bindiff reported very low structural similarity between diversified binaries, with similarity scores dropping significantly compared to non-diversified variants.
  • Function calls to system libraries (e.g., libc) were a major source of residual structural similarity, indicating a key target for further diversification.
  • The use of wrapper functions for library calls significantly reduced bindiff’s ability to detect commonalities, highlighting a promising direction for increasing diversity.
  • Canonicalization of binaries through instruction histograms and control flow graph matching was feasible for certain transformations (e.g., nop insertion, instruction reordering), but not for garbage insertion from benign code.
  • Malware diversity effectively evades similarity-based detection by exploiting compiler-level degrees of freedom, enabling the generation of a virtually unlimited number of unique malware instances.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.