Repository navigation
v1.0.0
Mailstrix 1.0.0 — first stable release
Mailstrix is the owl that finds malware hiding in your mail. It takes hostile
attachments apart — unwrapping OLE2/OOXML, VBA, RTF objects, PDFs, archives and
nested carriers — until YARA detection rules can finally see the dangerous bits.
It runs out-of-process behind Rspamd (async HTTP), SpamAssassin, an ICAP server,
Dovecot Sieve, or standalone, so attachment analysis never blocks the mail worker.
This is the first stable, versioned release. Detection is parity-or-lead against the
common open Office-malware tooling, the extractor is fuzz- and budget-hardened, and
the daemon fails open on every error path so a scanner hiccup never loses mail.
Released from d59e77d. The container ships ~10,000 curated public YARA rules plus
local document-behaviour heuristics, refreshed daily.
Links
- Source: https://github.com/eilandert/mailstrix
- Container: https://hub.docker.com/r/eilandert/mailstrix
- Project home: https://mailstrix.com
- How it works (deep-dive article): https://deb.myguard.nl/articles/yara-malware-scanning-mailstrix/
What's in 1.0.0 — features
Attachment extraction & unwrapping
- OLE2 / OOXML opening with VBA stream decompression; scans recovered macro source as a dedicated buffer with the
VBAYARA external set - VBA stomping detection (p-code present vs implausibly small source)
- VBA string deobfuscation:
StrReverse,Environ, variable-referencedReplace(), Dridex-style encoding, multilayer decode worklist - Document-properties string extraction (docprops) and structured OLE SummaryInformation metadata markers
- Bounded XLM (Excel 4.0) interpreter — hidden/"very hidden" macrosheets in OOXML, BIFF8
.xls, BIFF12.xlsb, and SYLK.slk; ptg formula folding; SHRFMLA shared-formula resolution; CONTINUE-split FORMULA array reassembly; per-funcid arity table - OOXML DDE/DDEAUTO field detection, remote-template-injection, CVE-2021-40444 (
mhtml:/!x-usc:) flagging; CSV / Excel-2003-XML formula injection - RTF
\objdataembedded-object carve, in-group hex reassembly,\fldinstUTF-16/\uN/\'HHDDE, evasion hardening - PDF Flate inflation + dangerous-action flagging (OpenAction/Launch/embedded files/JBIG2)
- PE/ELF carving + structural analysis in non-PE containers; base64-PE carving for pad-prefixed MZ headers
- HTML smuggling triage (incl. nested parts), scripted-SVG detection, SVG
<image href>data: URI carving, plain-HTML data: URI carving - TNEF (winmail.dat) extraction; ISO9660 and UDF disc-image member extraction; batch-dropper (echo-redirect) reconstruction; CAB (MSCF) MSZIP/store carving
- Markers: XLL add-in, polyglot PE/ZIP, password-protected archive, OLE2-extra-data, legacy-encryption (Word 97-2003 FibBase, PPT EncryptedSummary), encryption-type + digital-signature classification, anomalous CFB timestamps, orphaned CFB streams
Detection rules
- ~10,000 curated public rules (YARAForge, sigbase, AnyRun, Didier, BartBlaze, InQuest, CAPEv2, YARAify) plus in-repo high-signal local rules, refreshed daily
- Behavioral-score tier (olevba weight-of-evidence): aggregates co-occurring low-confidence structural markers into one verdict so a novel maldoc tripping several weak signals still scores, with a build-time olevba-indicator parity contract
- Shell.Explorer CLSID (CVE-2026-21509) and Equation Editor (CVE-2017-11882 / CVE-2018-0802) exploit detection
- Maldoc auto-exec + write + execute correlation rule; mraptor-style autorun/persistence and ext-func extensions
- Dropper families: PowerShell control-flow-flatten, despaced Assembly.Load, random-name temp-dropper; VBS split-charcode / array-scatter / sibling-EXE launcher; JS XOR-array ActiveX, string-concat charcode; BAT droppers
- GetEIP shellcode prologue detection, VSTO/ClickOnce remote-codebase add-ins, webpack-bundled Node.js RAT, AnyDesk RMM-abuse + .NET LOLBin loaders
- Renamed-container flagging (EXT-MISMATCH / MIME_BAD_EXTENSION), PURE-marker channel separation
Threat-intel feeds
- abuse.ch URLhaus (URL checks, incl. defanged forms) and MalwareBazaar (SHA-256) lookups; ThreatFox IOC + Feodo Tracker IP blocklist — all cached locally and fail-open
Integrations
- Rspamd Lua plugin with verdict explainability (score tiers + rule descriptions) and per-message effort hinting
- SpamAssassin plugin (central-scanner mode + opt-in per-MIME-part scanning)
- ICAP server mode (RFC 3507 REQMOD/RESPMOD)
strix-scanCLI for Dovecot Sieve / LDA delivery-time scanning; localscan,check-rules,extractsubcommands
Effort tiers & performance
- Effort-tier contract: auto level from admission-gate pressure and sender signals, scaling scan timeout, XLM fold caps, nested-PDF caps and decode worklist per request
- Oversized-buffer cost pre-gate (BIGFILE) scanning large buffers against the small local ruleset to stay bounded
- SHA-256 verdict cache with request coalescing; per-channel scan counters and LRU metrics
Operations
- Distroless nonroot image; rules reload keeps the previous compiled bundle on a bad edit; canary mode + file-based denylist with SIGHUP reload
- OOM-headroom estimation, CPU over-subscription warnings, clean feed-goroutine shutdown
.debpackages (strixd + strix-scan, amd64/arm64), Kubernetes Helm chart, Grafana dashboard + Prometheus alert rules- Rule-source provenance surfaced in
/version
Assets
Per-arch binaries (strixd-linux-{amd64,arm64}, strix-scan-linux-{amd64,arm64}),
.deb packages (amd64 + arm64), and SHA256SUMS. The runtime container is on
Docker Hub.