PDF Analysis Cheatsheet
PDF Analysis Cheatsheet
1. General Flags:
- /AA (Additional Actions): Specifies additional actions triggered by events.
- /o (Open Action): Defines the action performed upon document opening.
- /Filter: Specifies filters or transformations applied to object data. Algorithm that encodes or
decodes the stream.
- /JS (JavaScript): Indicates the presence of JavaScript code.
- /S (Subtype): Specifies the subtype of the object.
- /Type: Defines the type of object.
- /URI (Uniform Resource Identifier): Indicates a URL or URI.
2. Action-related Flags:
- /AA /OpenAction: Executes an action when the document is opened.
- /AA /Before/After: Performs actions before or after specific events.
- /AA /C: Defines actions based on user keystrokes.
- /AA /D: Executes actions when a page is de-selected.
- /AA /JS: Triggers JavaScript code execution.
3. Security-related Flags:
- /Encrypt: Indicates document encryption is present.
- /Perms: Specifies permissions granted to the document.
- /Sig: Defines the presence of digital signatures.
- /F (File Attachment): Embeds files within the PDF.
- /Cert: References digital certificates.
4. Object-specific Flags:
- /Length: Indicates the length of object content.
- /Width /Height: Specifies the dimensions of objects.
- /BitsPerComponent: Defines the number of bits per color component.
- /ColorSpace: Specifies the color space used by objects.
- /XObject: Identifies external objects referenced by the PDF.
- /MediaBox /CropBox: Defines the dimensions of the page or object.
5. Exploitation Techniques:
- Obfuscation: Hides malicious code using encoding or encryption.
- Exploitation of Vulnerabilities: Targets software vulnerabilities.
- Code Injection: Inserts malicious code into legitimate objects.
- URL Redirection: Redirects users to malicious websites.
- Social Engineering: Manipulates user behavior to execute actions.
6. Analysis Techniques:
- JavaScript Analysis: Inspect embedded JavaScript for malicious intent.
- Content Extraction: Extract and analyze embedded files or objects.
- Hex and Text Editors: Analyze PDF structure and encoded content.
- Malware Sandboxing: Execute PDFs in controlled environments.
- Static and Dynamic Analysis: Use specialized tools for in-depth examination.
3. Exploit Techniques:
- Zero-Day Exploits: Targets unknown vulnerabilities in PDF software, evading signature-based
detection.
- File Format Vulnerabilities: Exploits vulnerabilities in the PDF file format or specific PDF
viewer applications.
- Heap Spraying: Injects malicious code into memory to exploit vulnerabilities in the PDF
viewer's memory management.