| Finding | Severity |
|---|---|
| Macro present | Medium |
| AutoOpen present | High |
| Shell + PowerShell | Very High |
| URLDownloadToFile | Critical |
| Encoded payload | Critical |
Suspicious Patterns:
- 50–500 KB (macro droppers)
- 1–2 embedded objects
vbaProject.binpresent- External template reference
- Very recent creation/modification timestamps
- AutoOpen / Document_Open macros
Identify
file sample.docx
Confirm:
- Is it actually Word?
- Or renamed ZIP?
- Or RTF?
Enumerate
(DOCX = ZIP)
unzip -l sample.docx
Look for:
word/vbaProject.binword/_rels/docProps/core.xmlembeddings/customXml/
Extract Safely (No Execution)
7z x sample.docx -oextracted_doc
# OR targeted extraction:
unzip sample.docx word/vbaProject.bin
unzip sample.docx docProps/core.xml
Hunt
Common malicious DOC patterns:
vbaProject.bin- Auto-execution functions:
AutoOpenDocument_Open
CreateObjectWScript.ShellPowerShell- Base64 blobs
URLDownloadToFile- Hardcoded URLs
# Inspect macro content
strings word/vbaProject.bin | less
# Hunt URLs
strings word/vbaProject.bin | grep -i http
# Hunt PowerShell
strings word/vbaProject.bin | grep -i powershell
Metadata
unzip -p sample.docx docProps/core.xml
Check:
<dc:creator><cp:lastModifiedBy>- Creation vs modification delta
- Company field
Red flags:
- Random author
- Blank metadata
- Created and modified within seconds
Macros
# If you see "word/vbaProject.bin" = Macros Present
unzip -l sample.docx | grep -i vba
# Hunt
# Execution
strings word/vbaProject.bin | grep -i auto
strings word/vbaProject.bin | grep -i open
strings word/vbaProject.bin | grep -i shell
strings word/vbaProject.bin | grep -i createobject
strings word/vbaProject.bin | grep -i wscript
# Connection
strings word/vbaProject.bin | grep -i http
# Obfuscation
strings word/vbaProject.bin | grep -i chr
strings word/vbaProject.bin | grep -i split
strings word/vbaProject.bin | grep -i strreverse
Look for:
ShellCreateObjectWScript.Shellcmd.exepowershell- URLs / IPs
Chr(65)StrReverseSplit- Auto-execution entry points
AutoOpenDocument_OpenWorkbook_Open