PDF Payload Analysis 101
by Coleman Kane
LAB02: PDF Payload Analysis 101
During the week of 2021-02-08, we discussed the static analysis material that was reviewed the prior week. The static analysis content included some discussion around analysis of PDF and EXE file formats.
The following link contains a ZIP file that has a weaponized PDF in it. The ZIP is password-protected.
- hw02.zip [password: cs6038]
This PDF uses a simple technique to install and run an EXE on the target system. For this exercise, using only static analysis methods, analyzed PDF and extract the EXE file from the appropriate place within the PDF. Use static analysis tools on both to answer the 11 questions below:
- How many objects in the pdf?
- Which objects contain data streams?
- Which object contains script code to execute the backdoor?
- Which object contains the stream that is the EXE backdoor?
- Describe how you determined the content is an EXE file.
- Was this EXE encoded? What algorithm encodes it?
- What is the address of the entry-point in the EXE?
- What is the file size of the EXE?
- What is the SHA256 checksum of the EXE?
- What is the compilation time of the EXE?
- Using
strings
, try to determine what IP address or domain name the EXE might connect to.
Tip: You’ll want to review use of pdf-parser
, objdump
, and strings
. For pdf-parser
, the
-o
, -f
, -d
, and -w
options may be helpful.