ExtractedDefender
Microsoft Defender Lua and ASR research data, with reproducible extraction tools.
Current snapshot: 1.463.436.0 — November 23, 2026.
The original June 2022 files remain at their existing paths for historical research.
The rebuilt exporter downloads or reads a full Microsoft definition package,
reconstructs both base/delta databases, verifies their embedded checksums, and
exports original Lua bytecode, best-effort decompiled source, constants, and
searchable reference indexes. It uses the newer MpLua conversion work from
Defender Explorer.
Browse the current data
| Resource |
Contents |
| Snapshot overview |
Counts, decompilation status, and index links |
| ASR candidates |
GUID references in chunks that use IsHipsRuleEnabled |
| LOLBin references |
Known executable-name references |
| MITRE references |
Literal technique IDs found in Lua constants |
| Manifest |
Input versions/hashes, reconstructed database checksums, tool hashes |
| Chunk catalog |
Every unique chunk's output files, status, and reference tags |
| Occurrences |
Every occurrence's database offset and threat association |
Reference indexes are search aids, not claims of detection coverage or rule
enforcement. Decompiled source is approximate; original bytecode is retained.
Files marked .partial.lua carry warnings or failed checks. The catalog's
syntax_valid field records whether luac -p accepted the source, separately
from decompiler warnings. See provenance and limitations.
For interactive searches across the wider signature database, use
Defender Explorer. For the
engine architecture writeup, see
defender_overview.
Reproduce an export
Requires Python 3.10+; the Python exporter has no third-party dependencies.
cabextract is needed when reading/downloading an executable package. Native
Lua decompilation is optional and requires a C compiler, make, and git.
git clone https://github.com/HackingLZ/ExtractedDefender.git
cd ExtractedDefender
# macOS; on Debian/Ubuntu use: sudo apt install cabextract build-essential
brew install cabextract
# Build pinned Lua 5.1 and luadec revisions under .tools/.
python3 scripts/build_luadec.py
# Download and export today's full definitions to a NEW directory.
python3 -m extracted_defender extract --download --output build/current \
--luadec .tools/luadec/luadec/luadec \
--luac .tools/luadec/lua-5.1/src/luac
python3 -m extracted_defender verify build/current
The full package is about 215 MiB at the time of this refresh. Allow roughly
2 GiB of free disk and RAM for unpacking, reconstruction, and export. Existing
output directories are refused; use a new path for each snapshot.
To retain the package for repeatable runs:
python3 -m extracted_defender download --output .cache/mpam-fe.exe
python3 -m extracted_defender extract --package .cache/mpam-fe.exe \
--output build/from-package --luadec .tools/luadec/luadec/luadec \
--luac .tools/luadec/lua-5.1/src/luac
The download command also writes a metadata sidecar with the download URL,
timestamp, size, and SHA-256. A package's installer is never executed.
Existing VDM files can be exported without network access or cabextract:
# Directory must contain matching mpasbase, mpasdlta, mpavbase, mpavdlta .vdm files.
python3 -m extracted_defender extract --vdm-dir /path/to/vdm \
--output build/offline
Omitting --luadec exports bytecode, constants, and indexes without source.
Use --workers 4 to reduce concurrent native processes, and --timeout 10 to
allow up to ten seconds per native invocation. Failures remain cataloged.
Search and compare
# Search constant strings or decompiled source locally.
rg -i 'IsHipsRuleEnabled|powershell.exe' snapshots/1.463.436.0/lua
# Compare raw chunk identities between two new-format snapshots.
python3 -m extracted_defender diff snapshots/1.463.436.0 build/current
Each filename is the full SHA-256 of its original Lua bytecode. A chunk appears
once even when multiple signature records reference it. All source offsets
and threat contexts are retained in occurrences.jsonl.
Validation and future refreshes
python3 -m unittest discover -s tests -v
python3 -m extracted_defender verify snapshots/1.463.436.0
CI runs the offline tests on Python 3.10, 3.13, and 3.14 and verifies the published
snapshot inventory. The Build a fresh research snapshot workflow can be run
manually from GitHub Actions. It downloads current definitions, builds the
pinned native tools, verifies the export, and attaches a compressed snapshot
for review. It has read-only repository permissions and does not publish commits
or run on a schedule.
The original directories asr/, lolbin/, mitre/, and decompiled_unsorted/
are the June 2022 dataset, not current definitions. Their input versions and
hashes were not recorded. New exports live under snapshots/<definition-version>/.
Credits
Implementation references and retained notices are in docs/PROVENANCE.md
and docs/THIRD_PARTY_NOTICES.md.