← Back to Challenges

🔮 Challenge 6: The Mystery File

Advanced Forensics: File extensions can be faked, but a file's "magic numbers" never lie!

📖 The Story

The security team found a file called mystery_file.dat on a compromised computer. Its extension says .dat, but experienced forensic analysts know — file extensions can be changed to anything!

Every file format has a specific byte sequence at the beginning, called its "magic number" or "file signature." For example, PDF files always start with %PDF, and PNG images start with 89 50 4E 47.

Download this mystery file, figure out its true identity, open it the right way — and the flag is yours!
📥 Download Mystery File (mystery_file.dat)

🛠️ How to Identify a File's True Type

  • Open the file in a hex editor and check the first few bytes
  • Online tools: search "hex editor online" or "file signature checker"
  • Common magic numbers: %PDF = PDF, PK = ZIP, 89 PNG = PNG
  • Command line: file mystery_file.dat (Linux/Mac) or xxd mystery_file.dat | head
  • Easiest method: try renaming .dat to other extensions and see what opens!
💡 Hint 1: How do I check the first bytes?

You can open the .dat file with a text editor (like Notepad) and look at the very beginning for recognizable text. Or use an online hex viewer.

💡 Hint 2: I know the file type — now what?

If the file starts with %PDF, it's actually a PDF file! Rename the extension from .dat to .pdf, then open it with a PDF reader to see the flag.