Analyzing Malicious Documents Cheat Sheet
Analyzing Malicious Documents Cheat Sheet
Sheet
MORE ON
Information Security
Malicious Software
O ce, RTF and Adobe Acrobat (PDF) les. To print it, use the one-page PDF version; you can also sheet and covers many other reverse-
engineering topics.
edit the Word version to customize it for you own needs.
If you like this reference, take a look
General Approach to Document Analysis at my other IT and security cheat
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
1. Examine the document for anomalies, such as risky tags, scripts, or other anomalous aspects. sheets.
2. Locate embedded code, such as shellcode, VBA macros, JavaScript or other suspicious
SHARE
objects.
3. Extract suspicious code or object from the le.
4. If relevant, deobfuscate and examine JavaScript or macro code.
5. If relevant, disassemble and/or debug shellcode.
6. Understand the next steps in the infection chain.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
oledump.py le.xls List all OLE2 streams present in le.xls.
mso ce-crypt -d -p pass le.docm Decrypt OOXML le le.docm using password pass to
le2.docm create le2.docm.
rtfdump.py le.rtf -s 5 -H -d Extract object from group 5 and save it into out.bin.
> out.bin
pyxswf.py -xo le.doc Extract Flash (SWF) objects from OLE2 le le.doc.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
/Launch can launch a program or open a document.
/URI accesses a resource by its URL.
/SubmitForm and /GoToR can send data to URL.
/RichMedia can be used to embed Flash in a PDF.
/ObjStm can hide objects inside an Object Stream.
Be mindful of obfuscation with hex codes, such as /JavaScript vs. /J#61vaScript. (See
examples.)
peepdf.py - le.pdf Examine le.pdf for risky tags and malformed objects.
pdf-parser.py --object id le.pdf Display contents of object id in le.pdf. Add “-- lter --raw”
to decode the object’s stream.
swf_mastah.py -f le.pdf -o out Extract Flash (SWF) objects from le.pdf into the out
directory.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
scdbg le.bin /fo 0x2B Emulate execution of shellcode in le.bin starting at o set
0x2B.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
REMnux distro includes many of the free document analysis tools mentioned above.
Post-Scriptum
Special thanks for feedback to Pedro Bueno and Didier Stevens. If you have suggestions for
improving this cheat sheet, please let me know. Creative Commons v3 “Attribution” License for
this cheat sheet version 3.0.
TWITTER RSS FEED NEWSLETTER
Lenny Zeltser develops teams, products, and programs that use information security to achieve
business results. Over the past two decades, Lenny has been leading e orts to establish resilient
security practices and solve hard security problems. As a respected author and speaker, he has been
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
advancing cybersecurity tradecraft and contributing to the community. His insights build upon 20 years
of real-world experiences, a Computer Science degree from the University of Pennsylvania, and an MBA
degree from MIT Sloan.
Learn more
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD