File System Analysis: Ext4 and Linux Filesystems
You'll learn how to examine Linux filesystems at a forensic level to uncover evidence and recover deleted files.
When investigating Linux systems, understanding ext4 (and related filesystems like XFS, Btrfs) is essential. Unlike NTFS from Windows, Linux filesystems use inodes as the fundamental building blocks—think of an inode as an index card that stores everything about a file except its name and data location.
Inode Structure and Metadata
Each inode contains critical forensic metadata: file permissions, timestamps (atime, mtime, ctime), owner UID/GID, file size, and pointers to data blocks. In ext4, the filename is stored separately in directory entries that reference inode numbers. This separation means you can find orphaned inodes (files without directory entries)—a goldmine for deleted file recovery.
Journaling and Evidence Preservation
Ext4 uses journaling to maintain filesystem integrity. The journal logs pending changes before they're committed. During incident response, examining the journal (/var/log/journal or within the filesystem's journal area) can reveal recently deleted files, rename operations, or permission changes—even if the original data is gone.
Deleted File Recovery Process
When a file is deleted in ext4, its inode is marked free and directory entry removed, but data blocks may persist until overwritten. Forensic tools scan for unallocated inodes and orphaned data blocks. XFS handles deletion differently—it's more aggressive about zeroing metadata, making recovery harder but not impossible.
Filesystem Artifacts and Timeline Analysis
Key artifacts include /lost+found (recovered orphaned inodes), superblock information (filesystem creation time, mount count), and extent trees showing file fragmentation patterns that can indicate tampering.
Key Takeaway: Linux filesystem forensics requires understanding inodes, journal structures, and filesystem-specific allocation patterns—mastering ext4 inode analysis and journal examination enables you to reconstruct attacker activities and recover deleted evidence from Linux systems.