Skip to main content
QUICK REVIEW

[Paper Review] Adversarial Malware Binaries: Evading Deep Learning for Malware Detection in Executables

Bojan Kolosnjaji, Ambra Demontis|arXiv (Cornell University)|Mar 12, 2018
Advanced Malware Detection TechniquesComputer Science4 citations
TL;DR

This paper proposes a gradient-based adversarial attack that evades deep learning-based malware detectors by modifying fewer than 1% of the bytes in malware binaries, specifically injecting optimized padding bytes at the end of Portable Executable (PE) files. The method achieves a 60% evasion rate against MalConv, demonstrating that raw-byte models are highly vulnerable to subtle, function-preserving perturbations.

ABSTRACT

Machine-learning methods have already been exploited as useful tools for detecting malicious executable files. They leverage data retrieved from malware samples, such as header fields, instruction sequences, or even raw bytes, to learn models that discriminate between benign and malicious software. However, it has also been shown that machine learning and deep neural networks can be fooled by evasion attacks (also referred to as adversarial examples), i.e., small changes to the input data that cause misclassification at test time. In this work, we investigate the vulnerability of malware detection methods that use deep networks to learn from raw bytes. We propose a gradient-based attack that is capable of evading a recently-proposed deep network suited to this purpose by only changing few specific bytes at the end of each malware sample, while preserving its intrusive functionality. Promising results show that our adversarial malware binaries evade the targeted network with high probability, even though less than 1% of their bytes are modified.

Motivation & Objective

  • To investigate the vulnerability of deep learning models trained on raw bytes for malware detection to adversarial attacks.
  • To develop a practical, function-preserving method for generating adversarial malware binaries that evade detection.
  • To evaluate whether gradient-based optimization can effectively generate byte-level perturbations that maximize evasion probability.
  • To compare the effectiveness of gradient-based attacks against random byte injection in evading MalConv.
  • To highlight the limitations of raw-byte analysis in malware detection and advocate for more robust detection methodologies.

Proposed method

  • The attack uses gradient ascent on the input bytes to maximize the model's predicted probability of classifying a malware sample as benign.
  • It targets only the padding bytes appended at the end of PE files to preserve the malware's functional integrity.
  • The method computes gradients of the loss with respect to the input bytes and updates the padding bytes iteratively to maximize misclassification.
  • The attack is applied to MalConv, a deep neural network trained on raw bytes of PE files for malware classification.
  • The approach is evaluated by injecting 10,000 optimized bytes into each malware sample and measuring evasion rates.
  • A baseline random byte injection attack is used for comparison to demonstrate the superiority of the gradient-based method.

Experimental results

Research questions

  • RQ1Can deep learning models trained on raw byte sequences in PE files be evaded by small, function-preserving modifications to the binary?
  • RQ2How effective is a gradient-based optimization strategy in generating adversarial padding bytes that evade MalConv?
  • RQ3Does the gradient-based attack significantly outperform random byte injection in evading malware detection?
  • RQ4What is the impact of modifying early vs. late bytes in the file on the success of the attack?
  • RQ5Can the attack be generalized across diverse malware samples while preserving functionality?

Key findings

  • The gradient-based attack achieved a 60% evasion rate against MalConv when injecting 10,000 optimized padding bytes, which constitute less than 1% of the input file size.
  • The attack significantly outperformed random byte injection, which showed minimal effectiveness in evading the model.
  • The distribution of injected bytes in the gradient-based attack revealed a consistent, non-random pattern, indicating targeted manipulation guided by model gradients.
  • The gradient norm was much higher for bytes near the beginning of the file, suggesting that modifying earlier bytes could lead to higher evasion success, though at the cost of higher risk to functionality.
  • The results indicate that raw-byte-based deep learning models are vulnerable to adversarial examples, even when perturbations are constrained to non-intrusive regions like file padding.
  • The study highlights the need for more robust detection methods that account for adversarial manipulation and incorporate structural knowledge of binary formats.

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.