Enhancing Robustness of Deep Neural Networks Against Adversarial Malware Samples: Principles, Framework, and AICS'2019 Challenge

Deqiang Li, Qianmu Li, Yanfang Ye, Shouhuai XuarXiv 2018

Abstract

Malware continues to be a major cyber threat, despite the tremendous effort that has been made to combat them. The number of malware in the wild steadily increases over time, meaning that we must resort to automated defense techniques. This naturally calls for machine learning based malware detection. However, machine learning is known to be vulnerable to adversarial evasion attacks that manipulate a small number of features to make classifiers wrongly recognize a malware sample as a benign one. The state-of-the-art is that there are no effective countermeasures against these attacks. Inspired by the AICS'2019 Challenge, we systematize a number of principles for enhancing the robustness of neural networks against adversarial malware evasion attacks. Some of these principles have been scattered in the literature, but others are proposed in this paper for the first time. Under the guidance of these principles, we propose a framework and an accompanying training algorithm, which are then applied to the AICS'2019 challenge. Our experimental results have been submitted to the challenge organizer for evaluation.

Introduction

In the high-stakes cat-and-mouse game of cybersecurity, machine learning (ML) has become a primary line of defense. However, attackers have a potent counter-move: adversarial evasion attacks. By subtly manipulating a malware sample’s features—such as adding unused API calls—they can trick a classifier into labeling a malicious file as "benign" without breaking the file's actual functionality.

This paper proposes a systematic framework for building deep neural networks (DNNs) that can withstand these sophisticated attacks. Developed for the AICS 2019 Challenge, the approach moves beyond ad-hoc fixes to "inject immunity" into neural networks, allowing them to maintain high accuracy even when faced with optimal "white-box" attacks.

Methodology and Defense Principles

The authors' framework is built on six guiding principles, translated into a concrete training algorithm that utilizes ensemble learning and semantics-preserving representations.

The proposed ensemble framework for robust malware detection, illustrating the training process with semantics-preserving learning and the testing process via voting.

Key components of the defense include:

  • Input Binarization (Principle 4): To reduce the "scale" of possible perturbations, the framework binarizes features. This limits an attacker to only two moves: flipping a '0' to a '1' or vice versa, significantly shrinking the search space for an attack.
  • Semantics-Preserving Learning (Principle 6): The framework uses Denoising Autoencoders (DAEs). A DAE is trained to reconstruct the original input from a version corrupted by noise, forcing the network to learn essential malicious features (semantics) while ignoring adversarial perturbations.
  • Adversarial Training (Principle 5): Instead of training only on clean data, the researchers use Projected Gradient Descent (PGD) to generate optimal adversarial samples during training, teaching the model to recognize attacks in the wild.
  • Ensemble Learning (Principle 3): By using an ensemble of classifiers trained on different random subspaces of features, the system ensures that an attack bypassing one classifier is likely to be caught by another.

Experimental Results

The framework was evaluated using the AICS 2019 Malware Classification Challenge dataset, consisting of 12,536 training samples across five obfuscated classes (Virus, Worm, Trojan, Packed malware, and AdWare) and over 100,000 API-based features.

Handling Imbalance and Baseline Performance

The training set was highly imbalanced, with Class '0' dominating the distribution. The authors found that an oversampling ratio of 30% provided the best balance between overall accuracy and the Macro F1 score. Using 5-fold cross-validation, the classifier achieved an accuracy of 93.20% and a Macro F1 score of 85.52%.

Analysis of the Testing Set

The authors submitted predictions for 3,133 test samples. Their analysis revealed that many test samples had a significantly higher number of "nonzero entries" compared to the training set, confirming the presence of adversarial perturbations designed to bypass standard detectors.

Comparison of the distribution of nonzero entries between training and testing sets, indicating potential adversarial perturbations in the test data.

Conclusion

By defending against the "optimal white-box attack," this framework creates an upper bound of protection against various "gray-box" attacks. Future work will address poisoning attacks (which corrupt training data) and the ongoing challenge of automating functionality verification to ensure adversarial samples remain executable and malicious.

Summary updated

BibTeX
@misc{li2018enhancing,
  author = {Deqiang Li and Qianmu Li and Yanfang Ye and Shouhuai Xu},
  title = {{Enhancing Robustness of Deep Neural Networks Against Adversarial Malware Samples: Principles, Framework, and AICS'2019 Challenge}},
  year = {2018},
  eprint = {1812.08108},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1812.08108},
}
Figure