Skip to main content
Glama
forensic-maldoc

forensic-maldoc

by BlinkVoid

Forensic Maldoc Plugin

A local toolkit for read-only PDF and OLE/CFB triage, with a field book for engineers who need to look up file structures and interpret evidence.

Need to find…

Start here

File signatures and magic bytes

File signatures

PDF objects, xref, images, JavaScript, and forms

PDF structure · PDF content locations

OLE sectors and Office streams

OLE/CFB reference

Encryption, metadata, entropy, or LOLBin evidence

Metadata, encryption and entropy · Tool and host evidence

Specifications and tool documentation

Field book index · Source index

Set up

Use Linux, Python 3.11+, and /usr/bin/bwrap with unprivileged user namespaces enabled. Start with a benign fixture on a new host. Keep samples and reports outside Git in analyst-controlled directories.

uv sync --locked --extra mcp
staging=$(mktemp -d)
python3 -m labs.fixtures "$staging"
uv run --locked forensic-maldoc assess --staging "$staging" wrapper-lookalike.docx
uv run --locked forensic-maldoc ole --staging "$staging" named-only.cfb

Start with assess: route by signature, compare known extensions, inspect available PDF or CFB metadata, and report encryption evidence separately from payload coverage. The report includes fixed rule IDs, their evidence, and what each rule cannot conclude. Author, creator, and related fields are reported by name and type only, never by value. See the metadata reference and assessment contract. No password is accepted, stored, or tried.

OLE: the locked olefile dependency inventories reachable CFB directory metadata, declared stream sizes, and known names. It never opens user streams. Accepts .ole, .cfb, .doc, .xls, or .ppt with a matching signature. ZIP-based OOXML is not supported; VBA names are not proof of macros. See format and backend decisions.

PDF: place just pdfid.py 0.2.10 and pdf-parser.py 0.7.14 from the official downloads in a separate tool directory. Verify the published archive and pinned member hashes. The toolkit rejects modified source; it never fetches tools or runs plugins.

uv run --locked forensic-maldoc scan --staging "$staging" --tools /path/to/verified-tools keyword-only.pdf

CLI exit codes: 0 completed within scope (including a PDF whose encryption reference was resolved and whose Info metadata was intentionally skipped); 1 incomplete or unsupported assessment; 2 rejected intake or usage error. The Python APIs assess_document(staging, basename), triage_pdf(staging, basename, tools), and triage_ole(staging, basename) return dataclasses; dataclasses.asdict() produces the same payload as CLI and MCP. No completed check is a verdict or proof of execution.

Related MCP server: DeckProbe MCP Server

Local MCP and AI skills

Have the MCP host launch the installed executable (for example /path/to/checkout/.venv/bin/forensic-maldoc) as a stdio child process with arguments mcp --staging /path/to/staged --tools /path/to/verified-tools. --tools is required only for the dedicated PDF scan. The MCP extra is optional for CLI and Python-only use. assess_staged_document(basename), triage_staged_pdf(basename), and triage_staged_ole(basename) accept no URLs, arbitrary paths, flags, or commands. A host's model provider may see structured results; use an approved or local host for confidential cases.

Scope, layout, and verification

Snapshots are bounded to 8 MiB and hashed before inspection. Workers have no host network or access to home or the staging tree; they use read-only mounts, resource caps, and no unsandboxed fallback. No rendering, macro or script execution, stream decoding of document payloads, extraction, or remote lookup is performed. PDF does not resolve active revisions or compressed objects; OLE does not validate user-stream content or inventory unlinked entries. No real cases or malicious samples are included.

uv run --locked --extra mcp python -m unittest discover -s tests -v
uv run --locked ruff check .
FORENSIC_MALDOC_TEST_TOOLS=/path/to/verified-tools FORENSIC_MALDOC_TEST_ISOLATION=1 \
  uv run --locked --extra mcp python -m unittest discover -s tests -v

The toolkit and field book are MIT-licensed. Upstream analyzer files and wheels are not bundled and retain their own terms. Tests use generated benign fixtures; real-case and model-run evaluation, OOXML, RTF, and broader Windows forensics remain out of scope.

Available Tools

3 tools
assess_staged_documentB
Read-onlyIdempotent

Assess format, encryption evidence and metadata without returning untrusted values.

Inputs: basename (required). Returns: format, sha256, findings, metadata, +5 more

triage_staged_oleB
Read-onlyIdempotent

Inventory staged OLE/CFB directory metadata without opening user streams.

Inputs: basename (required). Returns: checks, format, sha256, size_bytes, +1 more

triage_staged_pdfB
Read-onlyIdempotent

Return evidence for a staged PDF basename; no URLs or raw document content.

Inputs: basename (required). Returns: checks, sha256, size_bytes, schema_version

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 3 tools

    Disambiguation3/5

    The two format-specific triage tools (PDF vs OLE) are clearly separated, but assess_staged_document is a generic 'format, encryption, metadata' tool that plausibly overlaps both, leaving an agent unsure which to call for a PDF or OLE file. Descriptions hint at different depths (inventory vs assessment) but the boundary is not stated. This is manageable overlap rather than distinct purposes.

    Naming Consistency4/5

    All three follow a verb_staged_object pattern with snake_case, which is predictable and readable. The only deviation is the verb choice (triage_ vs assess_), which is a minor inconsistency rather than a broken convention.

    Tool Count3/5

    Three tools is thin for a document-forensics server, and one of them (assess_staged_document) largely duplicates the coverage of the two format-specific tools. It is well-scoped but borderline under-provisioned for the apparent domain.

    Completeness2/5

    Only PDF and OLE/CFB are covered; common maldoc containers such as OOXML, RTF, and archives are absent. Critically, every tool requires a 'staged basename' but there is no tool to list or enumerate staged artifacts, which is a dead end for an agent starting from scratch.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables secure static analysis of Microsoft Office documents and related file types for malicious content, integrating with systems that support the MCP protocol.
      4
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables agents to inspect PDF, Microsoft Office, and Apple iWork documents without rendering them, providing page/slide counts, metadata, security signals, structure, and integrity as deterministic JSON via typed tools and batch operations.
      4
      53 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables local, read-only extraction of text and structure from PDF, DOCX, PPTX, SVG, and PNG files, including OCR for images, directory tree and metadata reporting, with strict path isolation and audit logging.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables creating, reading, editing, and verifying PDF, Word, Excel, and PowerPoint documents through MCP tools that return structured results. It preserves source files by default for edits and supports local stdio operation without network requests.
      MIT