Description
Can you find the flag in this disk image? Wrap what you find in the picoCTF flag format.
Download and decompress the disk image.
Mount or analyze the image to explore the filesystem and its metadata.
gunzip partition4.img.gzsudo mount -o loop partition4.img /mnt/diskSolution
Walk me through it- Step 1Decompress the imageExtract the raw partition image from the gzip archive.bash
gunzip partition4.img.gzLearn more
Raw disk partition images are forensically complete snapshots of a storage partition. Unlike filesystem-level copies (like
cp -r), they capture every bit on the partition: live files, deleted files, slack space (unused space within file clusters), unallocated space (sectors not belonging to any file), filesystem journal entries, and all metadata structures. This completeness is essential for forensic analysis where evidence may exist in unexpected locations.Timeline-1 is the second part of the timeline challenge series and uses a different disk image than Timeline-0 (note the different URL hash). While both challenges use the same methodology (fls + mactime), the specific filesystem content differs, meaning the flag is in a different location or encoded differently. Treating each disk image as an independent investigation is the correct approach.
- Step 2Build a filesystem timeline
fls -mproduces a body file with MAC timestamps for every inode TSK can read.mactime -b body.txt -dsorts that into a comma-delimited (-d= delimited / CSV-style) timeline you can grep.bashfls -m '/' -r partition4.img > body.txtbashmactime -b body.txt -d > timeline.csvLearn more
Why
flsautodetects the filesystem. TSK probes the image's superblock / boot sector signatures: ext4's magic number0xEF53at offset 0x438, NTFS'sNTFSsignature at offset 3 of the boot sector, FAT's OEM identifier and BPB layout, HFS+'sH+at offset 1024, APFS's container superblock magic. If a known signature matches, fls picks the right parser and you don't pass-fmanually. (When in doubt:fsstat partition4.imgprints the detected type explicitly.)Allocated vs deallocated inodes. On ext4/NTFS, file metadata (timestamps, permissions, size, block pointers) lives in inode/MFT entries, separate from the directory entries that map names to inodes. When a file is deleted, the directory entry is often cleared first (or marked unused), and the inode is marked deallocated - but the metadata bytes are not zeroed.
fls -rwalks both allocated and deallocated inode entries, so deleted-file metadata persists in the timeline even if the data blocks have been reused. This is the entire reason filesystem timelines work for forensics.What
-dactually does.mactime -demits comma-delimited output (CSV-style) instead of the default human-readable columnar format. CSV is what you want for grep, awk, and spreadsheet imports. There's also-y(ISO 8601 dates) and-z UTC(force timezone), which keep results deterministic across machines.On a real system disk the CSV can run into millions of rows; for this challenge it's small enough that
grep picoCTF timeline.csvfinds the flag immediately. See the Volatility 3 guide for the in-memory equivalent of this workflow. - Step 3Search the timeline for the flagGrep the generated timeline for 'picoCTF'. The flag is embedded as a filename or path visible in the timeline output.bash
grep picoCTF timeline.csvbashgrep -i flag timeline.csvLearn more
The mactime CSV output includes columns for: date/time of the MAC event, size in bytes, the MAC type (M/A/C/B for Modified/Accessed/Changed/Born), permissions, UID, GID, inode number, and the full file path. Searching for
picoCTFin this output will find any filename containing that string, regardless of which column it appears in.Filename-based evidence is particularly valuable in forensics because filenames survive in specific scenarios where file content does not. Even if a file is deleted and its blocks overwritten, if the directory entry was not reused, the filename remains recoverable. TSK's
flsmarks recovered deleted file entries with an asterisk (*) before the filename, distinguishing them from currently allocated files. In this challenge, the flag might appear in either an active or deleted file entry. - Step 4Wrap in picoCTF{...} formatTake the string found in the timeline and wrap it in picoCTF{...} as the challenge instructs.
Learn more
The wrapping instruction distinguishes this challenge from challenges where the full flag (including
picoCTF{}) is directly embedded. When the challenge says to wrap the found string, it means the filesystem contains an intermediate artifact (a filename, a text string in a file, or a path component) that represents just the inner content of the flag. You must recognize which discovered string is the flag content and manually construct the complete flag.This type of challenge builds the important skill of artifact interpretation in forensics - not every piece of data found in an investigation is directly useful; analysts must identify which artifacts are significant and interpret them correctly in context. In real cases, evidence might be a username in a log file, a timestamp, a file path, or a command argument that needs to be combined with other artifacts to reconstruct the complete picture.
Flag
picoCTF{...}
The flag is encoded as a filename or path in the filesystem timeline. Build with fls -m + mactime, then grep for picoCTF.