Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
MaldocTrace — Defensive Office macro analyzer that extracts VBA and XLM, deobfuscates strings, and emulates macros in a simulated sandbox to recover commands, shellcode, and dropped payloads. | Kitploit
Tools/GitHubGitHub/debugactiveprocess/maldoctrace
Defensive ToolsStatic AnalysisDynamic Analysis (Sandboxing)Vulnerability AnalysisCode AnalysisReverse EngineeringForensicsFuzzingMalware Analysis
GitHubdebugactiveprocess/maldoctrace

MaldocTrace

Defensive Office macro analyzer that extracts VBA and XLM, deobfuscates strings, and emulates macros in a simulated sandbox to recover commands, shellcode, and dropped payloads.

View Repository
2226 days agoNot yet reviewed
Share

MaldocTrace

MaldocTrace following an IcedID OneNote dropper through three VBScript stages to the final rundll32 command

MaldocTrace is a defensive analyzer for malicious Office documents, written in Go. It extracts VBA and Excel 4.0 (XLM) macros, rebuilds obfuscated strings, and emulates the macros in a fully simulated environment. The output reports what the document would do: the commands it would run, the payloads it would decode and the files it would drop. All of it is backed by evidence that points to the module, procedure and line (or sheet and cell) that produced it.

Documents with no macros at all are covered too. Remote template injection, DDE fields, linked and embedded OLE objects (including Equation Editor exploits in RTF), hyperlinked lure images and VBA stomping are reported as static findings.


