MFTparser
← Back to blog

MFTECmd: how to parse $MFT, with commands and examples

· 12 min read

MFTECmd is Eric Zimmerman's command-line parser for NTFS metadata files. You give it a $MFT (or a $J, $LogFile, $Boot, $SDS or $I30), it detects the type from the file's content, and it writes CSV, JSON or a bodyfile. It is free, MIT-licensed, and the default $MFT parser in most incident-response kits because its CSV opens directly in Timeline Explorer and KAPE ships modules for it.

This guide is the practical part: getting it, the commands you will actually type, what each output column means, and exactly how its timestomping flags are computed, which matters more than most people realise when you put one of them in a report. The flag logic below is taken from the MFTECmd source (MFTECmd/Program.cs), not from memory. Where it helps, the same $MFT is cross-checked against the browser parser on this site, which uses a different code base.

What MFTECmd parses

| Input | Where it comes from | What you get | |-------|---------------------|--------------| | $MFT | Root of every NTFS volume (what the table is) | One row per file name per record, with full path, flags and both sets of timestamps. CSV, JSON or bodyfile. | | $J | $Extend\$UsnJrnl:$J, the change journal | One row per USN record. With -m <$MFT>, parent paths as they were when each record was written. | | $LogFile | Record 2, the NTFS transaction log | One row per log record, with redo/undo operations decoded, including $STANDARD_INFORMATION timestamp changes and their previous values. | | $Boot | Record 7, the boot sector | Boot sector fields on the console (sector and cluster size, $MFT and $MFTMirr locations, serial number); CSV with --csv. | | $SDS | $Secure:$SDS | One row per security descriptor (owner, group, ACLs). --ds <id> prints one. | | $I30 | A directory's index allocation | Directory index entries, including ones left in slack after deletion. |

The $MFT is the file most people need, and it is what the rest of this guide focuses on.

Download and run it

The official downloads come from Eric Zimmerman's site (ericzimmerman.github.io), or from the Get-ZimmermanTools.ps1 script, which fetches every one of his tools and keeps them current. The current releases (2026.10) come in two builds:

  • .NET 10 (the recommended one). Needs the .NET 10 runtime. On Windows you run MFTECmd.exe; on Linux or macOS you run dotnet MFTECmd.dll from the same zip.
  • .NET Framework 4.7.2, Windows only, for hosts where you cannot install a newer runtime.

There is no installer. Unzip it, open a prompt in the folder, and run MFTECmd.exe -h to check it starts.

On Linux and macOS, quote paths that contain $ with single quotes, or the shell will expand $MFT as an empty variable:

dotnet MFTECmd.dll -f '/cases/host1/C/$MFT' --csv /cases/host1/out

Parse $MFT to CSV

The command you will run ninety percent of the time:

MFTECmd.exe -f "E:\triage\C\$MFT" --csv "E:\out" --csvf host1_mft.csv
  • -f is the input file. MFTECmd works out from the content that it is a $MFT.
  • --csv is the output directory, not a file name. Without --csvf the file is named <timestamp>_MFTECmd_$MFT_Output.csv.
  • --json (and --jsonf) does the same in JSON Lines, one object per line with ISO 8601 UTC timestamps, which is the better choice for loading into Elasticsearch, Splunk or jq.

On a live system, from an elevated prompt, you can point it straight at the locked file. MFTECmd falls back to raw disk access for files Windows will not open, and --vss processes the same file from every Volume Shadow Copy as well:

MFTECmd.exe -f "C:\$MFT" --csv "E:\out" --vss --dedupe

--dedupe skips shadow-copy versions whose SHA-1 matches one already processed. For anything that may end up in a report, collect a copy first (how to extract $MFT) and parse the copy, so you have a hashed file to point to.

Other switches worth knowing:

| Switch | What it does | |--------|--------------| | --body <dir> --bdl C | Writes a Sleuth Kit bodyfile. --bdl is the drive letter to prefix to paths and is required with --body. Feed the result to mactime. | | --de <entry> or --de <entry>-<seq> | Prints every detail of one record on the console: header, every attribute, every timestamp. Accepts decimal or hex (624-5, 0x270-0x5). | | --de <dir entry> --fls | Lists the contents of a directory record. | | --at | Fills the 0x30 ($FILE_NAME) timestamp columns on every row. By default they are empty unless they differ from 0x10 (see below). | | --sn | Adds rows for DOS 8.3 short names. Off by default. | | --fl | Also writes a condensed file listing (..._FileListing.csv): full path, size, created and modified. | | --rs | Recovers FILE records found in the slack space of other records. | | --ir, --re, --rm | Add the resident data of small files as Base64, hex and ASCII columns, optionally only for some extensions (--re .txt,.ps1,.bat) and up to a size (--rm, default 1,024 bytes). | | --dr | Saves resident files to a Resident folder next to the CSV, named <Entry>-<Seq>-<AttrNumber>_<FileName>.bin. | | --dd <dir> --do <offset> | Exports the raw 1,024-byte FILE record at an offset, for hex-level inspection. | | --cutoff <date> | Only outputs records whose $STANDARD_INFORMATION created or modified time is on or after that date. | | --dt <format> | Timestamp format. The default yyyy-MM-dd HH:mm:ss.fffffff keeps all seven sub-second digits; do not shorten it if you care about timestomping. | | --lowmem | Trades about 1.4x run time for about 30% less memory on very large tables. |

