Jason Turley's Website

picoCTF 2019 - extensions writeup

Description

This is a really weird text file TXT? Can you find the flag?

Category: Forensics

Points: 150

Problem

We are given a file named flag.txt that appears to be a TXT file. However, upon further inspection, it is actually a PNG file.

jason@lapras:$ file flag.txt
flag.txt: PNG image data, 1697 x 608, 8-bit/color RGB, non-interlaced

This is because unlike Windows, Linux does not determine a file type by its extension. Rather, it looks at the meta data in the file header.

Solution

Since I am using WSL2, the quickest solution for me was to change the extension from .txt to .png and open the file in an image viewer.

flag.png

#writeups