Skip to main content
QUICK REVIEW

[Paper Review] Detecting malicious PDF using CNN

Raphael Fettaya, Yishay Mansour|arXiv (Cornell University)|Jul 24, 2020
Advanced Malware Detection TechniquesComputer Science16 references7 citations
TL;DR

This paper proposes a deep learning approach using an ensemble of Convolutional Neural Networks (CNNs) to detect malicious PDF files directly from their raw byte-level representation, without manual feature engineering. The method achieves 94% detection accuracy and identifies zero-day malware, outperforming many commercial antivirus solutions while also clustering malware into families with high homogeneity and completeness.

ABSTRACT

Malicious PDF files represent one of the biggest threats to computer security. To detect them, significant research has been done using handwritten signatures or machine learning based on manual feature extraction. Those approaches are both time-consuming, require significant prior knowledge and the list of features has to be updated with each newly discovered vulnerability. In this work, we propose a novel algorithm that uses an ensemble of Convolutional Neural Network (CNN) on the byte level of the file, without any handcrafted features. We show, using a data set of 90000 files downloadable online, that our approach maintains a high detection rate (94%) of PDF malware and even detects new malicious files, still undetected by most antiviruses. Using automatically generated features from our CNN network, and applying a clustering algorithm, we also obtain high similarity between the antiviruses' labels and the resulting clusters.

Motivation & Objective

  • To develop an automated, feature-free method for detecting malicious PDF files using deep learning.
  • To improve detection of zero-day and previously unknown malware variants that evade traditional signature-based antivirus systems.
  • To automatically group malicious PDFs into distinct families using learned features from the CNN.
  • To evaluate the model’s performance against commercial antivirus engines on real-world datasets.
  • To establish a public benchmark dataset for future research in PDF malware detection.

Proposed method

  • The model processes raw PDF files as 2D tensors of byte values, treating each file as an image for input to a CNN.
  • An ensemble of multiple CNN architectures is trained to improve robustness and detection accuracy.
  • The network learns hierarchical features directly from the byte-level representation, eliminating the need for manual feature extraction.
  • HDBSCAN clustering is applied to the CNN’s learned feature embeddings to group malware into families without prior labeling.
  • Model performance is evaluated using detection rate, false positive rate, and clustering metrics (homogeneity and completeness).
  • The approach is validated on a dataset of 90,000 PDF files sourced from VirusTotal, including both benign and malicious samples.

Experimental results

Research questions

  • RQ1Can a CNN model trained on raw byte-level data detect malicious PDFs with high accuracy without manual feature engineering?
  • RQ2Can the model detect zero-day malware that remains undetected by commercial antivirus engines?
  • RQ3To what extent can the CNN’s learned features group malicious PDFs into meaningful, coherent families?
  • RQ4How does the model’s clustering performance compare to the labels assigned by multiple antivirus vendors?
  • RQ5Can the model’s internal representations reveal structural similarities between malware families, even when antivirus vendors use different naming conventions?

Key findings

  • The CNN ensemble achieved a 94% detection rate for malicious PDFs while maintaining a low false positive rate of 0.5%.
  • The model successfully detected 14.5% of malware samples that were undetected by most antivirus engines at the time of testing, demonstrating zero-day detection capability.
  • The clustering of CNN-learned features achieved a homogeneity score of over 75% across 10 clusters, indicating strong alignment with antivirus family labels.
  • The model demonstrated high completeness in clustering, with 75% of malware samples grouped into clusters that matched at least one antivirus’s family designation.
  • The model outperformed most commercial antivirus solutions in terms of detection rate on the same test set, particularly for previously unknown or zero-day threats.
  • The study revealed that different antivirus vendors use inconsistent naming conventions, with some using more specific labels (e.g., Microsoft) and others more generic ones (e.g., McAfee), which the model’s clustering helped to reconcile.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.