← ML Research Wiki / 2506.17162

Analyzing PDFs like Binaries: Adversarially Robust PDF Malware Analysis via Intermediate Representation and Language Model

(2025)

Paper Information
arXiv ID

Abstract

Malicious PDF files have emerged as a persistent threat and become a popular attack vector in web-based attacks.While machine learning-based PDF malware classifiers have shown promise, these classifiers are often susceptible to adversarial attacks, undermining their reliability.To address this issue, recent studies have aimed to enhance the robustness of PDF classifiers.Despite these efforts, the feature engineering underlying these studies remains outdated.Consequently, even with the application of cutting-edge machine learning techniques, these approaches fail to fundamentally resolve the issue of feature instability.To tackle this, we propose a novel approach for PDF feature extraction and PDF malware detection.We introduce the PDFObj IR (PDF Object Intermediate Representation), an assembly-like language framework for PDF objects, from which we extract semantic features using a pretrained language model.Additionally, we construct an Object Reference Graph to capture structural features, drawing inspiration from program analysis.This dual approach enables us to analyze and detect PDF malware based on both semantic and structural features.Experimental results demonstrate that our proposed classifier achieves strong adversarial robustness while maintaining an exceptionally low false positive rate of only 0.07% on baseline dataset compared to state-of-the-art PDF malware classifiers.

Summary

This paper presents a novel approach to PDF malware analysis by introducing the PDFObj Intermediate Representation (PDFObj IR) framework, which utilizes a graph structure to capture the relationships between PDF objects, enhancing feature extraction. Additionally, PDFObj IR integrates semantic features extracted via pretrained language models with structural features from an Object Reference Graph. The authors developed a new parsing tool, Poir, which efficiently processes malformed PDFs, and created an embedding method called PDFObj2Vec to facilitate graph-based malware classification using a Graph Isomorphism Network (GIN). Experimental evaluations show that their proposed classifier achieves an accuracy of 99.93% on the baseline dataset and demonstrates strong resilience against adversarial attacks, achieving a false positive rate of only 0.07%. Overall, the contributions underscore the effectiveness of their approach in improving the robustness and accuracy of PDF malware detection methods.

Methods

This paper employs the following methods:

  • Graph Isomorphism Network (GIN)
  • PDFObj2Vec
  • PDFObj IR

Models Used

  • BERT
  • CodeT5

Datasets

The following datasets were used in this research:

  • contagio
  • CIC-PDFMal2022

Evaluation Metrics

  • Accuracy
  • True Positive Rate (TPR)
  • True Negative Rate (TNR)
  • False Positive Rate (FPR)

Results

  • Achieves 99.93% accuracy on the baseline dataset
  • Maintains a low false positive rate of 0.07%
  • Demonstrates strong adversarial robustness against various attacks

Technical Requirements

  • Number of GPUs: None specified
  • GPU Type: None specified
  • Compute Requirements: None specified

Papers Using Similar Methods

External Resources