Skip to main content
QUICK REVIEW

[Paper Review] Malware Detection by Eating a Whole EXE

Edward Raff, Jon Barker|arXiv (Cornell University)|Oct 25, 2017
Advanced Malware Detection TechniquesComputer Science40 references60 citations
TL;DR

This paper introduces MalConv, a deep learning model that detects malware by processing raw PE executable files as sequences of bytes, using a 1D convolutional neural network with a 500-step kernel to capture long-range patterns. The model achieves high accuracy on large binaries (up to 2MB) and identifies interpretable, localized regions of malicious behavior without relying on dynamic analysis or manual feature engineering.

ABSTRACT

In this work we introduce malware detection from raw byte sequences as a fruitful research area to the larger machine learning community. Building a neural network for such a problem presents a number of interesting challenges that have not occurred in tasks such as image processing or NLP. In particular, we note that detection from raw bytes presents a sequence problem with over two million time steps and a problem where batch normalization appear to hinder the learning process. We present our initial work in building a solution to tackle this problem, which has linear complexity dependence on the sequence length, and allows for interpretable sub-regions of the binary to be identified. In doing so we will discuss the many challenges in building a neural network to process data at this scale, and the methods we used to work around them.

Motivation & Objective

  • To develop a machine learning model that detects malware directly from raw binary byte sequences without dynamic execution or manual feature engineering.
  • To address the challenge of processing extremely long sequences (up to 2 million time steps) typical in PE files using deep neural networks.
  • To identify interpretable, localized regions within binaries that contribute to malicious classification, enhancing model transparency.
  • To overcome limitations of existing approaches, such as signature-based detection and dynamic analysis, which are ineffective against zero-day or polymorphic malware.
  • To explore architectural choices that enable training on large binary sequences while avoiding overfitting and memory bottlenecks.

Proposed method

  • The model processes raw byte sequences of PE files as input, with no pre-processing or parsing, treating each byte as a token in a sequence.
  • A trainable 8-dimensional embedding layer maps each byte (0–255) into a dense vector representation to capture semantic and structural patterns.
  • A 1D convolutional layer with kernel size 500, stride 500, and 128 filters performs local pattern detection across the sequence, enabling efficient spatial compression.
  • Gated convolutional units (gated convolutions) are used to control information flow and improve learning stability in long sequences.
  • Temporal max-pooling is applied across the sequence to reduce dimensionality and extract the most salient features for classification.
  • A final 128-dimensional fully connected layer followed by softmax produces the malware classification probability.

Experimental results

Research questions

  • RQ1Can a deep neural network effectively learn to detect malware directly from raw byte sequences without any domain-specific feature engineering?
  • RQ2What architectural choices enable effective training on sequences of up to 2 million time steps, which is significantly longer than typical NLP or signal processing tasks?
  • RQ3Does the use of gated convolutions and specific pooling strategies improve generalization and reduce overfitting on large binary files?
  • RQ4How does the model’s performance compare to simpler baselines and existing malware detection methods in terms of accuracy and interpretability?
  • RQ5Can the model identify localized, interpretable regions within a binary that are predictive of malicious behavior?

Key findings

  • MalConv successfully processes raw PE files of up to 2MB in length, achieving high detection accuracy on unseen malware samples.
  • The model outperforms simpler baselines and previous attempts that failed to process full binaries, demonstrating the effectiveness of its architecture.
  • Wider convolutional filters (kernel size 500) and fewer layers outperformed deeper, narrower architectures, contrary to trends in other domains.
  • Batch normalization was found to hinder learning, and was therefore excluded from the final architecture.
  • The model identifies interpretable, localized regions within binaries that contribute to malicious classification, enabling post-hoc analysis of suspicious code segments.
  • SGD with Nesterov momentum achieved the best training convergence and generalization, outperforming adaptive optimizers like Adam and RMSProp.

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.