Perform static analysis of malicious PDF documents using peepdf, pdfid, and pdf-parser to extract embedded JavaScript, shellcode, and suspicious objects. Use when triaging a suspicious PDF attachment from a phishing email, analyzing a PDF-based exploit document, or building detection signatures for weaponized PDF threats.
Start a fresh conversation. Replace the highlighted placeholders.
Use analyzing-malicious-pdf-with-peepdf to analyzing-malicious-pdf-with-peepdf to statically analyze [suspicious PDF file] in an isolated analysis environment and deliver a PDF-MAL report with suspicious objects, extracted indicators, embedded content, hashes, and risk level.
Required inputs
[suspicious PDF file]
User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗
SKILL.md
name: analyzing-malicious-pdf-with-peepdfdescription: Perform static analysis of malicious PDF documents using peepdf, pdfid, and pdf-parser to extract embedded JavaScript, shellcode, and suspicious objects. Use when triaging a suspicious PDF attachment from a phishing email, analyzing a PDF-based exploit document, or building detection signatures for weaponized PDF threats.domain: cybersecuritysubdomain: malware-analysistags: - malware-analysis- pdf- peepdf- pdfid- pdf-parser- static-analysis- reverse-engineering- dfirversion: '1.0'author: mahipallicense: Apache-2.0nist_csf: - DE.AE-02- RS.AN-03- ID.RA-01- DE.CM-01mitre_attack: - T1204.002- T1059.007- T1027- T1106
Analyzing Malicious PDF with peepdf
When to Use
When triaging suspicious PDF attachments from phishing emails
During malware analysis of PDF-based exploit documents
When extracting embedded JavaScript, shellcode, or executables from PDFs
For forensic examination of weaponized document artifacts
When building detection signatures for PDF-based threats
Prerequisites
Python 3.8+ with peepdf-3 installed (pip install peepdf-3)
pdfid.py and pdf-parser.py from Didier Stevens suite
Isolated analysis environment (VM or sandbox)
Optional: PyV8 for JavaScript emulation within peepdf
Optional: Pylibemu for shellcode analysis
Workflow
Triage with pdfid: Scan PDF for suspicious keywords (/JS, /JavaScript, /OpenAction, /Launch, /EmbeddedFile).
Interactive Analysis: Open PDF in peepdf interactive mode to explore object structure.