analyzing-malicious-pdfs
Analyzes malicious PDF documents: parsing the object structure for JavaScript,
v1.0.03 installs+3 in 7 days24 StarsApache-2.0synced 11 hours ago
Install
No NotHoly CLI yet? Install it first.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/analyzing-malicious-pdfsWrites to ~/.notholy/skills after checking the signature and the SHA-256.
SignatureSigned, ed25519
Package42660c0b…8017e278
42660c0bdd1b…84388017e2784 files · 3.1 KBScanMedium2 findings
- Executable script shipped with the skillscripts/analyst.py
- Links to outside domains
Sourcegithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/analyzing-malicious-pdfs@da7600a
On this page
When to Use
- You have a suspicious PDF (often from phishing) and must determine if it is weaponized.
- You need to find auto-executing actions, embedded JavaScript, launch actions, or embedded files.
- You want to extract and decode suspicious streams safely.
Do not use a PDF reader to "just look" — opening in a viewer can trigger the very actions you are investigating. Parse the structure statically.
Prerequisites
- A PDF object parser (Python, or pdfid/pdf-parser/peepdf); the sample handled inertly.
Safety & Handling
- Never open the PDF in a graphical reader; parse the raw object structure only.
- Defang any extracted URLs and store embedded payloads password-protected.
Workflow
Step 1: Triage the object inventory
Count high-risk keywords: /JavaScript, /JS, /OpenAction, /AA, /Launch, /EmbeddedFile,
/URI, /RichMedia. Their presence (especially auto-actions) flags weaponization.
python scripts/analyst.py triage sample.pdfStep 2: Locate auto-execution triggers
Resolve /OpenAction and /AA (additional actions) to see what runs on open, and any /Launch
actions that spawn external programs.
Step 3: Extract and decode streams
Pull JavaScript and suspicious streams, applying filters (/FlateDecode, /ASCIIHexDecode) to
get the cleartext; deobfuscate layered JS as needed.
Step 4: Recover payloads and IOCs
Extract embedded files and URIs; hash payloads, defang URLs, and route extracted executables to PE analysis.
Validation
- Auto-execution triggers (
/OpenAction,/AA,/Launch) are resolved to concrete actions. - JavaScript/streams are decoded through their filters, not left encoded.
- Embedded payloads and URIs are extracted, hashed, and defanged.
Pitfalls
- Opening the PDF in a reader and triggering the payload.
- Missing object-stream (
/ObjStm) compressed objects that hide the malicious content. - Stopping at the first JS layer when it is multiply obfuscated.
References
- See
references/api-reference.mdfor the PDF triage parser. - ISO 32000 and Didier Stevens' PDF tools (linked in frontmatter).
Files in this version
references/11.2 KB
- api-reference.md1.2 KB
scripts/12.1 KB
- analyst.py2.1 KB
- LICENSE340 B
- SKILL.md3.0 KB
Permissions
| Permission | Declared | Found by the scan |
|---|---|---|
| Reads files | No | No |
| Writes files | No | No |
| Runs shell commands | Yes | Yes |
| Uses the network | Yes | Yes |
| Uses connectors | No | No |
| Drives a browser | No | No |
Scan findings
Reviewed on Nov 13, 2026
- MediumFile · Executable script shipped with the skillscripts/analyst.py
- InfoLink · Links to outside domains
A clean scan lowers the risk but does not prove a package is safe. Read what you install.
| Version | Published | Commit | SHA-256 | Signature | Permission change |
|---|---|---|---|---|---|
| v1.0.0 | Nov 13, 2026 | da7600a | 42660c0b | Signed | – |
More from meltedinhex
All from this publisher- writing-yara-rules-from-reversed-codemeltedinhex/writing-yara-rules-from-reversed-code4
- validating-detections-with-atomic-testsmeltedinhex/validating-detections-with-atomic-tests4
- writing-suricata-and-snort-rulesmeltedinhex/writing-suricata-and-snort-rules3
- writing-sigma-detection-rulesmeltedinhex/writing-sigma-detection-rules3
More in Reporting and compliance
See the category- skillduty1g/skill5
- rea-ci-tests-auditmorluto/rea-ci-tests-audit4
- tracking-threat-actor-infrastructuremukul975/tracking-threat-actor-infrastructure4
- performing-authenticated-scan-with-openvasmukul975/performing-authenticated-scan-with-openvas4
- slicing-code-contexttrailofbits/slicing-code-context4
- 1337aeondave/13374
Ask anything your scope allows.
Create an account, add credits and ask the first question in the chat or the terminal.
- 1/3
Create the account
Individual or company. You can switch to a company later without losing balance or keys.
IndividualCompany - 2/3
Add credits
By card. Pay per token, no subscription.
$5.00minimum deposit - 3/3
Ask
In the chat, or install the CLI and run notholy login in your terminal.
$ notholy login