--de is the switch people underuse. Once a row in the CSV looks interesting, --de on its EntryNumber-SequenceNumber shows you everything the CSV flattened away: every $FILE_NAME attribute with its own timestamps, the data runs, the attribute list.

Reading the output columns

The $MFT CSV has these columns, in this order:

| Column | Meaning | |--------|---------| | EntryNumber, SequenceNumber | The record number and its reuse counter. Together they are the file reference (624-5). | | InUse | False means the record is a deleted file whose slot has not been reused yet. | | ParentEntryNumber, ParentSequenceNumber, ParentPath | The parent directory from $FILE_NAME, and the path rebuilt from it. When the parent chain cannot be resolved (the parent record was reused), the path starts with .\PathUnknown\Directory with ID 0x.... | | FileName, Extension | The name from this row's $FILE_NAME attribute. | | FileSize | Logical size of the default data stream. | | ReferenceCount | Hard link count from the record header. | | ReparseTarget | Target of a symlink, junction or mount point. | | IsDirectory | Record has the directory flag. | | HasAds, IsAds | The file has alternate data streams; each stream also gets its own row with IsAds = True. | | SI<FN, uSecZeros, Copied | Timestamp heuristics, explained in the next section. | | SiFlags | DOS attributes from $STANDARD_INFORMATION (Hidden, System, Archive, ...), pipe-separated. | | NameType | Which namespace the name is in: Windows, Dos, DosWindows or Posix. | | Created0x10 ... LastAccess0x10 | The four $STANDARD_INFORMATION timestamps: created, modified, MFT record changed, accessed. | | Created0x30 ... LastAccess0x30 | The matching $FILE_NAME timestamps. Empty when equal to the 0x10 value, unless you ran with --at. | | UpdateSequenceNumber | The file's last USN, which lets you jump into the $J output. | | LogfileSequenceNumber | LSN from the record header: the last $LogFile record that touched this entry. | | SecurityId | Index into $Secure:$SDS; resolve it with the $SDS output. | | ObjectIdFileDroid | The object ID from $OBJECT_ID, used by the Distributed Link Tracking service. Typically present on files that a shortcut or OLE link has pointed at. | | LoggedUtilStream | Name of a $LOGGED_UTILITY_STREAM, such as $EFS on encrypted files. | | ZoneIdContents | Contents of a Zone.Identifier stream: the Mark of the Web, often with ReferrerUrl and HostUrl for downloaded files. | | SourceFile | Path of the $MFT that was parsed (useful when you parse several hosts or shadow copies into one folder). | | ParseErrors | Problems in that record (damaged attributes, fixup failures) that were skipped. |

Two columns carry most of the investigative value without any heuristics: ZoneIdContents, which tells you a file came from the internet and often from which URL, and InUse = False, which lists deleted files whose records survive (what is left of them).

Spotting timestomping with SI<FN and uSecZeros

