Pipeline Stage 10
From reverse engineering mpengine.dll — "Lua 5.1" @ 0x1098C124
When byte-pattern signatures are not enough, Lua provides full programmability
Lua scripts can implement multi-step decision trees, cross-reference attributes from all prior stages, parse file structures programmatically, and apply heuristic scoring — all delivered via VDM updates without engine binary changes.
The Lua 5.1 runtime is compiled directly into mpengine.dll (not a separate DLL). Each script runs in an isolated lua_State with strict resource limits.
Each script gets an isolated Lua 5.1 state with registered engine APIs
9+ C++ template instantiations provide native functions to Lua scripts
All RTTI type descriptors extracted from .data section
Every resource a Lua script can consume is hard-limited and configurable via DBVAR
Scripts exceeding thresholds are flagged for performance telemetry, enabling Microsoft to optimize slow scripts in VDM updates.
~106 functions bridging Lua scripts to mpengine.dll internals
"MpCommonLua" @ 0x10B6E2CC — 14 higher-level functions for advanced operations
Lua scripts can detect and report threats found in:
LsaMpCommonLib.EnumerateFirmwareEnvironmentVariables @ 0x10B6E0B0
Separate Lua execution path for real-time behavioral event analysis
BM Lua scripts cannot call SCAN_REPLY dependent APIs — they operate in a restricted execution context.
How a Lua script is loaded, executed, and its results collected
What Lua scripts produce and where it flows next
mp.setattribute()
mp.fire()
mp.setlowfi()
mp.createvfo()
59,415 Lua scripts provide detection logic too complex for byte-pattern signatures. Scripts are delivered via VDM updates.
12 configurable resource limits prevent runaway scripts. Instruction counting via debug hooks. Custom allocator for memory control.
106 mp.* functions + 14 MpCommon.* functions cover file I/O, PE analysis, crypto, signatures, detection, and remediation.
Scripts produce attributes (Stage 11), direct detections (Stage 13), lowfi markers (Stage 12 cloud), and VFOs (recursive scan).
All data from reverse engineering mpengine.dll v1.1.24120.x