Challenge Description
This challenge was pretty interesting when I tried it, as I’ve never encountered a “blank” .txt
file before.
As per normal, we first download the provided file by using wget <link>
to understand what we’re dealing with.
Downloaded file
The downloaded file is called whitepages.txt
. As both the name of the challenge and the downloaded file suggest, there was “nothing” inside this file when I ran cat
on it. I received the same output when I usedstrings
.
I actually tried exiftool
and other methods when I first attempted this challenge as well, but they did not provide me with any clue on how I should proceed.
Viewing the hex
I then tried to use hexedit
to view the file in hexadecimal. Other hex editors are also fine. Since hexedit shows a file both in ASCII and in hexadecimal, the presence of the dots (‘.
’) on the right show that the file was not empty, but contains non-printable ASCII characters. This is because dots usually appear in place of non-printable ASCII characters or characters that cannot be displayed properly.
I realised that throughout the entire file, there were 2 recurring values. These are e28083
and 20
.
Binary?
Since there were exactly 2 recurring values, I thought that they could be hinting about binary numbers, 0 and 1.
Obtaining the flag
With this idea, I used xxd
to store the hex dump of whitepages.txt
in a file called output.txt
. I will be using a Python script to convert the 2 recurring values in the hex dump into 0s and 1s.
Conversion
Python script
I tried to replace
e28083
with1
and20
with0
at first, but the output I received was gibberish. After swapping the substituted values, I could finally get the flag.
Flag
picoCTF{not_all_spaces_are_created_equal_3e2423081df9adab2a9d96afda4cfad6}
References
- Binary number - Wikipedia. (2024, September 2). https://en.wikipedia.org/wiki/Binary_number#:~:text=A%20binary%20number%20is%20a,%221%22%20(one).