These three flags are where analysts over-read MFTECmd most often. Here is what the code actually does:

  • SI<FN is True when the $FILE_NAME created time differs from the $STANDARD_INFORMATION created time and the $STANDARD_INFORMATION one is earlier. Tools that backdate a file through SetFileTime change $STANDARD_INFORMATION only, so the copy in $FILE_NAME stays at the real creation time. Only the created timestamps are compared, and only against the $FILE_NAME attribute on that row.
  • uSecZeros is True when the milliseconds part of the $STANDARD_INFORMATION created time or modified time is zero. NTFS stores time in 100-nanosecond units, and timestomping tools that take a whole-second value leave the sub-second part at zero. Note what the check does not look at: digits below the millisecond. A genuine timestamp such as 12:04:31.0004817 has a millisecond value of 0 and trips the flag, so on any large volume roughly one record in five hundred is flagged by chance. Read the full seven-digit value before you call it.
  • Copied is True when the $STANDARD_INFORMATION modified time is earlier than its created time. That is the normal signature of a file copied from elsewhere (the copy gets a new created time but keeps the source's modified time), and of files extracted from many archive formats. It is a provenance hint, not an anomaly.

The pattern worth escalating is the combination: SI<FN = True and a Created0x10 whose seven sub-second digits are all zero, on a file in a place where you would not expect installer or archive activity. Then confirm with an independent source: the $LogFile output (MFTECmd decodes $STANDARD_INFORMATION timestamp changes with their previous values) or the $J records for the same entry. The four MFT timestamps covers why the two attributes diverge in normal use, and NTFS anti-forensics covers the tools that defeat these checks by also rewriting $FILE_NAME.

A quick filter in PowerShell, keeping only live records with the escalation pattern:

Import-Csv .\host1_mft.csv |
  Where-Object { $_.InUse -eq 'True' -and $_.'SI<FN' -eq 'True' -and $_.Created0x10 -match '\.0000000$' } |
  Select-Object EntryNumber, SequenceNumber, ParentPath, FileName, Created0x10, Created0x30

The \.0000000$ match depends on the default --dt format with seven fractional digits.

The browser parser on this site uses different rules for the same idea, which makes it a useful second opinion. It compares the $STANDARD_INFORMATION created time against every $FILE_NAME attribute in the record (long name, DOS name and hard links), checks the full 100-nanosecond fraction rather than the milliseconds, raises a separate "timestomp likely" observation only when both conditions hold, and flags records where all four $STANDARD_INFORMATION times are whole seconds. Load the same $MFT there, find the file from the MFTECmd row, open its record, and the Observations panel shows which rule fired.

MFTECmd with KAPE and Timeline Explorer

KAPE ships MFTECmd modules, so collection and parsing can be one command. The MFTECmd compound module runs the $MFT, $J, $LogFile, $Boot, $SDS and $I30 modules; MFTECmd_$MFT runs only the $MFT one; !EZParser runs all of Eric Zimmerman's parsers. Collect and parse in one go:

kape.exe --tsource C: --target FileSystem --tdest E:\triage\tout --msource E:\triage\tout --module MFTECmd --mdest E:\triage\mout

The modules expect MFTECmd.exe in KAPE's Modules\bin folder; each module definition carries the official download URL.

Open the resulting CSV in Timeline Explorer, which knows MFTECmd's column layout. Useful moves there: group by ParentPath to see a directory at a time, filter InUse to False for deleted records, and add a column filter on SI<FN or ZoneIdContents (not empty) to get the short lists above.

For the change journal, give MFTECmd the $MFT from the same collection so paths resolve:

MFTECmd.exe -f "E:\triage\C\$Extend\$J" -m "E:\triage\C\$MFT" --csv "E:\out"

With -m, MFTECmd rewinds the journal from newest to oldest to give each record the path its parent had at the time, so files in directories that were later renamed or deleted still get a real path. Building an MFT timeline shows how to merge the two outputs into one sequence of events.

MFTECmd vs MFT Explorer

MFT Explorer is Eric Zimmerman's GUI for the same parsing code. It loads a $MFT into a folder tree, shows each record's attributes and a hex view, and is the better tool for poking at one record or one directory. MFTECmd is the tool for everything else: it is scriptable, it handles the other metadata files, it produces the CSV that the rest of the toolchain expects, and it is far quicker on a large table because it does not build an interactive tree. Most analysts batch-parse with MFTECmd and open MFT Explorer, or use --de, when one record needs a closer look.

For how MFTECmd compares with analyzeMFT, the Rust mft crate and Sleuth Kit, see MFT parser tools compared.

Without Windows: open the same $MFT in the browser

If you are on a Mac, a locked-down workstation, or just want a second parser's view before you commit to a finding, drop the $MFT on the MFT viewer. It parses the file on your machine with the Rust mft crate compiled to WebAssembly (nothing is uploaded), shows records in a searchable table and a folder tree, decodes each record's attributes and raw bytes, and exports CSV. Search for the file name from the MFTECmd row to land on the same record.

Open a $MFT file in your browser →

Frequently asked questions

Is MFTECmd free?

Yes. It is open source under the MIT licence, and the source is on GitHub at EricZimmerman/MFTECmd.

Does MFTECmd run on Linux or macOS?

Yes. Install the .NET 10 runtime and run dotnet MFTECmd.dll from the .NET 10 build. The .NET Framework build is Windows-only. Use single quotes around paths that contain $.

Why are the Created0x30 columns empty?

By design. MFTECmd fills the $FILE_NAME (0x30) timestamp columns only when they differ from the $STANDARD_INFORMATION (0x10) values. Run with --at to fill them on every row.

Does SI<FN = True mean the file was timestomped?

No. It means the $STANDARD_INFORMATION created time is earlier than the $FILE_NAME one. Installers, archive extractors and copy tools that preserve timestamps produce the same result. Treat it as a lead and confirm with $LogFile or $J.

Why does MFTECmd show more rows than there are files?

A record gets one row per $FILE_NAME it holds that is not a DOS short name (so hard links appear more than once), plus one row per alternate data stream for each of those names. Add --sn and the 8.3 names appear as rows too.

Can MFTECmd recover deleted files?

It lists them (InUse = False) with names, paths, sizes and timestamps, and --dr saves the contents of small deleted files that were stored inside the record. For larger files the record only tells you where the clusters were; see recovering deleted files on NTFS.

Further reading