[Paper Review] Dynamic Malware Analysis with Feature Engineering and Feature Learning
This paper proposes a low-cost feature engineering method and a deep neural network architecture for dynamic malware detection using system API call sequences. It leverages feature hashing to encode heterogeneous API arguments, applies multiple gated CNNs to extract deep features per API call, and uses a bidirectional LSTM to model sequential dependencies—achieving state-of-the-art performance with 98.86% AUC on a real-world dataset.
Dynamic malware analysis executes the program in an isolated environment and monitors its run-time behaviour (e.g. system API calls) for malware detection. This technique has been proven to be effective against various code obfuscation techniques and newly released ("zero-day") malware. However, existing works typically only consider the API name while ignoring the arguments, or require complex feature engineering operations and expert knowledge to process the arguments. In this paper, we propose a novel and low-cost feature extraction approach, and an effective deep neural network architecture for accurate and fast malware detection. Specifically, the feature representation approach utilizes a feature hashing trick to encode the API call arguments associated with the API name. The deep neural network architecture applies multiple Gated-CNNs (convolutional neural networks) to transform the extracted features of each API call. The outputs are further processed through bidirectional LSTM (long-short term memory networks) to learn the sequential correlation among API calls. Experiments show that our solution outperforms baselines significantly on a large real dataset. Valuable insights about feature engineering and architecture design are derived from the ablation study.
Motivation & Objective
- Address the challenge of effectively utilizing heterogeneous API arguments (e.g., strings, integers, addresses) in dynamic malware analysis, which are often ignored or poorly processed in prior work.
- Develop a low-cost, scalable feature representation method that avoids complex manual feature engineering while preserving semantic information from diverse argument types.
- Design a deep learning architecture combining multiple gated CNNs and a bidirectional LSTM to learn hierarchical and sequential patterns from API call features for improved malware detection.
- Demonstrate the effectiveness of both feature engineering and model architecture design through extensive ablation studies and evaluation on a large real-world dataset.
- Provide public access to the extracted features and code to support reproducibility and further research in dynamic malware analysis.
Proposed method
- Apply feature hashing to encode API names, categories, and arguments of different types (strings, integers, addresses) into a unified, low-dimensional, homogeneous feature vector.
- Use multiple parallel gated convolutional neural networks (Gated-CNNs) with kernel sizes 2, 3, and 4 to learn abstract, low-dimensional representations from the high-dimensional hash features of each API call.
- Feed the outputs of the Gated-CNNs into a single bidirectional Long Short-Term Memory (Bi-LSTM) network to model long-range sequential dependencies across the API call sequence.
- Integrate batch normalization layers after the input and after the Gated-CNNs to stabilize training and improve convergence.
- Train the end-to-end model using cross-entropy loss and Adam optimization, with early stopping based on validation AUC.
- Optimize model architecture via ablation studies comparing different configurations of Gated-CNNs, batch normalization, and Bi-LSTM layers.
Experimental results
Research questions
- RQ1Can a low-cost, hashing-based feature representation effectively encode heterogeneous API arguments (e.g., strings, integers, addresses) for malware detection without expert-driven feature engineering?
- RQ2How do different deep learning architectures—specifically combinations of Gated-CNNs and Bi-LSTM—impact the detection performance of dynamic malware analysis systems?
- RQ3What is the relative contribution of API arguments to detection performance, and does including them consistently improve AUC across both traditional ML and deep learning models?
- RQ4Which architectural components (e.g., number of Gated-CNNs, presence of batch normalization, number of Bi-LSTM layers) are most critical for achieving high generalization and robustness on unseen malware?
- RQ5To what extent does the proposed model generalize to zero-day malware, as evidenced by performance on test data collected after the training period?
Key findings
- The proposed model achieves a test AUC of 98.86%, significantly outperforming all baseline methods, including those using only API names or basic string features.
- Including API arguments increases the test AUC of traditional machine learning models by 3% and deep learning models by approximately 1%, demonstrating the value of argument-level information.
- The ablation study shows that the Bi-LSTM layer is essential—removing it reduces performance by a large margin, with the 1-Bi-LSTM configuration achieving the best balance of performance (98.80% AUC) and inference speed.
- The 2,3-GatedCNN configuration (two Gated-CNNs with kernel sizes 2 and 3) achieves the best performance (98.86% AUC), while adding a third kernel size (4) provides no improvement.
- The model with both batch normalization layers performs slightly better (98.80% AUC) than configurations with fewer or no BN layers, indicating its value in training stability.
- Despite a slight increase in inference time due to argument processing, the overall latency remains acceptable (hundreds of milliseconds), especially given the 3–5 minute data collection time per sample using Cuckoo sandbox.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.