File & folder access
Master File Table ($MFT)
$MFT cheat sheet: FILE records, $SI vs $FN timestamps, resident data, deleted records, sequence numbers, timestomping checks and MFTECmd parsing.
- Location
- C:\$MFT
- Proves
- A file or folder existed at a path, with its sizes, timestamps and (often) deletion
- Timestamps
- $SI and $FN each hold four FILETIME values (MACB), UTC, 100 ns resolution; access time may be disabled or delayed up to 1 hour
- Retention
- Freed records are reused, so deleted-file metadata lasts from minutes on busy drives to years on quiet volumes; the table never shrinks
- Access
- Administrator; not openable via the Windows API: collect via raw NTFS (KAPE, Velociraptor, FTK Imager) or a disk image
- Type
- File / file system
- Windows
- XPVista / 78 / 8.11011
- KAPE target
- $MFT
- Velociraptor
- Windows.Triage.Targets:$MFT
Tools
Compare all toolsWhat it is
The Master File Table is the central metadata file of every NTFS volume. Each file and directory, including the NTFS system files themselves, is described by at least one FILE record, normally 1,024 bytes long. A record holds a header and a list of attributes: $STANDARD_INFORMATION ($SI), one or more $FILE_NAME ($FN), $DATA, and for directories the $I30 index attributes. Because it describes the whole volume, the $MFT is usually the first file-system artifact parsed in a case and the backbone of any file-system timeline.
Location
| Windows version | Path | Notes |
|---|---|---|
| XP to 11 (any NTFS volume) | <volume root>\$MFT | Record 0 of the volume; hidden, locked by the file system |
| XP to 11 | <volume root>\$MFTMirr | Record 1: copy of the first four records only, not a backup of the table |
The first records are fixed: 0 $MFT, 1 $MFTMirr, 2 $LogFile, 3 $Volume, 5 root directory, 6 $Bitmap, 7 $Boot, 9 $Secure, 11 $Extend (which holds $UsnJrnl among others). Every attached NTFS volume, including USB drives, has its own $MFT.
What it proves
- Existence and path: a file or folder existed with this name inside this parent directory, including files that are now deleted, as long as the record has not been reused.
- Timeline: two sets of four timestamps per file (see below), plus sizes and attributes.
- Deletion: a record whose in-use flag is cleared describes a deleted file; the metadata stays readable until the record is reallocated.
- Small file contents: resident data lets you recover the full content of small files (scripts, notes,
Zone.Identifierstreams) straight from the record. - Timestamp manipulation: $SI/$FN mismatches and zeroed sub-second values point to timestomping.
- It does not prove execution, who created the file, or that a user opened it. Ownership comes from $Secure:$SDS; history comes from the USN journal.
Key fields
| Field | Meaning |
|---|---|
| Signature | FILE for a valid record (BAAD marks a record that failed verification) |
| Entry number | Position of the record in the table; with the sequence number it forms the file reference |
| Sequence number | Incremented each time the record is reused; a mismatch with a stored reference means the original file is gone |
| Flags | 0x01 in use, 0x02 directory; flag cleared = deleted record |
$LogFile sequence number (LSN) | Last transaction in $LogFile that touched the record |
$STANDARD_INFORMATION | Four timestamps, DOS attributes, Security ID (index into $Secure), USN of the last change |
$FILE_NAME | Name, parent directory reference, four timestamps, sizes; a file can have several (long name, 8.3 short name, hard links) |
$DATA | Resident content (small files) or data runs pointing to clusters; named $DATA streams are alternate data streams |
Timestamps
Both $SI and $FN hold four FILETIME values in UTC, 100-nanosecond resolution: created, modified, record changed, accessed (MACB).
| Timestamp | Set when | Format | Pitfalls |
|---|---|---|---|
| $SI created / modified / record changed | File creation, content change, metadata change | FILETIME, UTC | Settable from user mode with SetFileTime, so the easiest target for timestomping |
| $SI accessed | Read access | FILETIME, UTC | Disabled by default on Vista to Windows 10 1709 (NtfsDisableLastAccessUpdate); since 1803 the value is "system managed" and may be on or off. Even when enabled, NTFS can delay the on-disk update by up to one hour |
| $FN timestamps | Mostly when the name is created: file creation, copy, move to another volume, and some renames | FILETIME, UTC | Not kept in sync with $SI; they can lag by hours, so a difference alone is not proof of tampering |
| Copied file | Copy creates a new "created" time but keeps the source's "modified" time | FILETIME, UTC | Modified earlier than created is normal for copies, not tampering |
Check the access-time setting under HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisableLastAccessUpdate: 1 means disabled on older builds; 0x80000000–0x80000003 are the newer user/system-managed values (odd = disabled).
Retention and clearing
- The table grows but does not shrink. Freed records are reused for new files, so deleted-file metadata survives for an unpredictable time: minutes on a busy system drive, years on a quiet data volume.
- When a record is reused its sequence number increments; references in
$I30slack, the USN journal or LNK files that carry the old sequence number point to the previous file. - Wiping tools overwrite content but often leave renamed or zeroed records behind; secure deleters such as
sdeleterename files repeatedly before deleting, which shows up as bursts of rename entries in the USN journal. - Formatting a volume creates a new
$MFT; old records may still be carved from unallocated space.
Collection
- KAPE target:
$MFT(also included in theFileSystemcompound target) - Velociraptor (
Windows.Triage.Targets):$MFT - Built-in:
$MFTcannot be opened through the Windows API. Use a raw-NTFS tool (KAPE, Velociraptor, FTK Imager) or a disk image. Built-in commands only give live context:
fsutil fsinfo ntfsinfo C:
fsutil behavior query disablelastaccess
reg query "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate
fsutil fsinfo ntfsinfo shows the bytes per FILE record and the current $MFT size.
Parsing tools
- MFTECmd (Eric Zimmerman):
MFTECmd.exe -f E:\C\$MFT --csv E:\outproduces one row per record with $SI and $FN times,InUse,SI<FN,uSecZeros,Copied,SecurityIdand residentZone.Identifiercontents.--de 5dumps one record;--bodywrites a bodyfile;--rsrecovers records from slack. - Velociraptor:
Windows.NTFS.MFTparses the live or offline table;Windows.Timeline.MFTadds anomaly flags;Windows.NTFS.Recoverextracts a deleted file by record number. - dfir_ntfs (Maxim Suhanov, open source):
ntfs_parser --mftexports records to CSV;--all-mftworks on a raw image. - The Sleuth Kit:
istat,fls -randicatinspect records and recover resident or unallocated files from an image. - Plaso: the
mftparser feeds every $SI and $FN timestamp into a super timeline.
Investigation tips
- Filter on
SI<FN= true anduSecZeros= true: a $SI creation time earlier than the $FN creation time, with.0000000fractions, is the classic timestomping pattern. Confirm with the USN journal (BasicInfoChange) and $LogFile before reporting it. - Sort by parent path and $FN created time to find everything dropped together, for example a folder of tools extracted under
\ProgramData\. - Use deleted records (
InUse= false) with the parent reference to rebuild what a staging directory contained before cleanup. - Read resident
Zone.Identifierstreams in the output: they reveal download origin URLs even when the browser history is gone. See Zone.Identifier. - Parse the
$I30of key directories as well: index slack keeps names of files whose records were already reused. - Always record the
NtfsDisableLastAccessUpdatevalue before interpreting access times.
Related artifacts
- USN Journal ($UsnJrnl:$J)USN journal cheat sheet: $UsnJrnl:$J and $Max, record fields, reason flags, parent references, default size, rollover, fsutil and MFTECmd parsing.
- $LogFile (NTFS transaction log)$LogFile cheat sheet: NTFS metadata journal (MFT record 2), 64 MB default, redo/undo operations, restart area, short retention and parsers.
- $I30 index attributes$I30 cheat sheet: NTFS directory indexes ($INDEX_ROOT, $INDEX_ALLOCATION), INDX records, timestamps, slack entries of deleted files and parsers.
- $Secure:$SDS security descriptors$Secure:$SDS cheat sheet: NTFS security descriptor store, $SDH and $SII indexes, Security ID in $SI, file owner SID and ACLs, collection and MFTECmd.
- Zone.Identifier (Mark of the Web)Zone.Identifier cheat sheet: Mark of the Web ADS, ZoneId 0 to 4, ReferrerUrl and HostUrl per browser, loss and bypass cases, and collection from the $MFT.
- Recycle BinRecycle Bin cheat sheet: $Recycle.Bin $I and $R files, $I version 1 vs 2, XP INFO2, deletion time, original path and size, emptying and Shift+Delete traces.
Glossary terms
- Master File Table (MFT)The NTFS metadata index, stored as `$MFT`, holding one record per file and directory on a volume.
- $STANDARD_INFORMATION vs $FILE_NAMEThe two NTFS attributes that each hold a set of MACB timestamps; comparing them is a core technique for detecting timestomping.
- TimestompingAn anti-forensic technique that alters a file's timestamps to hide when it was created, modified, or accessed.
- Resident dataFile content small enough to be stored directly inside its NTFS MFT record instead of in separate clusters on the volume.
- MFT file reference numberThe 64-bit NTFS identifier of a file: a 48-bit MFT entry number plus a 16-bit sequence number that changes each time the entry is reused.