Features

  • Container extraction: OLE/CFB (.doc, .xls, .ppt, including the VBA project and OLE objects PowerPoint keeps in compressed ExOleObjStg records), OOXML (.docx, .docm, .xlsx, .xlsm, .pptm), RTF and raw VBA text. Includes MS-OVBA decompression, UserForm control properties, and resource limits against zip bombs and malformed containers.

  • Encrypted documents: Excel's default password VelvetSweatshop, a short list of common passwords and any --password you give are tried against:

    • .xls workbooks encrypted with RC4 or RC4 CryptoAPI (FILEPASS), so cells and Excel 4.0 macro sheets can be read. The VBA project of an .xls is stored outside the encrypted stream and is always extracted;
    • OOXML files wrapped in EncryptionInfo/EncryptedPackage with ECMA-376 Standard (AES) or Agile (AES, SHA-1/256/384/512) encryption.

    The report gives the scheme and the password that worked. When none works, it says so: the absence of macros then proves nothing.

  • Excel 4.0 (XLM) macros:

    • macro sheets from .xls (BIFF8 formulas decompiled from parsed tokens, using the MS-XLS function tables) and .xlsm, including hidden and very hidden sheets;
    • an XLM interpreter that starts at Auto_Open (any name Excel would run). It follows GOTO, RUN, IF, WHILE/FOR/NEXT, ON.TIME and RETURN, and applies FORMULA/FORMULA.FILL/SET.VALUE/SET.NAME, so self-decoding macros rebuild their real code;
    • simulated EXEC, CALL, REGISTER and aliases (URLDownloadToFileA, ShellExecuteA, WinExec, CreateProcessA) and FOPEN/FWRITE. Anti-sandbox probes (GET.WORKSPACE, GET.WINDOW, GET.CELL) get plausible answers, flagged as simulated;
    • the formulas written at run time are listed as the deobfuscated macro.
  • Static findings (no emulation needed):

    • remote template injection (attachedTemplate, RTF \*\template, the attached template of Word 97-2003 .doc files);
    • external OLE objects, including MHTML (CVE-2021-40444) and ms-msdt (Follina) monikers;
    • embedded Shell.Explorer.1 browser objects (CVE-2026-21509) and the URL they open, with OLE objects identified by their storage CLSID even when CompObj is missing or forged;
    • DDE/DDEAUTO, INCLUDEPICTURE, INCLUDETEXT and LINK fields (including QUOTE-encoded ones) in .docx, RTF and every story of .doc files (body, headers, footnotes, comments, text boxes), and Excel DDE formulas and links;
    • embedded and linked OLE objects of .doc files (ObjectPool): class and ProgID, OLE Packages (label, original and temp path), URL and file monikers of linked objects (CVE-2017-0199 pattern) and Equation Editor exploits;
    • RTF embedded objects decoded the way Word reads them (obfuscated \objdata, corrupted OLE1 headers), with Equation Editor exploit detection: the MTEF FONT overflow (CVE-2017-11882 / CVE-2018-0802) and the MATRIX overflow (CVE-2018-0798), plus extraction of the bytes that follow;
    • hyperlinks on pictures and cells, and QR-code lures;
    • embedded and linked OLE objects of .xls (MBD storages), .doc (ObjectPool) and OOXML (embeddings/) files: linked objects with URL monikers, OLE Packages, Equation Editor data, and the files they carry (PDF with its active-content markers and links, scripts, executables, archives). Embedded documents are analysed recursively and reported under children with their own verdict;
    • when nothing is found, the text report lists what was checked (also in the JSON checks field);
    • VBA stomping: Office runs a module's compiled p-code, not its source text, so stomping tools erase the source or replace it with a decoy. MaldocTrace decompiles the p-code back to VBA (VBA5, VBA6 and VBA7, 32- and 64-bit, including Declare statements with their library and alias) and compares it with the source: string literals or procedures that exist only in the p-code mark the module as stomped, and the code rebuilt from the p-code is what gets emulated. --pcode analyses every module that way.
    • Hidden modules: a module in the VBA project (dir stream) that is missing from the PROJECT stream does not appear in the VBA editor but still runs (the EvilClippy technique); it is reported as hidden_vba_module.
  • Payload hiding places: cell values (Sheets("x").Range("A1"), Cells(r, c)), document properties (BuiltInDocumentProperties("Comments"), custom properties), document variables (ActiveDocument.Variables, from .docx settings and the StwUser table of .doc files) and UserForm controls (TextBox.Text, Label.Caption) are all available to the emulated macro.

  • Document body text: extracted from Word 97-2003 (piece table) and .docx. Droppers often hide their payload in the document body and read it back through ActiveDocument.Paragraphs(n).Range.Text.

  • VBA interpreter: a lexer, parser and bounded interpreter covering the subset of VBA that malware relies on: procedures, ByRef parameters, named arguments, conditional compilation, loops, arrays and the string built-ins.

  • Static deobfuscation: constant folding of Chr/StrReverse/Replace/concatenation. Each value records how it was rebuilt (concatenation+Chr, StrReverse, ...).

  • Simulated environment:

    • processes: WScript.Shell, Shell, WMI Win32_Process.Create (both GetObject and CreateObject("winmgmts:..."))
    • files and network: FileSystemObject, ADODB.Stream (position, text/binary mode and charsets), XMLHTTP/WinHttp
    • MSXML2.DOMDocument elements, including the bin.base64/bin.hex decoding trick
    • script engines: MSScriptControl.ScriptControl; commands that the script runs through a WScript.Shell exposed with AddObject are recovered
    • Word's document model: Paragraphs, Range, Delete, SaveAs2
    • Excel's object model (Sheets, Worksheets, Range, Cells, Offset), shared with the XLM engine, and ExecuteExcel4Macro/Application.Run into macro sheets
    • declared Windows APIs, with simulated VarPtr pointers
  • Payload recovery:

    • PowerShell -EncodedCommand decoding, with static folding of 'ht'+'tp' concatenations before URLs are extracted
    • UTF-7 shellcode buffers passed to MultiByteToWideChar(CP_UTF7)
    • certutil -decode, reproduced over a virtual file system built from what the macro wrote
    • scripts passed to ScriptControl.AddCode, reported as script payloads rather than command lines
    • binary payloads stored as hex text split across string literals, recovered statically even when the macro itself would fail
    • PE/ZIP/OLE/PDF identification from file headers
  • Shellcode and PE profiling (static; nothing is executed):

    • API hashing: classic ROR13 block_api hashes and the randomized variant with a seeded, chained hash, resolved to module!function;

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    Callisto

    jetp1ane/callisto

    Automated binary vulnerability analysis tool that decompiles executables via Ghidra, scans pseudo-C code with Semgrep, and validates findings using GPT-3.5-Turbo to reduce false positives.

    2.1k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    One-tap Android kernel exploit app for CVE-2026-43499, providing privilege escalation via kernel module loading, with offset extraction and on-device analysis tools.

    915
  • 3

    DFRoot

    a2333c/dfroot

    Android root tool for Samsung Galaxy S25 Ultra (SM-S938B) that chains DirtyFrag CVE-2026-43284 and CVE-2026-43499 to gain root automatically at boot via KernelSU.

    420
  • 4

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    419
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    372
  • 6

    wifit3

    derv82/wifit3

    Wifite but USB-only & cross-platform.

    344

Explore all tools

Browse our collection of tools

View all tools →
Download Tool