πΎ On-Disk Structures, Metadata Allocation & Unallocated Residual Recovery
When an adversary, insider threat, or malware deletes a file from an operating system, the underlying data blocks are almost never instantly wiped or overwritten. Instead, modern operating systems modify metadata flags to unlink file references, marking previously allocated clusters as "free" or "unallocated" space available for future write operations. File System Forensics is the technical discipline of parsing low-level on-disk data structures to reconstruct past events, prove data provenance, track anti-forensic deletion attempts, and carve residual artifacts. In the Windows realm, the New Technology File System (NTFS) organizes all volume metadata within the Master File Table ($MFT), recording millisecond-precision timestamps across $STANDARD_INFORMATION and $FILE_NAME attributes while concealing hidden payloads in Alternate Data Streams (ADS). In the Linux domain, the Fourth Extended File System (EXT4) distributes storage across Block Groups, tracking file permissions, extents, and pointer chains inside Inodes while logging atomic transactions in the JBD2 Journal. Forensic investigators exploit these structural realities to recover evidence long after standard OS utilities report it gone.
NTFS VS. EXT4 ON-DISK PARTITION ARCHITECTURE:
1. WINDOWS NTFS (NEW TECHNOLOGY FILE SYSTEM) VOLUME LAYOUT:
ββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββ
β VBR / Boot Sector β Master File Table ($MFT) & System Metadata Filesβ General Data Cluster β
β Sector 0 (512B) β $MFT, $LogFile, $Volume, $Bitmap, $BadClust... β Storage Area (Files, β
β Cluster Size: 4 KB β Fixed 1024-byte record entries per inode/file β Directories, Streams) β
ββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββ
β’ Core Philosophy : "Everything on an NTFS volume is a file, including metadata itself ($MFT)."
β’ Addressing Unit : Logical Cluster Number (LCN) and Virtual Cluster Number (VCN).
β’ Transaction Log : $LogFile (Circular transaction logging) & $UsnJrnl (Update Sequence Number).
2. LINUX EXT4 (FOURTH EXTENDED FILE SYSTEM) VOLUME LAYOUT:
ββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ¬βββββββββββββββ
β Boot Sector Pad β BLOCK GROUP 0 β BLOCK GROUP 1 β BLOCK GROUP Nβ
β 1024 Bytes β Superblock | Group Descs... β Superblock Backup | ... β Data Blocks β
ββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββ΄βββββββββββββββ
β
βΌ (Internal Architecture of a single EXT4 Block Group)
βββββββββββββββββββ¬βββββββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ¬βββββββββββββββ
β Superblock β Group Descriptorsβ Block Bitmap β Inode Bitmap β Inode Table β Data Blocks β
β 1 Block (1024B) β Block allocationsβ 1 Block β 1 Block β Inode list β Actual file β
β Filesystem info β per group β Free/Used β Free/Used β (256B each) β data clustersβ
βββββββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ΄βββββββββββββββ
β’ Core Philosophy : Unix inode hierarchy decoupling file names (Directory Entries) from metadata (Inodes).
β’ Addressing Unit : Fixed Logical Blocks (typically 4096 bytes).
β’ Transaction Log : JBD2 (Journaling Block Device 2 - stored in reserved Inode #8).
FILE magic identifier, update sequence arrays, record allocation flags, and the variable-length attribute chain.
NTFS 1024-BYTE $MFT RECORD ENTRY STRUCTURE:
Offset (Hex) Length (Bytes) Field Description
ββββββββββββ ββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
0x00 - 0x03 4 Bytes Magic Header Bytes: "FILE" (0x46 0x49 0x4C 0x45) or "BAAD"
0x04 - 0x05 2 Bytes Offset to Update Sequence Array (Typically 0x0030)
0x06 - 0x07 2 Bytes Size of Update Sequence Array (S + 1)
0x08 - 0x0F 8 Bytes $LogFile Sequence Number (LSN)
0x10 - 0x11 2 Bytes Sequence Number (Increments each time record is reallocated)
0x12 - 0x13 2 Bytes Hard Link Count (Number of directory references to this file)
0x14 - 0x15 2 Bytes Offset to First Attribute (Typically 0x0038)
0x16 - 0x17 2 Bytes Flags: 0x01 = Allocated File | 0x00 = Deleted File
Flags: 0x03 = Allocated Directory | 0x02 = Deleted Directory
0x18 - 0x1B 4 Bytes Used Size of MFT Record (e.g., 0x000001E8 = 488 bytes used)
0x1C - 0x1F 4 Bytes Allocated Size of MFT Record (Always 0x00000400 = 1024 bytes)
0x20 - 0x27 8 Bytes File Reference to Base MFT Record (0 if base record)
0x28 - 0x29 2 Bytes Next Attribute ID
0x38 - End Variable VARIABLE ATTRIBUTE CHAIN:
βββ Attribute 0x10: $STANDARD_INFORMATION (Timestamps, DOS Flags)
βββ Attribute 0x30: $FILE_NAME (Namespace, Parent Directory Ref)
βββ Attribute 0x80: $DATA (File Contents / Extent Data Runs)
βββ End Marker : 0xFFFFFFFF (End of MFT Record Attributes)
$STANDARD_INFORMATION (0x10) timestamps against the kernel-protected $FILE_NAME (0x30) timestamps, detailing how to detect anti-forensic Timestomping attacks.
NTFS DUAL TIMESTAMP ARCHITECTURE (MACB ARTIFACT MATRIX):
Each MFT record contains TWO independent sets of 64-bit Windows FILETIME timestamps
(Count of 100-nanosecond intervals since January 1, 1601 UTC):
ββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β TIMESTAMP TYPE β $STANDARD_INFORMATION (0x10) β $FILE_NAME (0x30) β
ββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ€
β Accessibility β User Mode Accessible via Win32 API β Kernel Mode Protected (System Only) β
β β SetFileTime() function β Updated ONLY on create/rename/move β
ββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ€
β M: Modified Time β Last date/time content was altered β Last date/time content was altered β
β A: Accessed Time β Last date/time file was read/opened β Last date/time file was read/opened β
β C: MFT Changed β Last date/time MFT record modified β Last date/time MFT record modified β
β B: Birth / Createβ File creation date/time on volume β File creation date/time on volume β
ββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββ
TIMESTOMPING EXPLOITATION & FORENSIC TRIAGE:
Adversaries use tools like Meterpreter 'timestomp' to alter $STANDARD_INFORMATION timestamps,
making malicious binaries appear as if installed alongside Windows system files years earlier.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TIMESTOMPED INTRUSION ARTIFACT DETECTED: β
β File: C:\Windows\System32\malware.exe β
β β
β $STANDARD_INFORMATION (0x10): β
β β’ Created (B) : 2021-03-15 04:12:00.0000000 UTC (SPOOFED to match Windows OS install) β
β β’ Modified (M): 2021-03-15 04:12:00.0000000 UTC β
β β
β $FILE_NAME (0x30) - THE IMMUTABLE FORENSIC GROUND TRUTH: β
β β’ Created (B) : 2026-11-04 14:22:18.1092841 UTC (TRUE DROP TIME!) β
β β’ Modified (M): 2026-11-04 14:22:18.1092841 UTC β
β β
β TRIAGE ANOMALY: β
β 1. $STANDARD_INFO Created (2021) is 5 years EARLIER than $FILE_NAME Created (2026)! β
β 2. Sub-second precision zeroed out: 00.0000000 (Human APIs zero nanoseconds; kernel does not).β
β CONCLUSION: Confirmed Timestomping! True malicious file drop occurred on Nov 4, 2026. β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
$DATA (0x80) attribute. Contrasts Resident data (payload embedded directly inside the 1024-byte MFT record) with Non-Resident data runs, and illustrates how adversaries conceal tools inside Alternate Data Streams (payload.exe:hidden.vbs).
NTFS $DATA ATTRIBUTE (0x80) ALLOCATION ARCHITECTURE:
1. RESIDENT DATA (FILES SMALLER THAN ~700 BYTES):
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β’ If file content fits inside the available space of the 1024-byte MFT record: β
β β’ Non-Resident Flag at offset 0x08 = 0x00 (Resident). β
β β’ Content is stored directly within the MFT record itself! Zero external clusters allocated. β
β β’ Forensic Value: Even if the entire disk clusters are wiped, the file content remains fully β
β preserved inside the 1024-byte MFT entry! β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2. NON-RESIDENT DATA RUNS (FILES LARGER THAN ~700 BYTES):
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β’ Non-Resident Flag at offset 0x08 = 0x01 (Non-Resident). β
β β’ Data is stored in external clusters. The MFT stores compressed "Data Runs": β
β β
β Raw Data Run Hex Example: 0x32 0x01 0x20 0x05 0x40 0x12 β
β βββ Run Header: 0x32 (High nibble = 3 bytes offset | Low nibble = 2 bytes length) β
β βββ Length : 0x0120 = 288 clusters allocated to this run β
β βββ Offset : 0x124005 = Starting at Logical Cluster Number (LCN) 1,196,037 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
3. ALTERNATE DATA STREAMS (ADS) CONCEALMENT:
NTFS supports multiple data streams attached to a single file entry:
β’ Default stream: file.txt (Uniquely referenced as file.txt:$DATA)
β’ Hidden stream : file.txt:malware.exe (Concealed payload stream)
Command-Line Creation & Forensic Extraction:
$ type payload.exe > "C:\Users\Public\readme.txt:beacon.exe"
$ dir /r "C:\Users\Public\"
readme.txt 15 bytes
readme.txt:beacon.exe:$DATA 4,194,304 bytes <-- Large hidden stream revealed!
Execution bypass:
$ wmic process call create "C:\Users\Public\readme.txt:beacon.exe"
LINUX EXT4 INODE STRUCTURE (struct ext4_inode - 256 BYTES):
Offset (Hex) Length (Bytes) Field Description & Forensic Role
ββββββββββββ ββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
0x00 - 0x01 2 Bytes i_mode: File Type (Regular, Dir, Link) & POSIX Permissions
0x02 - 0x03 2 Bytes i_uid: Owner User ID (Lower 16 bits)
0x04 - 0x07 4 Bytes i_size_lo: File Size in bytes (Lower 32 bits)
0x08 - 0x0B 4 Bytes i_atime: Last Access Time (Unix Epoch 32-bit timestamp)
0x0C - 0x0F 4 Bytes i_ctime: Inode Status Change Time (Metadata change)
0x10 - 0x13 4 Bytes i_mtime: Last Data Modification Time
0x14 - 0x17 4 Bytes i_dtime: Deletion Time (CRITICAL: 0 if allocated; >0 if DELETED!)
0x18 - 0x19 2 Bytes i_gid: Group ID (Lower 16 bits)
0x1A - 0x1B 2 Bytes i_links_count: Hard Link Count (When reaches 0, blocks unlinked)
0x1C - 0x1F 4 Bytes i_blocks_lo: 512-byte block count allocated to file
0x20 - 0x23 4 Bytes i_flags: File flags (e.g. 0x80000 = EXT4_EXTENTS_FL)
0x28 - 0x63 60 Bytes i_block / EXT4 EXTENT TREE:
Maps file offsets directly to physical disk blocks!
EXT4 EXTENT TREE ARCHITECTURE (Up to 4 extents fit directly inside the inode!):
βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β Extent Header (12 Bytes)β eh_magic: 0xF30A (Magic) β eh_entries: Count of extents β
β β eh_max: Max capacity (4) β eh_depth: 0 = Leaf Node β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Extent Leaf 1 (12 Bytes)β ee_block: Logical block 0 β ee_len: 128 contiguous blocksβ
β β ee_start: Physical Block # 4,194,304 on disk partition β
βββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ
journal, ordered, writeback), descriptor blocks, commit transactions, and recovering deleted inodes from /journal (Inode #8) via ext4magic.
EXT4 JOURNALING BLOCK DEVICE (JBD2) FORENSIC TRANSACTION FLOW:
THE THREE EXT4 JOURNALING MODES:
1. data=journal : Full logging. Both file metadata AND data contents are written to journal
before being flushed to disk. Highest forensic recoverable artifact yield!
2. data=ordered : Default mode. File data is written to disk first; then metadata is logged
to journal. High metadata recovery rate.
3. data=writeback : Fast mode. Metadata changes are journaled, but data write order is not enforced.
JBD2 CIRCULAR RING-BUFFER ARCHITECTURE (INODE #8):
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β JOURNAL SUPERBLOCK (Magic: 0xC03B3998 | Block Size: 4096B | First Transaction Block: 1) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β TRANSACTION N: β
β βββ DESCRIPTOR BLOCK: Lists the filesystem blocks modified in this transaction. β
β βββ METADATA COPY : Contains snapshot of INODE and DIRECTORY ENTRY before deletion! β
β βββ COMMIT BLOCK : Invariant timestamp marking successful atomic commit. β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β TRANSACTION N+1 (The Deletion Transaction): β
β βββ Logs updated inode with i_dtime populated and links_count = 0. β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
HOW FORENSIC TOOLS (ext4magic) RECOVER DELETED FILES FROM THE JOURNAL:
Even if an attacker wipes an EXT4 inode and overwrites directory entries, the prior state of the
inode exists preserved inside the JBD2 circular journal ring-buffer for hours or days!
Recovery Command:
$ sudo ext4magic /dev/sdb1 -r -f /var/log/auth.log -d /recovered_evidence/
[+] Scans JBD2 journal ring-buffer.
[+] Reconstructs auth.log inode state prior to deletion transaction.
[+] Successfully restores deleted log file with original timestamps intact!
RESIDUAL SPACE ARCHITECTURE: RAM SLACK VS. FILE / DRIVE SLACK:
Storage Scenario:
β’ Filesystem Cluster Size = 4096 Bytes (8 sectors of 512 bytes each).
β’ Suspect writes a secret message: file.txt = 600 Bytes total size.
PHYSICAL ALLOCATION OF A 4096-BYTE CLUSTER ON DISK:
ββββββββββββββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββ
β SECTOR 1 (512 Bytes) β SECTOR 2 (512 B) β SECTORS 3 THROUGH 8 (3072 Bytes) β
ββββββββββββββββββββββββββΌββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [Logical File Content] β [Logical File] β [UNALLOCATED SECTORS OF THE ALLOCATED CLUSTER] β
β 512 Bytes of file.txt β 88 Bytes of file β Zero bytes of file.txt belong here! β
β βββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β [RAM SLACK] β [DRIVE SLACK / FILE SLACK] β
β β 424 Bytes padding β 3072 Bytes of residual unallocated sector data! β
ββββββββββββββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββ
DEFINITIONS & FORENSIC CHARACTERISTICS:
1. RAM SLACK:
β’ The space from the logical end of the file (Byte 600) to the end of that specific SECTOR (Byte 1024).
β’ Size: 512 - (600 - 512) = 424 Bytes.
β’ History: In older Windows OSs (Windows 95/98), the OS dumped random memory buffer bytes to pad the
sector, leaking passwords, network packets, and RAM fragments!
β’ Modern OSs (NTFS on Windows 10/11, Linux): Zero-pads RAM slack with NULL bytes (\x00) for security.
2. DRIVE SLACK (FILE SLACK / CLUSTER SLACK):
β’ The remaining full sectors from the end of the RAM slack sector to the end of the CLUSTER.
β’ Sectors 3 through 8 = 6 * 512 = 3072 Bytes.
β’ CRITICAL FORENSIC REALITY: Modern operating systems NEVER zero out drive slack!
β’ Drive slack retains whatever raw data previously occupied those physical sectors before the new
small file was written!
β’ Anti-Forensics Abuse: Attackers use tools like 'bmap' to hide stolen cryptographic keys or
passwords directly inside the drive slack of benign system files!
import os
import sys
class RawSignatureCarver:
"""
Automated File Carving Engine:
Carves files from raw, unallocated disk images based on magic byte headers and footers.
Operates independently of corrupted or wiped MFT/Inode metadata structures.
"""
SIGNATURE_DATABASE = {
"JPEG": {
"header": b"\xFF\xD8\xFF\xE0",
"footer": b"\xFF\xD9",
"max_size": 20 * 1024 * 1024 # 20 MB max
},
"PNG": {
"header": b"\x89\x50\x4E\x47\x0D\x0A\x1A\x0A",
"footer": b"\x49\x45\x4E\x44\xAE\x42\x60\x82",
"max_size": 20 * 1024 * 1024
},
"PDF": {
"header": b"%PDF-",
"footer": b"%%EOF",
"max_size": 50 * 1024 * 1024 # 50 MB max
}
}
def __init__(self, disk_image_path: str, output_directory: str):
self.image_path = disk_image_path
self.output_dir = output_directory
os.makedirs(self.output_dir, exist_ok=True)
def execute_carve(self):
print(f"[*] Commencing signature carving on: {self.image_path}...")
with open(self.image_path, "rb") as f:
data = f.read()
total_bytes = len(data)
carved_manifest = []
for ftype, sigs in self.SIGNATURE_DATABASE.items():
header = sigs["header"]
footer = sigs["footer"]
max_len = sigs["max_size"]
start_pos = 0
while True:
# Locate header signature in raw byte stream
header_idx = data.find(header, start_pos)
if header_idx == -1:
break # No more matching headers found
# Search for matching footer signature within max_size boundary
search_limit = min(header_idx + max_len, total_bytes)
footer_idx = data.find(footer, header_idx + len(header), search_limit)
if footer_idx != -1:
end_idx = footer_idx + len(footer)
extracted_file = data[header_idx:end_idx]
file_name = f"carved_{header_idx}_{ftype.lower()}.{ftype.lower()}"
save_path = os.path.join(self.output_dir, file_name)
with open(save_path, "wb") as out:
out.write(extracted_file)
carved_manifest.append({
"file_type": ftype,
"offset_hex": f"0x{header_idx:08X}",
"size_bytes": len(extracted_file),
"saved_file": file_name
})
# Advance search position past current carved file
start_pos = end_idx
else:
# Footer not found; advance to next byte to avoid infinite loop
start_pos = header_idx + 1
return carved_manifest
if __name__ == "__main__":
# Demonstration execution with simulated unallocated block containing mock PDF
MOCK_DISK = "unallocated_block.raw"
with open(MOCK_DISK, "wb") as f:
f.write(b"\x00" * 4096) # Initial slack padding
f.write(b"%PDF-1.7\n1 0 obj<<>>endobj\ntrailer<<>>\n%%EOF") # Embedded PDF file
f.write(b"\x00" * 4096) # Trailing slack padding
carver = RawSignatureCarver(MOCK_DISK, "./carved_output")
print("==========================================================================")
print(" AUTOMATED RAW SIGNATURE FILE CARVING ENGINE REPORT")
print("==========================================================================")
results = carver.execute_carve()
for item in results:
print(f"[β] CARVED {item['file_type']:<5} | Offset: {item['offset_hex']} | Size: {item['size_bytes']} bytes β {item['saved_file']}")
# Cleanup mock image
if os.path.exists(MOCK_DISK):
os.remove(MOCK_DISK)
FILE SYSTEM FORENSIC DEFECTS & ANALYTICAL TRIAGE:
// ==============================================================================
// PITFALL 1: SOLID STATE DRIVE (SSD) TRIM COMMAND PURGING EVIDENCE
// SYMPTOM: An investigator images an SSD 4 hours after a user deleted critical files.
// When carving unallocated space, ALL unallocated sectors return pure 0x00 bytes!
// CAUSE: Active SSD TRIM (ATA Data Set Management command).
// Unlike magnetic HDDs (where data persists until overwritten), SSDs run background
// Garbage Collection to maintain NAND write speeds, immediately zeroing unlinked blocks!
// REMEDIATION:
// 1. In dynamic incidents on SSDs, disconnect physical power immediately if the machine
// is off to prevent scheduled idle TRIM cleanup routines!
// 2. Focus analysis on the MFT, Inode tables, and JBD2 journal, which often retain
// resident file content and metadata records even when external extents are trimmed.
// ==============================================================================
// ==============================================================================
// PITFALL 2: IGNORING UPDATE SEQUENCE NUMBER (USN) ARRAY FIXUPS IN MFT RECORDS
// DEFECT: Analyst reads raw MFT record bytes and notices the final 2 bytes of every
// 512-byte sector do not match expected data runs.
// CAUSE: NTFS Update Sequence Array (USA) protection against partial sector writes.
// When writing an MFT record to disk, NTFS swaps out the last 2 bytes of each 512-byte
// sector and stores them in the USN array at offset 0x30, replacing the sector bytes
// with a 2-byte update sequence signature.
// REMEDIATION: The forensic parser must apply "fixup processing": read the genuine
// bytes out of the USN array and restore them into the sector ends before parsing attributes!
// ==============================================================================
// ==============================================================================
// PITFALL 3: FAT32 VS. NTFS TIME ZONE INTERPRETATION (THE LOCAL TIME CONFUSION)
// DEFECT: An investigator compares timestamps from a USB flash drive (FAT32) against
// a system disk (NTFS), reporting a 5-hour 30-minute discrepancy as an anomaly.
// CAUSE: NTFS stores FILETIME in strict UTC (Coordinated Universal Time).
// FAT32 stores file timestamps in LOCAL BIOS TIME with ZERO time zone metadata!
// REMEDIATION: Always determine the underlying file system type before correlating
// timelines, and normalize FAT32 timestamps to UTC based on the suspect system's active
// time zone registry key (HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation).
// ==============================================================================
FILE SYSTEM FORENSICS SPECIFICATION MATRIX:
βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ¬βββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β FILE SYSTEM / ARTIFACT β STRUCTURAL LOCATION β RECORD SIZE β FORENSIC EVIDENCE YIELD β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ€
β NTFS $MFT β \$MFT (Root of partition) β 1024 Bytes β Centralized metadata ledger; β
β (Master File Table) β Fixed sequential record arrayβ per entry β file names, sizes, data runs β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ€
β $STANDARD_INFORMATION β MFT Attribute 0x10 β Variable β Primary MACB timestamps, β
β β (User mode accessible) β (~72 bytes) β DOS attributes; reveals timestompβ
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ€
β $FILE_NAME β MFT Attribute 0x30 β Variable β Kernel protected MACB times, β
β β (Kernel mode protected) β (~100 bytes) β file names up to 255 chars β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ€
β Alternate Data Streams β MFT Attribute 0x80 β Variable β Hidden payloads, Zone.Identi- β
β (NTFS ADS) β with non-empty name string β β fier tracking internet drops β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ€
β EXT4 Inode Table β Inode Table blocks per group β 256 Bytes β POSIX permissions, UID/GID, β
β β (Allocated in block groups) β per inode β extent tree, deletion time β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ€
β EXT4 Directory Entry β Directory data blocks β Variable β Unlinks file name from inode; β
β (dir_entry_2) β inode #, rec_len, name_len β β reveals deleted file names β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ€
β JBD2 Journal β Inode #8 (/journal) β Circular β Pre-deletion inode snapshots; β
β (EXT4 Journaling Engine)β Ring-buffer data blocks β ring-buffer β transaction timeline metadata β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ€
β Drive / File Slack β Residual space between file β Variable β Data remnants from deleted β
β β end and end of cluster β (< Cluster size) β predecessor files; hidden data β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ€
β File Carving β Unallocated cluster blocks β Independent of β Reconstructs fragmented or β
β (Signature Carving) β Magic headers and footers β file system β unlinked files without tables β
βββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ€
β TOP 5 FILE SYSTEM FORENSIC BEST PRACTICES: β
β 1. Always Check Dual Timestamps: Compare 0x10 ($STANDARD_INFO) and 0x30 ($FILE_NAME) for timestomping. β
β 2. Audit Alternate Data Streams: Search for hidden streams on suspected download drop directories. β
β 3. Recover Journal Records Early: Mine JBD2 journal buffers before circular transactions overwrite them β
β 4. Account for SSD TRIM: Preserve volatile and metadata structures immediately on flash media. β
β 5. Parse Slack Space: Carve cluster slack space to recover residual fragments of prior documents. β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