Windows 取证工件解析
parsing-artifacts-with-eric-zimmerman-tools
使用 Eric Zimmerman 的 EZ Tools 将 Windows 取证工件——$MFT/$J(MFTECmd)、Prefetch(PECmd)、注册表配置单元(RECmd)、shellbags 和 Amcache——解析为标准化 CSV/JSON,然后将结果加载到 Timeline Explorer 进行分析。适用于 DFIR/事件响应调查中,在分类收集(如使用 KAPE)之后,从获取的取证镜像中确认程序执行、文件/文件夹访问和持久化证据。
- License 许可
- Apache-2.0
- 最近更新
- 2026-08-31
- Stars
- ★ 3.6w
- Forks
- 4.4k
01 前言 Front Matter
- name
- parsing-artifacts-with-eric-zimmerman-tools
- tags
- [ "digital-forensics", "eric-zimmerman", "registry-forensics", "prefetch", "shellbags", "mft", "dfir", "artifact-parsing" ]
- author
- mahipal
- domain
- cybersecurity
- license
- Apache-2.0
- version
- 1.0
- nist_csf
- [ "RS.AN-03" ]
- subdomain
- digital-forensics
- description
- Parse Windows forensic artifacts—$MFT/$J (MFTECmd), Prefetch (PECmd), registry hives (RECmd), shellbags, and Amcache—into normalized CSV/JSON with Eric Zimmerman's EZ Tools, then load results into Timeline Explorer for analysis. Use during DFIR/incident-response investigations, after triage collection (e.g. with KAPE), to establish program execution, file/folder access, and persistence evidence from acquired forensic images.
- mitre_attack
- [ "T1112" ]
02 资源文件 4
- 许可证LICENSE11.0 KB
- 参考文档references/api-reference.md2.3 KB
- 参考文档references/standards.md1.2 KB
- 脚本scripts/agent.py4.6 KB
03 SKILL.md 正文
Parsing Artifacts with Eric Zimmerman Tools
Authorized Use Only: These tools parse evidence acquired from systems. Only analyze data you are authorized to handle, maintain chain of custody, and work from forensic copies rather than originals.
Overview
Eric Zimmerman's Tools (EZ Tools) are a free, open-source suite of high-fidelity Windows forensic parsers, each focused on a specific artifact class and each producing analyst-ready CSV/JSON output. They are the de facto standard for Windows artifact analysis and are what KAPE's !EZParser module invokes under the hood. Key tools include:
- MFTECmd — parses
$MFT,$J($UsnJrnl),$Boot,$SDS, and$LogFilefrom NTFS volumes. - PECmd — parses Windows Prefetch (
.pf) for evidence of program execution. - RECmd — registry hive parser/searcher driven by batch plugins (RECmd Batch files).
- SBECmd — parses ShellBags (folder access history) from
UsrClass.dat/NTUSER.DAT. - AmcacheParser — parses
Amcache.hvefor application execution and metadata. - AppCompatCacheParser — parses ShimCache (AppCompatCache) from
SYSTEMhive. - LECmd — parses LNK shortcut files. JLECmd — parses Jump Lists. EvtxECmd — parses EVTX event logs to a normalized schema.
Output is designed to load into Timeline Explorer (also by Eric Zimmerman), a fast CSV/Excel viewer purpose-built for filtering, tagging, and pivoting across forensic CSVs. The 2025+ releases run on .NET and also work natively on Linux.
When to Use
- After triage collection (e.g. with KAPE) when you need to parse raw artifacts into structured, searchable evidence.
- To establish program execution, file/folder access, and persistence during incident response.
- To build artifact-specific CSVs that feed timelines, Timesketch, or SIEM ingestion.
Prerequisites
- Download EZ Tools via the official downloader (keeps tools current):
Source: https://ericzimmerman.github.io/ and https://github.com/EricZimmerman/Get-ZimmermanTools# Download/update all .NET 6 tools into C:\Tools\EZ .\Get-ZimmermanTools.ps1 -Dest C:\Tools\EZ - .NET runtime (bundled with current releases).
- Forensic copies of the artifacts (mounted image, KAPE collection, or extracted hives).
Objectives
- Parse the MFT, prefetch, shellbags, registry, and amcache from a collection.
- Produce normalized CSV/JSON per artifact.
- Load results into Timeline Explorer for analysis.
- Establish execution and access evidence supporting the investigation.
MITRE ATT&CK Mapping
| ID | Official Technique Name | Relevance to this skill |
|---|---|---|
| T1112 | Modify Registry | RECmd, AmcacheParser, and AppCompatCacheParser parse registry-resident artifacts; analysts use them to detect adversary registry modification (persistence, defense evasion) recorded in hives. |
These are defensive parsers; the mapping reflects the artifact (registry) most relevant to the adversary behavior they help uncover.
Workflow
1. Download/update the tools
Keep parsers current so they handle the latest artifact formats.
.\Get-ZimmermanTools.ps1 -Dest C:\Tools\EZ
2. Parse the MFT for file-system activity
-f points at a single $MFT; --csv sets the output directory and --csvf the filename. Add --csvf for $J/UsnJrnl with -f $J.
MFTECmd.exe -f "E:\collection\C\$MFT" --csv "E:\out\mft" --csvf MFT.csv
REM Parse the USN Journal change log
MFTECmd.exe -f "E:\collection\C\$Extend\$J" --csv "E:\out\mft" --csvf UsnJrnl.csv
3. Parse Prefetch for execution evidence
-d recurses a directory of .pf files. Output CSV + JSON.
PECmd.exe -d "E:\collection\C\Windows\Prefetch" --csv "E:\out\prefetch" --csvf Prefetch.csv --json "E:\out\prefetch\json"
4. Parse ShellBags for folder-access history
-d points at the directory containing the user's UsrClass.dat/NTUSER.DAT (or -f a single hive).
SBECmd.exe -d "E:\collection\C\Users\jsmith" --csv "E:\out\shellbags"
5. Parse the registry with RECmd batch plugins
RECmd is driven by batch files (--bn) that bundle plugins; the Kroll_Batch file is comprehensive. -d recurses a directory of hives.
RECmd.exe -d "E:\collection\C\Windows\System32\config" --bn "C:\Tools\EZ\RECmd\BatchExamples\Kroll_Batch.reb" --csv "E:\out\registry" --csvf Registry.csv
REM Search a single hive for a value/key
RECmd.exe -f "E:\collection\C\Users\jsmith\NTUSER.DAT" --sk "Run" --csv "E:\out\registry"
6. Parse Amcache and ShimCache
AmcacheParser.exe -f "E:\collection\C\Windows\AppCompat\Programs\Amcache.hve" --csv "E:\out\amcache" -i
AppCompatCacheParser.exe -f "E:\collection\C\Windows\System32\config\SYSTEM" --csv "E:\out\shimcache"
7. Parse LNK, Jump Lists, and EVTX
LECmd.exe -d "E:\collection\C\Users\jsmith\AppData\Roaming\Microsoft\Windows\Recent" --csv "E:\out\lnk"
JLECmd.exe -d "E:\collection\C\Users\jsmith\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations" --csv "E:\out\jumplists"
EvtxECmd.exe -d "E:\collection\C\Windows\System32\winevt\Logs" --csv "E:\out\evtx" --csvf EventLogs.csv
8. Analyze in Timeline Explorer
Open the resulting CSVs in Timeline Explorer (TimelineExplorer.exe). Use column filters, conditional formatting, and tagging to pivot on time, file path, and user. CSVs from all EZ Tools share consistent timestamp columns for cross-artifact correlation.
9. Cross-correlate
Build a working theory by correlating PECmd (execution time) with MFTECmd (file creation), Amcache/ShimCache (program presence), and ShellBags/LNK (access), all anchored on UTC timestamps.
Tools and Resources
| Tool | Artifact parsed | Link |
|---|---|---|
| MFTECmd | $MFT, $J, $Boot, $SDS, $LogFile | https://github.com/EricZimmerman/MFTECmd |
| PECmd | Prefetch | https://github.com/EricZimmerman/PECmd |
| RECmd | Registry hives | https://github.com/EricZimmerman/RECmd |
| SBECmd | ShellBags | https://github.com/EricZimmerman/Shellbags |
| AmcacheParser | Amcache.hve | https://github.com/EricZimmerman/AmcacheParser |
| AppCompatCacheParser | ShimCache | https://github.com/EricZimmerman/AppCompatCacheParser |
| LECmd / JLECmd | LNK / Jump Lists | https://ericzimmerman.github.io/ |
| EvtxECmd | EVTX event logs | https://github.com/EricZimmerman/evtx |
| Timeline Explorer | CSV analysis viewer | https://ericzimmerman.github.io/ |
| Get-ZimmermanTools | Downloader/updater | https://github.com/EricZimmerman/Get-ZimmermanTools |
Common Flags
| Flag | Meaning |
|---|---|
-f <file> |
Parse a single file |
-d <dir> |
Recurse a directory |
--csv <dir> |
CSV output directory |
--csvf <name> |
CSV output filename |
--json <dir> |
JSON output directory |
--bn <file> |
RECmd batch (.reb) file |
-i |
AmcacheParser: include file entries (unassociated) |
Validation Criteria
- [ ] EZ Tools downloaded/updated via Get-ZimmermanTools
- [ ] $MFT (and $J) parsed to CSV
- [ ] Prefetch parsed for execution evidence
- [ ] ShellBags parsed for folder-access history
- [ ] Registry parsed with Kroll_Batch (RECmd)
- [ ] Amcache and ShimCache parsed
- [ ] LNK/Jump Lists/EVTX parsed as needed
- [ ] Output loaded and reviewed in Timeline Explorer
- [ ] Cross-artifact correlation performed on UTC timestamps
04 同仓库更多 Skills
SLSA 构建来源验证
verifying-build-provenance-with-slsa-sigstore
使用 Sigstore 的 cosign(verify、verify-attestation、verify-blob-attestation)和 slsa-verifier(verify-artifact)验证工件签名和 SLSA 来源(provenance),强制校验 keyless OIDC 构建者身份和源仓库是否符合 SLSA Build 级别。适用于 CI/CD 中部署工件前、消费第三方证明时、建立 SLSA Build L3 管道,或在事件响应或准入控制期间确认来源的场景。
TPM 测量启动验证
validating-tpm-measured-boot-attestation
使用 tpm2-tools 验证 TPM 2.0 测量启动(measured boot)的完整性和远程证明:读取 PCR(tpm2_pcrread)、重放启动事件日志、生成并检查签名报价(tpm2_quote/tpm2_checkquote),以及将机密封印(seal)到 PCR 策略。适用于确认系统已启动可信固件/内核以实现零信任(Zero Trust)设备状态、通过 PCR 漂移检测启动链篡改,或构建黄金值基线用于机群(fleet)证明。
备份完整性验证
validating-backup-integrity-for-recovery
通过加密哈希验证、自动化恢复测试、损坏检测和可恢复性检查来验证备份完整性,确认备份对于灾难恢复和勒索软件响应是可靠的。适用于在依赖备份进行恢复之前、构建备份后验证管道、审计备份基础设施以满足合规要求,或检查不可变/air-gapped(气隙)备份是否存在静默损坏或篡改的场景。
KAPE Windows 取证收集
triaging-windows-with-kape
运行 KAPE(Kroll Artifact Parser and Extractor),通过 Targets 收集目标取证工件(注册表配置单元、$MFT、事件日志、prefetch、浏览器数据),并使用封装 Eric Zimmerman 的 EZ Tools(PECmd、MFTECmd、RECmd)的 Modules 进行解析。适用于事件遏制/分诊早期阶段——此时完整磁盘镜像不切实际,但需要快速获得可采信、可解析的 Windows 工件集,包括大规模远程收集。
SSVC 漏洞优先级分诊
triaging-vulnerabilities-with-ssvc-framework
使用 CISA 的 Stakeholder-Specific Vulnerability Categorization(SSVC,利益相关方特定漏洞分类)决策树对漏洞进行分诊和优先级排序,权衡利用状态(通过 CISA KEV 目录和 FIRST EPSS API)、技术影响、自动化程度和任务普遍性,输出 Track/Track*/Attend/Act 决策。适用于对漏洞扫描结果(OpenVAS、Nessus、Qualys)进行优先级排序以制定修复计划,而不局限于原始 CVSS 分数的场景。
安全事件初步分诊
triaging-security-incident
使用 NIST SP 800-61r3 和 SANS PICERL 框架对安全事件进行初步分诊,分类事件类型、按业务影响分配优先级,并路由到相应的响应团队。适用于 SIEM/EDR 告警需要人工分类、并发告警必须确定优先级,或用户报告或威胁情报 IOC 匹配需要初步事件分类的场景。