Saturday, January 12, 2013

Backtrack Forensics: pdfid

Menu: Forensics -> PDF Forensics Tool
Directory: /pentest/forensics/pdfid

pdfid is a simple pdf analysis tool. It won't give us a very detailed information, just some high level, which can be enough in some cases, like for quick verification. For detailed analysis there are other tools. This one will scan the PDF file for the following strings: obj, endobj, stream, endstream, xref, trailer, startxref, /Page, /Encrypt, /ObjStm, /JS, /JavaScript, /AA, /OpenAction, /JBIG2Decode, /RichMedia, /Launch. The tool can rename some of the possibly malicious strings (like /JavaScript), and thus disarm the PDF, and making it safe o open.

I created a malicious PDF for analysis with Metasploit using exploit:
and payload:

Using the tool:

./ /root/Desktop/forensics/pdf/msf.pdf - basic usage
./ -e /root/Desktop/forensics/pdf/msf.pdf - extract more details
./ -d /root/Desktop/forensics/pdf/msf.pdf - rename malicious strings

Basic run:

Display more information:

Disarming the PDF:

Reanalyze the disarmed PDF:

Additionally with the -s option we can scan all pdfs within a directory.

Official website:

No comments: