Static Analysis of Malicious PDFs

By

PDF documents are made of objects and streams. Sometimes attackers use PDF documents to embed malicious scripts in it.
These documents when opened execute the scripts which in turn try and connect to the attacker’s webserver to download malicious executables.

Below is such an example. Let’s analyze this PDF statically:

Observe that this PDF has embedded javascript and openaction objects which makes it suspicious.

The javacript is obfuscated.

Beautifying it makes it easier to read.

Looking at the javascript closely notice the presence of unescape and eval functions .
These indicate that attacker is trying to exploit some vulnerability and is probably spraying the memory with shellcode.

SonicWall Capture Labs Threat Research team have researched these PDFs and released following signatures to protect their customers.

  • SPY :Malformed-File pdf
  • GAV: Pdfka.AK
Security News
The SonicWall Capture Labs Threat Research Team gathers, analyzes and vets cross-vector threat information from the SonicWall Capture Threat network, consisting of global devices and resources, including more than 1 million security sensors in nearly 200 countries and territories. The research team identifies, analyzes, and mitigates critical vulnerabilities and malware daily through in-depth research, which drives protection for all SonicWall customers. In addition to safeguarding networks globally, the research team supports the larger threat intelligence community by releasing weekly deep technical analyses of the most critical threats to small businesses, providing critical knowledge that defenders need to protect their networks.