TL;DR
This paper introduces StratDef, a novel strategic defense system for ML-based malware detection that employs a moving target defense (MTD) approach. By dynamically selecting and strategically deploying a diverse ensemble of models, StratDef significantly enhances adversarial robustness and increases attacker uncertainty, outperforming existing defenses even under severe attack conditions.
What Problem Does This Paper Address?
Machine learning (ML) models are increasingly used for malware detection due to their performance on large datasets. However, these models are vulnerable to adversarial examples – inputs intentionally crafted to cause misclassification. While defenses against adversarial attacks have been extensively studied in image recognition, the ML-based malware detection domain has received less attention. Furthermore, existing defenses often lack a strategic approach, relying on single models or simple ensembles without a dynamic strategy for model selection and deployment. This leaves them susceptible to sophisticated attacks, especially given the unique constraints of malware detection (e.g., maintaining functionality while altering features). The paper aims to bridge this gap by proposing a strategic MTD framework specifically for malware detection.
Methods
StratDef is built upon the principles of Moving Target Defense (MTD), which involves dynamically changing the defense configuration to increase attacker uncertainty. The core of StratDef involves a multi-stage process:
- Model Generation (Offline): A diverse set of candidate models is created or obtained. These can include "vanilla" models (standard ML models) and models that already incorporate individual defenses like adversarial training or random feature nullification. The goal is to build a heterogeneous pool of models.
- Model Selection (Offline): A systematic and flexible method is used to select a subset of models for the ensemble. This selection is driven by a "consideration score" that evaluates candidate models based on various performance metrics (accuracy, AUC, F1, FPR, FNR) under different threat levels (attacker types and intensities). Two selection strategies are proposed: "Best Selection" (choosing top-k models) and "Variety Selection" (enforcing diversity among model families to reduce transferability).
- Strategy Devising (Offline): Once models are selected for specific threat levels, an optimizer is used to create a "strategy vector." This vector assigns probabilities to each selected model, determining how they will be chosen at prediction time. Three optimizers are explored: a Game-Theoretic Optimizer (GT), a Strategic Ranked Optimizer (Ranked), and a Uniform Random Strategy (URS) as a baseline.
- Making a Prediction (Online): When a user input arrives, StratDef uses the pre-computed strategy vector and a biased die roll to select a single model from the ensemble to make the prediction. This dynamic selection process is the "moving target" aspect.
StratDef's key novelty lies in its strategic integration of model construction, systematic selection, and dynamic deployment, tailored to specific threat environments.
Datasets
The paper uses two well-known datasets for malware detection:
- Android DREBIN dataset: Contains 123,453 benign samples and 5,560 malware samples, with features derived from permissions, API calls, hardware requests, and URL requests. For evaluation, it was balanced to 5,560 samples per class, resulting in 11,120 samples with 58,975 unique features.
- Windows SLEIPNIR dataset: Consists of 19,696 benign samples and 34,994 malware samples. Features are derived from API calls in PE files. For evaluation, it was balanced to 19,696 samples per class, resulting in 39,392 samples with 22,761 unique features.
Both datasets were transformed into a binary feature-space.
Key Insights and Ideas
- Strategic MTD is Crucial for Malware Detection: Unlike image recognition, malware detection has unique constraints that necessitate a strategic, dynamic defense rather than static methods.
- Model Diversity is Key to Robustness: The "Variety Selection" method, which enforces diversity among constituent models, significantly reduces adversarial example transferability and improves overall robustness.
- Threat-Awareness Matters: StratDef's ability to adapt its model selection and strategy based on available information about the attacker and environment is a significant advantage.
- Simple Ensembles Aren't Enough: Voting-based defenses, while ensembles, are less effective and more costly than StratDef because they require all models to be evaluated.
- Adversarial Training is Necessary but Insufficient: While high levels of adversarial training offer some robustness, they are outperformed by StratDef and can sometimes increase false positives.
Key Results
- Superior Performance: StratDef achieved significantly higher accuracy than other defenses across various threat levels and attack intensities. For DREBIN, it reached up to 52.6% accuracy at the peak threat level, and for SLEIPNIR, up to 100% accuracy. The average accuracy across all configurations was 72.7% for DREBIN and 96.2% for SLEIPNIR.
- Efficiency: StratDef's prediction time is comparable to single-model defenses and significantly faster than voting-based ensembles, as it only uses one model per prediction. Its memory consumption is also efficient, as it only loads models with non-zero probabilities in their strategy.
- Robustness Against Different Attackers: StratDef demonstrated strong performance against various gray-box attackers (weak, medium, strong, random) and even against Universal Adversarial Perturbations (UAPs).
- Black-Box Attack Resilience: StratDef showed better resilience against black-box attacks compared to other defenses, with evasion rates significantly lower than most.
Limitations and Future Work
- Black-Box Attack Strategy: StratDef is not currently strategized to specifically deal with black-box attacks, although it shows better performance than most defenses. Future work could involve adapting the defense strategy to better handle such attacks.
- Pure Strategies in GT Optimizer: The Game-Theoretic Optimizer can sometimes result in pure strategies, which might increase the risk of an attacker profiling the defense by reducing the number of active models. Exploring methods to limit this phenomenon is suggested.
- Threat Detection: StratDef aims to prevent evasion but does not detect if an attack is in progress. Integrating stateful detection systems could enhance its capabilities.
- Domain Generalization: While effective for malware detection, exploring StratDef's applicability to other domains is a potential future direction.
Summary updated