Multi-view Representation Learning from Malware to Defend Against Adversarial Variants

James Lee Hu, Mohammadreza Ebrahimi, Weifeng Li, Xin Li, Hsinchun Chen

TL;DR

This paper introduces ARMD, a novel multi-view deep learning framework designed to enhance the robustness of malware detectors against adversarial variants. By leveraging both binary and source code views of malware, ARMD significantly improves detection accuracy and resilience against sophisticated evasion techniques, outperforming single-view detectors by up to seven times.

What Problem Does This Paper Address?

Deep learning (DL) models have shown great promise in detecting malware, but they are increasingly vulnerable to adversarial attacks. Adversarial Malware Generation (AMG) techniques meticulously modify malware executables to evade detection while preserving their malicious functionality. A key limitation of most AMG methods is their reliance on a single "view" of the malware, typically the binary or hexadecimal representation. This focus on a single view presents an opportunity for defense: by analyzing malware from multiple perspectives (e.g., binary and source code), a detector might identify adversarial modifications that are only apparent in one view, leaving the other view untouched. The paper aims to bridge this gap by developing a multi-view learning framework that capitalizes on this defense opportunity to create more robust malware detectors.

Methods

The core of the proposed solution is the Adversarially Robust Multi-view Malware Defense (ARMD) framework. ARMD extends existing DL-based malware detectors (like MalConv) by incorporating a multi-view architecture. Key components include:

  • Separate Detector Architectures: ARMD processes the binary and source code views of malware through distinct, parallel network pathways.
  • Composite Fusion Mechanism: This is the novel aspect of ARMD. It combines the representations from the two views using a two-stage process:
  • Attention Fusion: An attention mechanism identifies and weighs important contexts from both views.
  • Highway Layer: This layer acts as a sophisticated gate, filtering out irrelevant contexts identified by the attention mechanism and allowing only the essential, potentially untouched, information to pass through to the final classification layer. This is inspired by highway networks' success in controlling information flow.
  • Black-Box Threat Model: The adversary is assumed to have no knowledge of ARMD's internal structure or parameters and cannot access its confidence scores, making it a realistic black-box attack scenario. The adversary's capability is limited to functionality-preserving modifications.

Datasets

The authors collected a dataset of 33,853 files, comprising 13,554 benign Windows system files and 20,299 malicious samples from eight renowned malware categories obtained from VirusTotal. This dataset was split into training (27,083 files) and validation (6,770 files) sets. For Experiment #2, a new, unseen dataset of four prominent malware categories was used to evaluate adversarial robustness against a specific AMG method.

Key Insights and Ideas

  • Multi-view learning is a potent defense against single-view attacks: The paper strongly suggests that AMG methods, by focusing on a single malware view, leave other views (like source code) relatively untouched. ARMD exploits this by analyzing multiple views, making it harder for adversaries to evade detection across all dimensions.
  • The Highway Layer is crucial for filtering irrelevant adversarial perturbations: The composite fusion mechanism, particularly the Highway Layer, plays a vital role in enhancing robustness. It effectively filters out noisy or misleading information introduced by adversarial modifications, allowing the detector to focus on the core, unperturbed features.
  • Robustness doesn't necessarily sacrifice detection accuracy: Contrary to potential concerns, ARMD demonstrates that incorporating multi-view learning and advanced fusion mechanisms can improve both detection performance and adversarial robustness simultaneously.

Key Results

  • Improved Malware Detection Performance: Experiment #1 showed ARMD achieving significantly higher accuracy (97.10%) and F1 score (97.84%) compared to single-view benchmarks like MalConv (87.93% accuracy, 90.10% F1), NonNeg (55.23% accuracy, 49.62% F1), and ConvNet (73.71% accuracy, 77.05% F1).
  • Enhanced Adversarial Robustness: Experiment #2 demonstrated ARMD's superior performance against a state-of-the-art Reinforcement Learning (RL) based AMG method. ARMD achieved significantly lower evasion rates (e.g., 5.13% total evasion) compared to benchmarks like MalConv (73.84% evasion), NonNeg (59.96% evasion), and ConvNet (39.94% evasion), indicating up to a seven-fold improvement in robustness.
  • Fusion Mechanism Effectiveness: Experiment #3's ablation study showed that ARMD's Attention + Highway fusion mechanism achieved comparable malware detection performance to other fusion methods but significantly outperformed them in adversarial robustness.

Limitations and Future Work

  • Limited Views: The current ARMD implementation uses only two views (binary and source code). The authors suggest expanding the number of views to include API calls or dynamic behavior analysis to further enhance robustness against more sophisticated polymorphic AMG techniques.
  • Specific AMG Method: While ARMD performed well against the chosen RL-based AMG method, its effectiveness against other types of AMG (e.g., those employing file encryption like darkarmour) needs further evaluation.
  • Real-world Deployment: The authors propose testing ARMD in a live-fire cybersecurity environment with real-world hackers to assess its performance in a dynamic and challenging setting.

Summary updated

Abstract

Deep learning-based adversarial malware detectors have yielded promising results in detecting never-before-seen malware executables without relying on expensive dynamic behavior analysis and sandbox. Despite their abilities, these detectors have been shown to be vulnerable to adversarial malware variants - meticulously modified, functionality-preserving versions of original malware executables generated by machine learning. Due to the nature of these adversarial modifications, these adversarial methods often use a single view of malware executables (i.e., the binary/hexadecimal view) to generate adversarial malware variants. This provides an opportunity for the defenders (i.e., malware detectors) to detect the adversarial variants by utilizing more than one view of a malware file (e.g., source code view in addition to the binary view). The rationale behind this idea is that while the adversary focuses on the binary view, certain characteristics of the malware file in the source code view remain untouched which leads to the detection of the adversarial malware variants. To capitalize on this opportunity, we propose Adversarially Robust Multiview Malware Defense (ARMD), a novel multi-view learning framework to improve the robustness of DL-based malware detectors against adversarial variants. Our experiments on three renowned open-source deep learning-based malware detectors across six common malware categories show that ARMD is able to improve the adversarial robustness by up to seven times on these malware detectors.
BibTeX
@inproceedings{hu2022multi,
  author = {James Lee Hu and Mohammadreza Ebrahimi and Weifeng Li and Xin Li and Hsinchun Chen},
  title = {{Multi-view Representation Learning from Malware to Defend Against Adversarial Variants}},
  booktitle = {2022},
  year = {2022},
  doi = {10.1109/icdmw58026.2022.00066},
}
Figure