PDF Defiling Intro

PDF, n.
\p-di-ef\

I. Portable Document Format (PDF) is a file format created by Adobe Systems in 1993 for document exchange.

Defiling, tv.
Defile, v.
\di-ˈfī(-ə)l, dē-\

I. a.to make unclean or impure: b.to corrupt the purity or perfection of.

PDF's and more specifically PDF viewers have received a lot of attention over the past months and year. With several 0day's affecting Adobe reader 1, Foxit reader 2, and even Xpdf 3. Vulnrabilities in PDF viewers isn't anything new (here are some of my favorites) 4. But what is new is the increased interest in PDF's exploits, discovering them, detecting them and defending from them.

In the security community there has been a significant increase in the discussion and development of tools relating to pdf's. In the relm of discussion by far the most noteworthy is Didier Stevens, his blog is a treasure trove of information about the contsturction and exploitation of pdfs. However, the first talk I encountered which thoroughly covered pdf's and the ablility to use them maliciously was bh-eu-2008-Filiol 5. Since bh-eu-2008-Filiol there have been several other talks, I've included them in the links at the end.

The tool chest includes standalone exploit payloads from Metasploit, Immunitiy CANVAS, and CORE to pdfid from Didier, and PDF Structazer.exe from Esiea Recherche and a whole myriad of others. Attack Research is going to add to this by releasing several tools and over the next few posts show the use and flexibility of them in hopes that others can benefit from our research and development. AR's tools start out primarily as a simple PDF's parser which can be rapidly built upon for fuzzing, analysis, and exploit development.

First I will start with PDF Forensics and show the analysis of several pdf malware samples using AR's tools and others. Then secondly I will move onto the use of the AR tools with the metasploit framework to deploy a simplistic exploit to show the social engineering impact of pdf's. Then finally I will show future areas where use of AR's tools can be applied with rapid exploit development and fuzzing.

Heres a list of webpages and talks I'm aware of for your edification if you know of or have your own talk/paper about pdf's please feel free to comment and include them.

Talks:

General:

Tools:

Footnotes:

1 Adobe Reader:

customDictionaryOpen() CVE-2009-1493
GetAnnots() CVE-2009-1492

Collab.getIcon() CVE-2009-0927

JBIG2 CVE-2009-0658

util.printf() CVE-2008-2992

2 Foxit Reader

JBIG2 CVE-2009-0191

3 Xpdf

JBIG2 CVE-2009-0146

4
Ghostscript JBIG CVE-2009-0196

RIM Blackberry

Adobe Reader

Collab.collectEmailInfo() CVE-2007-5659

Many

StreamPredictor

5 New Viral Threats of PDF Language

Trackback URL for this post:

http://carnal0wnage.attackresearch.com/trackback/362

Comments

A new tool: origami

We talked about it at PacSec 08, and we released it a few days ago: origami.
It is a ruby framework making easy to manipulate PDF.
We are looking to add new scripts. So any idea is welcome (patches and bugfixes also :)
--fr