Skip to main content
QUICK REVIEW

[Paper Review] SAFE-PDF: Robust Detection of JavaScript PDF Malware Using Abstract Interpretation

Alexander Jordan, François Gauthier|arXiv (Cornell University)|Oct 30, 2018
Advanced Malware Detection TechniquesComputer Science25 references7 citations
TL;DR

This paper proposes SAFE-PDF, a robust static analysis framework for detecting JavaScript-based PDF malware using conservative abstract interpretation. By modeling the PDF JavaScript environment and enforcing a whitelist policy, SAFE-PDF achieves high recall and resists common evasion techniques like obfuscation, mimicry, and sandbox detection, outperforming state-of-the-art tools in resilience while maintaining comparable precision and sub-4-second average analysis time per document.

ABSTRACT

The popularity of the PDF format and the rich JavaScript environment that PDF viewers offer make PDF documents an attractive attack vector for malware developers. PDF documents present a serious threat to the security of organizations because most users are unsuspecting of them and thus likely to open documents from untrusted sources. We propose to identify malicious PDFs by using conservative abstract interpretation to statically reason about the behavior of the embedded JavaScript code. Currently, state-of-the-art tools either: (1) statically identify PDF malware based on structural similarity to known malicious samples; or (2) dynamically execute the code to detect malicious behavior. These two approaches are subject to evasion attacks that mimic the structure of benign documents or do not exhibit their malicious behavior when being analyzed dynamically. In contrast, abstract interpretation is oblivious to both types of evasions. A comparison with two state-of-the-art PDF malware detection tools shows that our conservative abstract interpretation approach achieves similar accuracy, while being more resilient to evasion attacks.

Motivation & Objective

  • To address the growing threat of JavaScript-based PDF malware that exploits vulnerabilities in PDF viewers and JavaScript runtimes.
  • To overcome limitations of existing detection tools, including evasion via code obfuscation, mimicry of benign structures, and sandbox detection.
  • To develop a practical, high-recall static analysis system for embedded JavaScript in PDFs that is resilient to known evasion techniques.
  • To design a robust PDF JavaScript code extractor capable of handling edge cases and non-standard constructs that break existing tools.
  • To provide a transparent, maintainable detection model based on abstract interpretation and a whitelist policy, avoiding reliance on opaque machine learning classifiers.

Proposed method

  • Employing conservative abstract interpretation to compute a sound over-approximation of all possible behaviors of embedded JavaScript in PDFs.
  • Designing a domain-specific abstract interpreter tailored to the PDF JavaScript environment, including support for common APIs and execution contexts.
  • Implementing a whitelist policy that blocks known malicious patterns such as heap spraying and calls to vulnerable functions.
  • Building a highly robust JavaScript code extractor validated on 2,952 problematic PDFs to prevent parser confusion attacks.
  • Using a conservative analysis strategy where any unknown or potentially malicious behavior is treated as malicious to ensure high recall.
  • Integrating symbolic reasoning to simulate behavior across different viewer versions and environments without dynamic execution.

Experimental results

Research questions

  • RQ1Can abstract interpretation be effectively applied to detect JavaScript-based PDF malware with high recall and low false positive rates?
  • RQ2Can a static analysis approach resist common evasion techniques such as code obfuscation, mimicry of benign structure, and sandbox detection?
  • RQ3How does the performance and accuracy of abstract interpretation-based detection compare to state-of-the-art signature-based and dynamic analysis tools?
  • RQ4To what extent can a robust code extractor improve the reliability of static analysis in the presence of malformed or non-standard PDF constructs?
  • RQ5Can a transparent, policy-driven model outperform opaque machine learning-based detectors in terms of maintainability and resistance to evasion?

Key findings

  • SAFE-PDF achieves almost perfect recall, detecting nearly all known malicious PDFs in the evaluation set.
  • The tool maintains precision comparable to state-of-the-art detection tools, despite its conservative analysis strategy.
  • Average analysis time per document is under 4 seconds, demonstrating practicality for real-world deployment.
  • The code extractor successfully processes 2,952 documents that previously broke existing extractors, proving robustness to parser confusion attacks.
  • SAFE-PDF resists obfuscation, mimicry, and sandbox evasion attacks that subvert existing tools, due to its static, conservative, and semantics-aware analysis.
  • The approach outperforms dynamic analysis by detecting behaviors triggered by user interaction, which are missed by sandbox-based tools.

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.