malware-maldoc · git:20261109.4c98a1c · 2026-11-09 · sha256 2ad9c1f7954a55ac

malware-maldoc git:20261109.4c98a1cA

Immutable. This exact content never changes and is served at /api/v1/blob/2ad9c1f7954a55ac.

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_n7ndfsofychqvksq/2ad9c1f7954a55ac9ef8d556c89c3633d66dab8b3fc443fb3ffb2c41bf0e4ef2.json

Then /plugin install malware-maldoc@markdownregistry-n7ndfsofychqvksq in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.

---
name: malware-maldoc
description: Guides analysis of a malicious Office or RTF document — extracting VBA macros with olevba, finding the auto-exec trigger, decoding obfuscation, and recovering the dropped payload URL for pivoting. Use when the user has a suspicious .doc/.docm/.xls/.xlsm/.rtf attachment, asks to analyze a phishing document or macro, or needs the second-stage URL from a maldoc.
license: Apache-2.0
metadata:
  verified: "2026-10-20"
---

# Malicious document analysis

Static only — extracting a macro does **not** run it. Stage the doc under `/work`.

**Threat-landscape note:** since Microsoft blocked internet-sourced VBA/XL4 macros
by default (2022), classic macro maldocs have declined sharply. Modern "document"
lures now lean on containers + LOLBins that dodge Mark-of-the-Web and macro policy:
LNK inside ISO/IMG/VHD or ZIP, OneNote (`.one`) with embedded scripts/attachments,
and HTML-smuggling pages that assemble the payload in-browser. Treat a plain
macro-bearing `.doc(m)`/`.xls(m)` as one branch, not the default. For the
LNK/HTA/JS/HTML-smuggling/ClickFix lures themselves, `load_skill malware-scripts`;
if the document arrived by email, `load_skill phishing-email-analysis` for the
headers and recipient scope. oletools doesn't
parse OneNote (its `ftguess` only identifies `.one`) — carve the embedded files
off-box with Didier Stevens' `onedump.py` or `pyOneNote` (neither is in this image).
LNK/HTML lures are extraction-and-string work, not VBA — pull the embedded command
line / smuggled blob and pivot on it.

## Extract & read (`olevba`)

- `olevba <file>` dumps the VBA, flags **auto-exec** triggers and **suspicious**
  keywords, and attempts deobfuscation. Read the analysis summary first, then
  the deobfuscated code.
- The kill-chain you're reconstructing: auto-exec → obfuscated builder →
  network fetch → execution of the next stage.

## What to look for

- **Auto-exec:** `AutoOpen`, `Document_Open`, `Workbook_Open`,
  `Document_Close` — where execution starts.
- **Exec/download primitives:** `Shell`, `WScript.Shell`, `CreateObject`,
  `MSXML2.XMLHTTP`/`WinHttp`, `URLDownloadToFile`, `powershell -enc`,
  `mshta`, `certutil -decode`.
- **Obfuscation:** `Chr()`/`Ch& ` concatenation, `StrReverse`, hex/base64
  blobs, form/textbox properties used as string storage (olevba `--deobf`
  helps; if a blob survives, decode it with `run_shell` → `base64 -d` or python3; `xxd` is not installed).

## Other document types

- RTF: `rtfobj` (oletools) for embedded objects/OLE exploits.
- PDF: look for `/OpenAction`, `/JavaScript`, `/Launch`, embedded files —
  `run_shell` with the Didier Stevens tools if present, else grep the raw.

## Recover & pivot

- Pull the **stage-2 URL/IP** and any dropped filename — these are your IOCs.
- Run them through `load_skill ioc-pivoting` (`ORKL`, urlscan via
  `security-apis`); fetch the stage-2 only from an authorized analysis host.
- `report_finding`: evidence = the auto-exec trigger + deobfuscated download
  line + the C2 URL. Don't fetch live payloads from a production/engagement box.