Repository navigation
Coverage fixes from 14 recent MalwareBazaar OneNote droppers (IcedID, Emotet, Qakbot, Gozi, MetaStealer): commands are now recovered from all the script-based ones. MaldocTrace is now also published on PyPI, and release archives carry build provenance attestations.
Downloads
| Platform | Archive |
|---|---|
| Windows x64 / ARM64 | maldocTrace_0.6.0_windows_amd64.zip, maldocTrace_0.6.0_windows_arm64.zip |
| Linux x64 / ARM64 | maldocTrace_0.6.0_linux_amd64.tar.gz, maldocTrace_0.6.0_linux_arm64.tar.gz |
| macOS Intel / Apple Silicon | maldocTrace_0.6.0_darwin_amd64.tar.gz, maldocTrace_0.6.0_darwin_arm64.tar.gz |
Or install with pip install maldoctrace (also pipx / uv tool install): the wheels contain these same binaries.
You can verify downloads against checksums.txt (SHA-256), or check that an archive was built by the release workflow with gh attestation verify <archive> --repo debugactiveprocess/MaldocTrace. The binaries are static and have no dependencies. The macOS builds are not notarized, so remove the quarantine flag before running them: xattr -d com.apple.quarantine maldocTrace.
Added
- VBScript emulation for embedded
.vbsfiles (OneNote sections, archives, email attachments, OLE packages). Top-level statements run (a:b:clines are statements, not labels),WScriptis a global object, andExecute/ExecuteGlobalrun the code they build. Scripts that write the next stage to disk and launch it are followed for up to three stages, each as a child report (script_emulation, thenscript_stage). In these scripts anIfwhose condition cannot be resolved (the size of a downloaded file) is explored speculatively, and its events are markedspeculative. - Batch deobfuscation: commands assembled from
setfragments are recovered the waycmd.exeexpands them (%VAR%,%VAR:~start,len%,%VAR:old=new%,%VAR:*old=new%,!VAR!,^escapes; unset variables expand to nothing). The expanded script is reported as a decoded string. - ISO 9660 images are opened as containers (email attachments, OneNote sections) and their files analysed; an
embedded_disk_imagefinding reports one carried by a document. - MSI packages and CHM help files are classified and reported as
embedded_executable. onenote_encrypted_datafinding (suspicious): embedded data that is encrypted or random and of no known type, as in a password-protected section.- Emulation:
Errobject (Err.Numberis 0),Shell.Application.Open,FileSystemObjectpath helpers (GetParentFolderName,GetFileName,GetBaseName,GetExtensionName). Text written throughCreateTextFileis captured as one artifact when the stream is closed and returned byReadAll. - PyPI package
maldoctrace: platform wheels (Windows, Linux, macOS; x64 and ARM64) that install the release binary as themaldoctracecommand, plus a small Python API (maldoctrace.analyze(),maldoctrace.analyze_bytes()) that returns the JSON report as a dict. - Release archives get a GitHub build provenance attestation (
gh attestation verify). Continuous integration runs formatting, vet, the tests and a short fuzzing pass on every pull request.SECURITY.mddescribes how to report vulnerabilities privately.
Fixed
- Compound files of version 4 (4096-byte sectors, used by MSI packages) were read at the wrong offsets and rejected as a "cyclic directory chain".
- Batch scripts whose first line is junk ahead of
@echo offwere not recognized. - Encrypted or random data was reported as shellcode because two-byte XOR decoder patterns occur in it by chance; on high-entropy data only stubs at the start are considered.
- VBA/VBScript runtime:
Dim a, b, candPublic a, bdeclared only the first name; a module-level variable assigned inside a procedure became a local;Splitwith an empty delimiter returned characters instead of the whole string;obj.Run (cmd), 0, Truefailed to parse;FileSystemObject.GetTempNamereturned a path instead of a bare name and could not be read without parentheses. - URLs no longer swallow a following
|or^(...p.ps1|iex). - A compound file whose header declares a huge FAT or mini FAT sector count made the parser try to allocate terabytes and crash the process; buffers are now sized from the file length (found by fuzzing).