Skip to content
New

DeepSeek V4.1 Flash free for 7 days: 10M tokens a day after a top-up of $10 or more. Until Nov 30.

How it works
meltedinhex/analyzing-malicious-office-macrosReporting and compliance

analyzing-malicious-office-macros

⁨Analyzes malicious Office documents by extracting and reviewing VBA macros and⁩

v1.0.02 installs+2 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-office-macros

Writes to ⁦~/.notholy/skills⁩ after checking the signature and the SHA-256.

SignatureSigned, ed25519
whc0b7dvGL…1+t88NDg==The CLI checks the SHA-256 and the signature before it writes a file.
Packaged94faa29…4bc9328e
d94faa29e78b…a36a4bc9328e4 files · ⁦3.6 KB⁩
ScanMedium2 findings
  • Executable script shipped with the skillscripts/analyst.py
  • Links to outside domains
See the full scan
Sourcegithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/analyzing-malicious-office-macros@da7600a

When to Use

  • A Word/Excel/PowerPoint document is suspected of delivering malware via macros.
  • You need to extract VBA, identify auto-exec triggers, and see what the macro does.
  • You are determining the next-stage payload or URL a maldoc fetches.

Do not use the document's "Enable Content" path to analyze it — never open a maldoc in Office. Extract and read the macro statically; detonate only in the isolated lab if needed.

Prerequisites

  • oletools (pip install oletools) for olevba/oleid, or the bundled OLE/OOXML extractor.
  • The document in neutralized form inside the lab.

Safety & Handling

  • Do not open the document in Microsoft Office. Macros may auto-run on open/close.
  • Static extraction only; if dynamic analysis is required, detonate in the isolated victim VM.

Workflow

Step 1: Identify the container and locate macros

OOXML (.docm, .xlsm) is a ZIP; legacy (.doc, .xls) is OLE2. Macros live in a vbaProject.bin OLE stream. Extract it:

bash
python scripts/analyst.py extract maldoc.docm

Step 2: Flag auto-exec triggers

Look for entry points that run without user action beyond enabling macros:

text
AutoOpen, Document_Open, AutoClose, Workbook_Open, Auto_Open, Document_Close

Step 3: Find suspicious calls

Identify execution and download primitives:

text
Shell, WScript.Shell, CreateObject, powershell, cmd /c
URLDownloadToFile, MSXML2.XMLHTTP, ADODB.Stream (drop to disk)
Environ, GetObject("winmgmts:") (WMI)

Step 4: Deobfuscate

Maldocs commonly use Chr()/string concatenation, base64, and split-and-join. Resolve these to recover the real command and any URL or dropped path.

Step 5: Extract IOCs and the next stage

Pull URLs, dropped file paths, and the spawned command line. These become the report's IOCs and pivot points.

Validation

  • The recovered command line and URL make sense together (download → drop → execute).
  • Auto-exec triggers explain how the macro starts.
  • Deobfuscated strings match what dynamic detonation would reveal (if you confirm in the lab).

Pitfalls

  • Opening the document in Office "just to see" — this executes the macro.
  • Stopping at obfuscated source without resolving it; the IOCs are inside the obfuscation.
  • Missing stomped VBA (p-code present, source removed) — check for VBA stomping and analyze p-code if the source looks empty.

References

  • See references/api-reference.md for the extractor and indicator scanner.
  • oletools and MS-OVBA (linked in frontmatter).

Files in this version

Permissions

PermissionDeclaredFound by the scan
Reads filesYesYes
Writes filesNoNo
Runs shell commandsYesYes
Uses the networkYesYes
Uses connectorsNoNo
Drives a browserNoNo

Scan findings

Reviewed on Nov 13, 2026

  1. MediumFile · Executable script shipped with the skillscripts/analyst.py
  2. InfoLink · Links to outside domains

A clean scan lowers the risk but does not prove a package is safe. Read what you install.

VersionPublishedCommitSHA-256SignaturePermission change
v1.0.0Nov 13, 2026da7600ad94faa29Signed–

Ask anything your scope allows.

Create an account, add credits and ask the first question in the chat or the terminal.

  1. 1/3

    Create the account

    Individual or company. You can switch to a company later without losing balance or keys.

    IndividualCompany
  2. 2/3

    Add credits

    By card. Pay per token, no subscription.

    $5.00minimum deposit
  3. 3/3

    Ask

    In the chat, or install the CLI and run notholy login in your terminal.

    $ notholy login