Challenge Author:
Difficulty: Easy
Description
The Network Operations Center (NOC) of your local institution picked up a suspicious file. They’re getting conflicting information on what type of file it is. They’ve brought you in as an external expert to examine the file. Can you extract all the information from this strange file?
Process / Notes
- Probably going to need to use the
filecommand. Potentiallyexiftoolas well. - The file is pdf format, but
filereveals that it’s a 50x50 png. catdidn’t do much.- Installing libimage-exiftool-perl (extended exiftool for kali)
- Not much in the metadata that seems of note.
- Didn’t have permission to run it, and don’t feel like changing that.
- It might be a QR code? Using
zbarimg - Nothing here, not a bar code.
- md5sum? sha256sum? Nothing there either.
- Couldn’t grep it for ‘pico’ either.
- Installing graphicsmagick-imagemagick-compat.
- Using the
displaycommand. - That revealed the flag.
- But it wasn’t the whole flag! It just looks like the first half.
hd | grepfor the other half of the flag with the “}”?- Nothing there, and nothing with another examination of the meta-data.
- 26:20 into this challenge, looking up what to do next.
- One walkthrough used the
stringscommand.stringsreads the text inside a binary or data file.
- From another tutorial, it sounds like you can see that a png and a pdf file have both been mashed together when viewing the hex dump (explaining the conflicting file type information in the challenge description). The break between the two is where it says PNG, and PDF later on.
fileidentifies it as a PNG because the PNG flag comes first in the hex.- Just opening as a pdf by clicking on it gets the other half of the flag.
- Deleting this file because it weirds me out.
41 minutes 51 seconds to complete
Hints
- This problem can be solved just opening the file in different ways.
Core Lessons
- There are many ways to examine a file:
catto look at the text contentsfileto look at the file typestringsto look at the strings within the binaryhdto view the hex dump of the fileexiftoolto examine the meta-data- Just opening the file normally.
- It may take cycling through a lot of them in order to find the type of information you need.