Analyzing MFT for Deleted File Recovery
Analyze the NTFS Master File Table ($MFT) to recover metadata and content of deleted files by examining MFT record
What Is This
"Analyzing MFT for Deleted File Recovery" is a forensic technique focused on extracting and interpreting metadata and content of deleted files from the NTFS Master File Table ($MFT). NTFS, the default file system for Windows, uses the $MFT as its core metadata structure. Every file and directory is represented by a 1024-byte record in the $MFT, containing critical attributes such as:
- $STANDARD_INFORMATION: Timestamps, permissions, and file attributes
- $FILE_NAME: Filename, parent directory reference, and additional timestamps
- $DATA: Content of the file or pointers to its data clusters
- $LogFile and $UsnJrnl: Journals that record file system activities, including create, modify, and delete operations
When a file is deleted, only its directory entry is removed and its corresponding $MFT record is marked as "not in use." The metadata and, sometimes, file content remain intact in the $MFT or in unallocated disk space until overwritten. By analyzing the $MFT, along with $LogFile, $UsnJrnl, and slack space within $MFT records, forensic analysts can recover deleted file metadata and reconstruct file system events.
Why Use It
Analyzing the $MFT for deleted file recovery is a cornerstone of digital forensics and incident response. Here are the main reasons for using this skill:
- Evidence Recovery: Deleted files often contain crucial evidence for security investigations, legal proceedings, or compliance checks. The $MFT allows analysts to recover file metadata even after deletion.
- Timeline Reconstruction: Each $MFT record stores multiple timestamps (creation, modification, access, and entry modification), enabling forensic reconstruction of user and system activity.
- Detection of Anti-Forensics: Attackers may attempt actions like "timestomping" (manipulating file timestamps) to hide their activities. $MFT analysis can reveal inconsistencies and tampering.
- File System Integrity Analysis: By comparing $MFT data with other NTFS artifacts ($LogFile, $UsnJrnl), analysts can detect unauthorized changes and correlate file operations.
- DFIR (Digital Forensics and Incident Response): This skill is essential for responders dealing with compromised hosts, ransomware cases, or data exfiltration investigations.
How to Use It
To analyze the $MFT for deleted file recovery, follow these steps using specialized forensic tools:
1. Acquire the $MFT and Related Artifacts
- Use disk imaging tools (such as FTK Imager or dd) to create a forensic image of the NTFS volume.
- Extract the $MFT, $LogFile, and $UsnJrnl using tools like FTK Imager or TSK (
icat).
2. Parse and
Analyze the $MFT
Popular tools include:
MFTECmd (by Eric Zimmerman)
MFTECmd is a command-line utility that parses $MFT files and outputs detailed records, including deleted entries.
MFTECmd.exe -f "$MFT" --csv mft_output.csv --recoverDeleted-f "$MFT": Specifies the input $MFT file--csv: Outputs results in CSV format--recoverDeleted: Highlights deleted (inactive) records
analyzeMFT (Python-based)
analyzeMFT parses $MFT entries and can export results to CSV for further analysis.
python analyzeMFT.py -f $MFT -o mft_report.csv --recoverX-Ways Forensics
A commercial forensic suite with advanced $MFT parsing and visualization, including slack space analysis.
3. Examine Record Flags and
Metadata
Look for entries where the "InUse" flag is cleared (file deleted) but the metadata is still present. Key attributes to review:
- File name and path
- Timestamps: Created, Modified, Accessed, Entry Modified
- Parent directory reference
- File size
- Data attribute (resident content or cluster pointers)
4. Analyze Slack Space and
Journals
- MFT Slack Space: Sometimes, remnants of previous records or file content can be found in the unused portions of an MFT record.
- $LogFile and $UsnJrnl: These journals can provide additional context about file operations, including creation and deletion events.
5. Correlate with Other
Evidence
Cross-reference recovered metadata with other artifacts (event logs, registry entries, shadow copies) to build a comprehensive timeline or detect tampering.
When to Use It
- During incident response investigations involving unauthorized deletion or tampering of files
- When building detection rules for SIEM or EDR systems requiring insight into file deletions and recoveries
- For legal cases involving data destruction, intellectual property theft, or fraud investigations
- In security audits or compliance checks where proof of file presence or deletion is required
- In digital forensics labs and law enforcement investigations focused on Windows systems
Important Notes
- Overwriting Risk: Deleted file records and content may be overwritten at any time by the file system, reducing the likelihood of full recovery as time passes.
- Partial Recovery: While metadata is often preserved, actual file content may be recoverable only if data clusters have not been reused.
- Tool Limitations: Not all tools fully support every NTFS version or artifact. Always validate tool output and use multiple sources when possible.
- Legal Considerations: Ensure proper chain-of-custody procedures and documentation when handling forensic evidence.
- Anti-Forensic Techniques: Attackers may use secure deletion tools or manipulate timestamps, so always corroborate $MFT findings with additional evidence.
Analyzing the $MFT for deleted file recovery is a vital skill in the digital forensics toolkit, enabling practitioners to extract hidden evidence, reconstruct events, and strengthen investigations involving NTFS systems.
More Skills You Might Like
Explore similar skills to enhance your workflow
Analyzing Cloud Storage Access Patterns
Detect abnormal access patterns in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS
Finnish Humanizer
finnish-humanizer skill for programming & development
Team Composition Patterns
- Selecting the right agent type (subagenttype) for each role
Slack Gif Creator
Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives. This skill applies w
Frontend Testing Best Practices
Frontend Testing Best Practices automation and integration
GEO PDF Report Generator
tags: [geo, pdf, report, client-deliverable, professional]