Most intrusion timelines are only as good as the analyst's understanding of the file system underneath them. Tools will happily parse a Master File Table or an ext4 inode table and print timestamps, but they will not tell you which of those timestamps an attacker can change, which ones survive deletion, or why an APFS volume may still hold an older copy of a file you were told was gone. This guide covers the three file systems responders meet most often: NTFS on Windows, APFS on macOS and iOS, and ext4 on Linux servers and appliances. It is written for DFIR practitioners, SOC analysts who triage hosts, and engineers who build forensic readiness into their estate, and it goes deeper than the general Digital Forensics (DFIR) Guide on the structures themselves.
Key takeaways
- Know which metadata is user writable. On NTFS the $STANDARD_INFORMATION timestamps can be set through normal APIs, while the $FILE_NAME copies are harder to alter, so comparing the two is a basic timestomping check.
- Journals outlive the files they describe. The NTFS USN change journal, the NTFS $LogFile and the ext4 jbd2 journal can record creation, rename and deletion events long after the file itself has gone.
- Copy on write changes the recovery question. APFS never modifies objects in place, so older object versions, checkpoints and snapshots may still exist until their blocks are reused.
- Deletion behaviour differs sharply by file system. NTFS marks MFT entries free and may reuse them, ext4 records a deletion time in i_dtime, and SSD TRIM can remove the underlying data quickly on all three.
- Collection decisions are made before analysis. Imaging the full volume, including journals, unallocated space and snapshots, is what makes the file system analysis in this guide possible at all.
Why file system analysis still matters
Telemetry has retention limits, agents get disabled, and some hosts never had an agent. The file system is the record that is always there.
NIST SP 800-86, the Guide to Integrating Forensic Techniques into Incident Response, frames forensics from an IT rather than a law enforcement perspective and treats files and operating systems as primary data sources. File system analysis delivers three things other sources often cannot:
- Existence: proof that a file was present on a volume, even if it was later deleted.
- Sequence: ordering of creation, modification, rename and deletion events, often to sub-second precision.
- Provenance: where a file came from, for example the parent directory, the owning user or a download marker stored alongside it.
For acquisition method and write blocking, see the Disk Imaging and Forensic Acquisition Guide. For OS level artefacts that sit on top of the file system, such as Prefetch, Amcache and the registry, see the Windows Forensic Artefacts Guide.
NTFS: the Master File Table and its attributes
Microsoft documents the MFT as a file on each NTFS volume with at least one entry for every file, including the MFT itself. All information about a file, including its size, timestamps, permissions and data content, is stored either in MFT entries or in space outside the MFT that those entries describe. When files are deleted, their MFT entries are marked as free and may be reused, but the MFT does not shrink. That last point is the reason unallocated MFT entries are such a productive place to look for deleted file names and metadata.
Attribute types that matter in investigations
Each MFT entry is a set of attributes. Microsoft's attribute record header documentation lists the type codes below. Attributes are either resident, meaning the value sits inside the file record itself, or nonresident, meaning the record holds a mapping pairs array that points to clusters elsewhere on disk.
| Attribute (type code) | What it holds | Forensic use |
|---|---|---|
| $STANDARD_INFORMATION (0x10) | File attributes, timestamps such as creation and last modified, hard link count | The timestamps most tools display; writable through standard Windows APIs |
| $ATTRIBUTE_LIST (0x20) | List of attributes and the MFT records that hold them | Reconstructing heavily fragmented or very large files |
| $FILE_NAME (0x30) | The file name in Unicode, plus its own copy of timestamps and the parent directory reference | Second set of timestamps for comparison; parent reference rebuilds paths of deleted files |
| $OBJECT_ID (0x40) | 64 byte identifier assigned by the link tracking service | Correlating files with shortcut (LNK) and jump list artefacts |
| $DATA (0x80) | File contents; a file can have additional named $DATA streams | Content recovery; named streams (alternate data streams) can hide data or carry download markers |
| $INDEX_ROOT (0x90) and $INDEX_ALLOCATION (0xA0) | Directory index structures for file name allocation | Slack inside directory indexes can retain entries for deleted files |
| $REPARSE_POINT (0xC0) | Reparse point data | Identifies junctions, symbolic links and cloud placeholder files |
Small files can be stored entirely as a resident $DATA attribute inside the MFT record. In practice that means a short script, a ransom note or a configuration file may be recoverable directly from an MFT entry even after its clusters, if any, were overwritten.
Timestamps and timestomping
NTFS keeps four timestamps (created, modified, MFT entry changed, accessed) in $STANDARD_INFORMATION and another four in each $FILE_NAME attribute. The $STANDARD_INFORMATION values can be changed by any process with write access using ordinary API calls, which is what MITRE ATT&CK describes as T1070.006 Timestomp. The $FILE_NAME values are maintained by the file system driver and are normally only updated on events such as creation, rename or move. Practical checks:
- Ordering anomaly: $STANDARD_INFORMATION created earlier than $FILE_NAME created is a common red flag, because a real file usually gets both at the same moment.
- Precision anomaly: NTFS timestamps carry 100 nanosecond resolution. Values with the sub-second part set to exactly zero across several files suggest a tool set them.
- Journal disagreement: a USN record showing FILE_CREATE at a time that does not match the displayed creation time is strong evidence of manipulation.
Treat these as indicators, not proof. Legitimate software installers, archive extraction and file copies across volumes can also produce unusual combinations, so confirm with a second source before reporting.
NTFS journals: USN change journal and $LogFile
Microsoft describes the update sequence number (USN) change journal as a per volume record that NTFS updates whenever any file or directory changes, with a description of the change and the name of the file. Each journal has an unsigned 64 bit identifier and can be created, deleted and re-created by administrators. In an image, the journal is found under the $Extend directory as $UsnJrnl, with the records held in the $J stream.
Each USN_RECORD_V2 carries the fields an investigator needs: FileReferenceNumber and ParentFileReferenceNumber (to rebuild paths), Usn, TimeStamp, Reason, SourceInfo, SecurityId, FileAttributes and the FileName. The Reason field is a bit mask; a single record often combines several flags.
| Reason flag | Value | Typical investigative meaning |
|---|---|---|
| USN_REASON_FILE_CREATE | 0x00000100 | Tool or payload dropped; staging archive created |
| USN_REASON_FILE_DELETE | 0x00000200 | Clean-up after execution; evidence removal (ATT&CK T1070.004 File Deletion) |
| USN_REASON_RENAME_OLD_NAME / RENAME_NEW_NAME | 0x00001000 / 0x00002000 | Masquerading, or ransomware appending an extension |
| USN_REASON_DATA_OVERWRITE / DATA_EXTEND / DATA_TRUNCATION | 0x00000001 / 0x00000002 / 0x00000004 | Content changes; mass overwrite is a ransomware encryption pattern |
| USN_REASON_BASIC_INFO_CHANGE | 0x00008000 | Attribute or timestamp change; pair with timestomp checks |
| USN_REASON_NAMED_DATA_EXTEND | 0x00000020 | Data written to a named stream (alternate data stream) |
| USN_REASON_SECURITY_CHANGE | 0x00000800 | Permission change on a file or folder |
| USN_REASON_CLOSE | 0x80000000 | Final record when the handle closes, summarising changes |
The journal is size bounded. The fsutil documentation explains that NTFS trims it at the next checkpoint when its size exceeds the maximum size plus allocation delta, so on a busy server the window may be only days. On a live system, fsutil usn queryjournal C: shows the journal ID, first and next USN and capacity, which tells you how far back the records reach before you collect. A journal that was deleted, or whose identifier changed recently, is itself a finding: fsutil usn deletejournal exists and attackers know it.
$LogFile is the NTFS transaction log used for metadata recovery after a crash. It is much smaller and rolls over faster than the USN journal, but it can hold fragments of MFT records and index entries for very recent operations.
ext4: inodes, timestamps and the jbd2 journal
The Linux kernel documentation is the primary reference for ext4 on-disk structures. Points that matter most in an investigation:
- Inode size: ext4 inode records default to 256 bytes, against 128 bytes in ext2 and ext3. The extra space holds extended timestamp fields and in-inode extended attributes.
- Timestamps: i_atime, i_ctime, i_mtime and i_dtime are 32 bit seconds since the Unix epoch. In larger inodes, the *_extra fields add two bits to extend the seconds range and 30 bits of nanoseconds. i_dtime is not widened.
- Creation time: i_crtime records the file creation (birth) time. The kernel documentation notes that debugfs reports it; current coreutils stat can show it as "Birth" where the kernel exposes it through statx.
- Deletion time: i_dtime records when an inode was deleted. For orphan inodes (unlinked while still open) on file systems without the orphan_file feature, the same field is reused as a link to the next orphan, with s_last_orphan in the superblock pointing to the first.
- Special inodes: inode 2 is the root directory, inode 8 is normally the journal, and inode 11 is usually lost+found (the first non-reserved inode, as set by s_first_ino).
A cluster of inodes with i_dtime values in a short window is a reliable sign of bulk deletion, for example an attacker removing a toolkit from /tmp or /dev/shm. Inodes still on the orphan list at acquisition time point to files that were deleted but held open, which is a classic pattern for malware that removes its own binary after launch. On a live host, those files can often be recovered from /proc/<pid>/exe or /proc/<pid>/fd before shutdown; see the Linux Forensics Guide for live response order.
The jbd2 journal
ext4 journals through jbd2. In the default data=ordered mode only metadata is journaled; data=journal logs data as well; data=writeback does not flush data before metadata commits. The journal holds descriptor blocks (type 1) that give the final disk locations of the blocks that follow, commit blocks (type 2) that mark a complete transaction, and revocation blocks (type 5) that stop replay of blocks freed and reused. Because the journal holds copies of metadata blocks such as inode table blocks and directory blocks, older copies of an inode, including its pre-deletion block or extent pointers, can sometimes be recovered from it. File systems created with fast commits store smaller metadata deltas instead, which can reduce what remains.
Deleted file recovery on ext4 is harder than on NTFS because the extent information in the inode is typically cleared on deletion. Journal analysis and file carving from unallocated blocks are the main options, which is why acquiring the full block device matters.
APFS: containers, copy on write and snapshots
Apple's File System Reference describes a model that differs in kind from NTFS and ext4. A partition holds one container, which provides space management and crash protection. A container holds multiple volumes that share free space, so a single container image may contain the System, Data, Preboot, Recovery and VM volumes of a Mac.
- Copy on write: objects on disk are never modified in place; modified copies are always written to a new location. Superseded copies remain until the space manager reuses their blocks.
- Checkpoints: the container superblock is copied at block zero, but the reference states that you use the block zero copy only to find the checkpoints, then use the latest valid checkpoint for everything else. Older checkpoints in the checkpoint descriptor area can expose earlier container states.
- Object map: virtual objects are located by a key of object identifier and transaction identifier. To read an object as it was at a given transaction, you take the entry with the largest transaction identifier less than or equal to the target.
- Snapshots: snapshots are recorded in a tree keyed by transaction identifier, with flags for deleted and reverted snapshots. Local Time Machine snapshots and system update snapshots can hold files that were deleted from the live volume.
- Encryption: the container keybag and volume keybags hold wrapped keys. On Apple silicon and T2 Macs the Data volume is encrypted by default, so a physical image without the user password, recovery key or a live unlocked collection may yield metadata structures but not readable file content.
APFS inode records carry creation, modification, change and access times as 64 bit nanosecond values, which gives very fine ordering. The practical consequence for responders is that collection on macOS often happens logically from a live, unlocked system rather than through a classic physical image. See the macOS Forensics Guide for collection options and unified log analysis.
Comparing the three file systems
| Question | NTFS | ext4 | APFS |
|---|---|---|---|
| Core metadata structure | Master File Table entries with typed attributes | Inode table per block group, 256 byte default inodes | B-trees of file system records, located through the object map |
| Creation time stored | Yes, in $STANDARD_INFORMATION and $FILE_NAME | Yes, i_crtime in larger inodes | Yes, in the inode record |
| Timestamp resolution | 100 nanoseconds | Nanoseconds with extra fields; seconds for i_dtime | Nanoseconds |
| Change history source | USN journal ($UsnJrnl:$J), $LogFile | jbd2 journal (metadata blocks in ordered mode) | Checkpoints, object map history, snapshots |
| Deleted file metadata | Free MFT entries often retain names, timestamps and runs until reused | i_dtime set; extent pointers usually cleared | Older object versions until blocks are reused |
| Hidden data locations | Alternate data streams, MFT and index slack | Extended attributes, unallocated inodes | Extended attributes, deleted snapshots |
| Main recovery barrier | Entry reuse, TRIM on SSD | Cleared extents, TRIM | Encryption, TRIM, block reuse |
How to run a file system investigation
- Decide scope and preserve first. Before touching the host, record the volume layout and encryption state. On Windows, run
fsutil usn queryjournalon each volume to capture the journal ID and range; on macOS list local snapshots; on Linux record mount options, including whether the file system was mounted with discard (online TRIM). - Acquire at the right level. Prefer a full physical or logical volume image that includes unallocated space, journals and snapshots. If encryption forces a live logical collection, collect $MFT, $UsnJrnl:$J, $LogFile and $Extend contents on Windows as raw files, and document why a full image was not possible. Hash every item and record it in the chain of custody; see the Evidence Handling and Chain of Custody Guide.
- Parse metadata, not just the live tree. Parse every MFT entry, including unallocated ones, every inode including those with i_dtime set, and every reachable APFS object version. A directory listing from a mounted image misses most of what this guide describes.
- Build a merged timeline. Combine MFT timestamps, USN records, inode times and OS artefacts into one sorted timeline. The Forensic Timeline Analysis Guide and the Plaso Guide cover the mechanics.
- Test anomalies against a second source. For every suspicious timestamp, check the $FILE_NAME copy, the USN journal, the jbd2 journal or a snapshot. Record both values in your notes.
- Validate tools on known data. Before relying on a parser for a new Windows build, macOS version or ext4 feature (such as orphan_file or fast commits), run it against a test image you created and check the output by hand.
- Report with confidence levels. State which conclusions rest on a single artefact and which are corroborated, and note any gap caused by journal roll over or TRIM.
Detection, readiness and measurement
File system forensics is also a source of detections and a readiness discipline. Useful monitoring signals:
- Journal tampering: process creation events for
fsutil usn deletejournal, and USN journal ID changes between collections. - Recovery inhibition: deletion of Volume Shadow Copies or snapshots, mapped in ATT&CK as T1490 Inhibit System Recovery, often precedes ransomware encryption.
- Stream abuse: writes to named data streams outside expected applications, related to T1564.004 NTFS File Attributes.
- Bulk change bursts: high rates of rename and overwrite events on file servers, which also feed ransomware detection.
Metrics that show the capability is working:
- USN journal coverage in days on critical servers, measured monthly with
fsutil usn queryjournaland compared with your incident detection lag. - Percentage of in-scope hosts where a full volume image can be taken without user credentials (recovery keys escrowed).
- Median time from incident declaration to verified, hashed file system evidence for a priority host.
- Number of parser validation tests run per quarter against new OS releases.
- Proportion of reported timeline findings corroborated by at least two independent artefacts.
Where journals are too small for your detection lag, increasing the maximum size with fsutil usn createjournal is a low cost readiness change. Test it on a pilot group first, monitor disk use, and roll back by setting the previous values. The Forensic Readiness Guide covers retention planning.
Where identity fits
File system evidence answers what happened on a disk; identity evidence answers who or what did it. NTFS records SecurityId in USN records and owner information through security descriptors, and ext4 inodes carry user and group IDs. In many intrusions those IDs belong to service accounts, scheduled task principals or automation users rather than people. Mapping file system owners back to the accounts that ran them, and checking whether those non-human identities should ever write to that path, often turns a file timeline into an account compromise finding. The Identity Incident Response Playbook covers that next step.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | RS.AN-03 | Analysis establishes what took place and the root cause |
| NIST CSF 2.0 | RS.AN-06 | Investigation actions recorded with integrity and provenance preserved |
| NIST SP 800-53 Rev. 5 | IR-4 Incident Handling | Forensic analysis within incident handling |
| NIST SP 800-53 Rev. 5 | AU-8 Time Stamps, AU-11 Audit Record Retention | Reliable clocks and retention that make timelines usable |
| MITRE ATT&CK | T1070.006, T1070.004, T1564.004, T1490, T1485 | Techniques that file system analysis detects or explains |
Common failure patterns
- Trusting displayed timestamps. Reporting $STANDARD_INFORMATION times without checking $FILE_NAME or the USN journal lets a simple timestomp rewrite the story.
- Collecting too late. Waiting days to image a busy file server lets the USN journal roll over and TRIM clear deleted blocks, removing the most useful evidence.
- Imaging only the live tree. Copying files or exporting a mounted view loses unallocated MFT entries, deleted inodes, journals and snapshots.
- Ignoring encryption until the image is taken. Imaging an encrypted APFS or BitLocker volume without keys produces a large file with little readable content; escrow and live collection must be planned beforehand.
- Running unvalidated parsers. New OS releases and file system features change structures; a parser that silently skips records produces a confident but incomplete timeline.
- Analysing on the evidence host. Running tools on the suspect system writes to the very journals you need, overwriting older records.
Practitioner checklist
- Record volume layout, encryption state and USN journal ID and range before any collection.
- Acquire full volumes, including unallocated space, journals and snapshots, and hash every item.
- Parse all MFT entries and inodes, allocated and unallocated, not just the mounted tree.
- Compare $STANDARD_INFORMATION with $FILE_NAME timestamps for every file of interest.
- Extract USN journal records and map Reason flags to create, rename, overwrite and delete events.
- Check ext4 i_dtime clusters and the orphan list, and recover open deleted files from /proc before shutdown.
- Enumerate APFS snapshots and older checkpoints where the container is accessible.
- Escrow BitLocker and FileVault recovery keys so encrypted volumes can be examined.
- Size USN journals on critical servers to exceed your typical detection lag.
- Validate parsers on test images whenever an OS or file system version changes.
Standards and references
- NIST: SP 800-86 Guide to Integrating Forensic Techniques into Incident Response
- Microsoft: Master File Table
- Microsoft: ATTRIBUTE_RECORD_HEADER structure
- Microsoft: Change Journals
- Microsoft: USN_RECORD_V2 structure
- Linux kernel documentation: ext4 Index Nodes
- Linux kernel documentation: ext4 Journal (jbd2)
- Apple: Apple File System Reference
Related NHI Mgmt Group resources: Digital Forensics (DFIR) Guide · Windows Forensic Artefacts Guide · Anti-Forensics Detection Guide · Memory Forensics Guide