Skip to content
Write-up Intermediate

Static Analysis Of A Malicious Pdf File With Embedded Docm File

A PDF file contained an embedded Word document with a malicious macro, and the PDF also carried JavaScript and an OpenAction entry. An attacker could use this to run code on a victim's machine once the document is opened and macros are enabled.

Adetomiwa Follow

Published on systemweakness.com

The malware sample used for this analysis was obtained from Tyler Hudak, please observe all necessary precautions when analysing malware samples.

Adetomiwa, on systemweakness.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the PDF used an OpenAction and embedded JavaScript to deliver an embedded Word document whose macro executes when the victim enables macros.

Impact

If a victim opens the embedded document and enables macros, the attacker's code could execute on the victim's machine.

What the attacker needed

Victim opens the PDF; victim opens the embedded document; victim enables macros

How it was found

  1. Obtain the malicious PDF sample.
  2. Run static analysis tools on the PDF to list its objects and streams.
  3. Identify the object containing the embedded file.
  4. Extract the embedded Word document from that object.
  5. Analyse the Word document with macro analysis tools to reveal the obfuscated VBA.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A PDF can carry other files inside it, and this one hid a Word document. That Word document contained a macro, which is a small program that runs when the document is opened. If a user opens it and allows macros, the attacker's code can run on their computer.

More by Adetomiwa

View all

2 more disclosed reports, best first.

Similar reports

Same bug class and techniques, clearest first.