Keeping pace with the creation of new malicious PDF files using an active-learning based detection framework

Nir Nissim, Aviad Cohen, Robert Moskovitch, Asaf Shabtai, Matan Edri, Oren Bar-Ad, Yuval EloviciSecur. Informatics 2016

Introduction

The security industry is currently locked in a persistent "cat-and-mouse" game with attackers who favor PDF files for Advanced Persistent Threats (APTs). Because users generally trust PDFs more than executables, attackers can effectively hide malicious JavaScript or embedded exploits within these documents. While Machine Learning (ML) models offer a path toward automated detection, they face a critical bottleneck: updatability. With thousands of new PDFs appearing daily, human experts can only analyze a fraction of them, leading to a "protection gap" between the emergence of a new threat and the release of a defensive signature.

This paper introduces an active-learning (AL) framework designed to bridge this gap. By prioritizing the most "informative" files for human experts to label, the system can update detection models daily, reducing manual effort by 75% while outperforming leading commercial anti-virus tools.

Methodology

The proposed framework combines static analysis with novel Active Learning strategies to maximize the efficiency of human experts.

Structural Path Extraction

Rather than analyzing easily obfuscated JavaScript code, the system parses the PDF's hierarchical object tree. It extracts "structural paths" (e.g., /Pages/Page/Resources/JS), treating the file structure like a genetic fingerprint. This approach makes it difficult for attackers to mask malicious intent without breaking the file's compatibility with standard readers.

Fig. 1: Simple PDF file structure showing the hierarchical organization of objects used for structural path extraction.

Active Learning (AL) Strategies

The core of the framework lies in how it selects files for manual labeling:

  • SVM-Margin (Baseline): Selects files the model is most uncertain about (those closest to the decision boundary).
  • Exploitation (Proposed): Targets files deep on the "malicious side" of the decision boundary to rapidly harvest new malware signatures. It utilizes a Kernel Farthest-First (KFF) algorithm to ensure the selected files are diverse, preventing experts from wasting time on minor variations of the same threat.
  • Combination (Proposed): A hybrid approach that cycles between exploration (finding uncertain files) and exploitation (harvesting malware) over a 10-day period.

Experimental Results

The study utilized a dataset of 50,908 PDF files, including 45,763 malicious samples. A key discovery was that 96.5% of malicious PDFs were technically "incompatible" with PDF specifications; they would not open correctly in a standard reader but could still execute malicious code. This suggests that structural malformation is a highly effective first-pass filter for malware detection.

Performance Metrics

  • Efficiency: The framework achieved a 97.7% True Positive Rate (TPR) while requiring experts to label only 25% of the daily file stream—a 75% reduction in manual labor.
  • Harvesting Power: By the end of a 10-day trial, the "Combination" method acquired seven times more new malicious files (150) than the standard SVM-Margin approach (22).
  • Competitive Edge: The framework's 97.7% detection rate outperformed all 13 leading commercial anti-virus engines tested, including the top-performing engine, AntiVir (92.5%).
  • Processing Speed: The static analysis is highly lightweight, processing an average file in just 28 milliseconds.

Conclusion and Future Work

By focusing on the structural organization of PDF objects rather than content, this framework provides a robust defense against common obfuscation techniques. The shift from traditional uncertainty-based learning to a malware "exploitation" strategy allows security vendors to populate signature databases much faster.

Future research will focus on expanding the feature scope to detect "logic bombs" within standard structures and adapting the framework for other document types, such as Microsoft Office files, and mobile platforms like Android and iOS.

Summary updated

BibTeX
@article{nissim2016keeping,
  author = {Nir Nissim and Aviad Cohen and Robert Moskovitch and Asaf Shabtai and Matan Edri and Oren Bar-Ad and Yuval Elovici},
  title = {{Keeping pace with the creation of new malicious PDF files using an active-learning based detection framework}},
  journal = {Secur. Informatics},
  year = {2016},
  doi = {10.1186/s13388-016-0026-3},
}
Figure