TL;DR
This paper introduces a novel approach for detecting malicious PDF files using Convolutional Neural Networks (CNNs) that operate directly on the raw byte level of the files, eliminating the need for manual feature engineering. Their method achieves a high detection rate (94%) and even identifies previously undetected malware, demonstrating its effectiveness against evolving threats.
What Problem Does This Paper Address?
Malicious PDF files pose a significant threat to computer security, and detecting them is a constant challenge. Traditional methods rely on handwritten signatures or machine learning models that require manual feature extraction. These approaches are time-consuming, demand extensive prior knowledge, and necessitate frequent updates as new vulnerabilities emerge. The sheer volume of new malware discovered daily makes these manual processes increasingly unsustainable. This paper aims to address this by developing an automated, feature-less detection system that can keep pace with the evolving threat landscape.
Methods
The core of this research lies in the application of Convolutional Neural Networks (CNNs) to the raw byte sequences of PDF files. Instead of relying on human-crafted features, the CNNs learn to extract relevant patterns directly from the data. The authors experimented with three different CNN architectures (ModelA, ModelB, and ModelC), varying in depth and complexity.
- Byte-level Embedding: Each byte (0-255) is mapped to a 16-dimensional vector, creating an initial input representation. This embedding matrix is learned during training.
- Convolutional Layers: These layers act as feature extractors, identifying patterns within the byte sequences.
- Global Max Pooling: This layer aggregates features extracted by the convolutional layers.
- Fully Connected Layers: These layers combine the pooled features for classification.
- Ensemble Approach: The authors utilized an ensemble of their trained models to improve robustness and performance.
Crucially, this approach bypasses the need for domain expertise in PDF structure or manual feature selection, making it more adaptable to new threats.
Datasets
The researchers utilized several datasets for their experiments:
- Primary Dataset: A large dataset comprising 18,296 malicious PDF files and 70,551 benign files. Malicious samples were sourced from VirusTotal, detected by at least 10 antiviruses. Benign files were also sourced from VirusTotal, verified as non-malicious by multiple antiviruses.
- Newer Malware Set: An additional set of 9,300 newer malicious files (uploaded between February and March 2019) was used to evaluate the model's performance degradation over time.
- Contagio Dataset: A publicly available dataset of 9,000 benign and 11,155 malicious PDF files, commonly used in prior research, was employed for comparative analysis.
The datasets were chronologically organized for training, validation, and testing to simulate a realistic malware detection scenario.
Key Insights and Ideas
- Automated Feature Learning: The most significant insight is that CNNs can effectively learn discriminative features directly from raw byte data, rendering manual feature engineering obsolete for PDF malware detection. This drastically reduces the effort and domain expertise required.
- Robustness to Evolving Threats: The model's ability to detect new malware, even those not yet flagged by most antiviruses, highlights its potential to combat zero-day threats and adapt to the constantly evolving malware landscape.
- Signature-like Patterns: The learned features, analogous to traditional signatures, are effective. The authors observed that their CNNs could group malware into families with high similarity to antivirus labels, suggesting the learned patterns are meaningful and generalizable.
- Performance Comparable to AVs: The proposed CNN models achieve detection rates competitive with, and in some cases exceeding, established antivirus solutions, demonstrating the power of deep learning in this domain.
Key Results
- High Detection Rate: The ensemble of CNN models achieved a detection rate of 94% on their test set with a False Positive Rate (FPR) of 0.5%.
- Outperforming Antiviruses: The best performing model ranked 7th out of 52 antiviruses on VirusTotal for their test set.
- Zero-Day Detection: The model successfully detected malware that was largely undetected by most antiviruses during the training period.
- Degradation Over Time: A noticeable drop in detection rate (to 36% at 1% FPR) was observed on a dataset of newer files, underscoring the challenge of malware evolution.
- Malware Family Classification: The CNN's extracted features, when clustered, showed high similarity to antivirus-assigned malware families, indicating the model's ability to differentiate between malware types. For example, they could distinguish phishing PDFs and exploit-based malware.
Limitations and Future Work
- Degradation with Time: The observed decrease in detection rate on newer files highlights the ongoing challenge of malware evolution and the need for continuous model retraining or adaptation.
- Computational Cost: While the prediction phase is efficient, training deep CNNs can be computationally intensive.
- Future Work: The authors suggest exploring additional neural network architectures, such as Recurrent Neural Networks (RNNs), and incorporating other metadata from PDF files (e.g., tags, xref tables) to further enhance detection capabilities. They also plan to investigate more sophisticated embedding techniques for raw PDF files.
Summary updated