Forensics challenges test your ability to analyze files, extract hidden data, and piece together digital evidence. They're like being a detective, but instead of fingerprints, you're looking for hidden strings, embedded files, and metadata!
The first rule of forensics: don't modify the evidence! In CTFs, always work on copies. In real life, this is critical for legal reasons.
First Steps with Any File
Always Run These
file, strings, and xxd should be your automatic first three commands for ANY forensics challenge. They often reveal the flag directly!
Metadata Extraction
EXIF data in images can reveal amazing things: GPS coordinates where a photo was taken, the camera/phone model, even the owner's name!
Finding Hidden Data with Binwalk
Hex Analysis
Fixing Corrupted Files
File Signature Reference
Keep a list of common file signatures handy:
- JPEG: FF D8 FF
- PNG: 89 50 4E 47 0D 0A 1A 0A
- GIF: 47 49 46 38 (GIF8)
- PDF: 25 50 44 46 (%PDF)
- ZIP/DOCX: 50 4B 03 04 (PK)
Archive Analysis
Forensics Checklist
Knowledge Check
Key Takeaways
- Always run: file, strings, xxd, exiftool, binwalk
- Don't trust file extensions - check magic bytes
- Metadata in images often contains hidden messages
- Binwalk finds files embedded inside other files
- Corrupted files can often be fixed by repairing headers
- Office documents are just ZIP files in disguise