01. Obedient Cat - PicoCTF 2021 Writeup
This file has a flag in plain sight (aka "in-the-clear")
Category: General Skills | Author: Syreal | Points: 05
Hello All ๐,
Welcome to my first picoCTF write-up. In this, we'll start with a simple challenge: the Obedient Cat CTF. Authored by Syreal this is quite an easy one. In fact, it only needs a basic understanding of how the file system works. The description does a good job of explaining what we need to do: just look in 'plain' sight.
This file has a flag in plain sight (aka "in-the-clear")
Downloading the provided file, we get an unknown file that doesn't seem to do anything; no file type, double-clicking it shows the 'Open With' dialog.
This is a great opportunity to know how the computer identify what a file does. Any file; whether video, music or text, always consists of binary data. But this data alone can't be used to easily identify what a file is on the run. So for our convenience, we can name a file to whatever we prefer so that it's easy for us to know what each file is. On top of this, after the name of our file, the operating system also puts some additional characters; in most cases three letters after a period. Usually, this part is hidden from the user, unless you enable it yourself from the file explorer settings.
These additional characters tell the operating system what kind of a file this is: if it's an MPEG4 video file it's '.mp4', if it's a text file it's '.txt'.
If we look at the file we downloaded, it doesn't contain this extension. So the computer doesn't know what to do with it. But, as we're programmers and because the hint says 'plain', we can easily assume that this file is a text file.
In fact, if we open it on Notepad, the flag is right there! Congratulations; we just earned 5 points!