A provided file looks like a random data stream (static noise), but its extension or appearance is misleading — the file command reveals its true type (based on its "magic bytes"), and strings (or binwalk) lets us extract the readable text hidden inside, including the flag.
| Platform | picoGym |
| Category | Misc |
| Points | 100 pts |
| Difficulty | Beginner |
| Tools | file strings binwalk |
The challenge provides a file named mystery.bin, with a cryptic prompt:
"All I see is static... or is there something more?"
Opening the file with a hex editor or a plain cat, we end up with what looks like a stream of random bytes — no visible pattern to the naked eye, like white noise. Nothing clearly indicates what type of file it is.
The number one reflex when facing any unknown file in a CTF: never trust the extension, and run file. This command reads the first bytes of the file (the "magic bytes") and compares them against a database of known signatures to determine the actual format:
$ file mystery.bin
mystery.bin: Zip archive data, at least v2.0 to extract
Surprise: despite its generic .bin extension and its noisy binary appearance, the file is actually a ZIP archive. Magic bytes never lie, unlike a file's extension.
Before even treating the file as a ZIP archive, we can try a more direct approach: strings extracts every printable character sequence contained in a binary file, regardless of its format:
$ strings -n 8 mystery.bin | grep picoCTF
picoCTF{***}
The -n 8 option filters to keep only sequences of at least 8 consecutive printable characters, which eliminates most of the random binary noise and surfaces the actual text strings — here, the flag appears directly, stored in plaintext inside the archive despite the raw file's noisy appearance.
On a trickier variant of the challenge where strings alone isn't enough (compressed flag or a file embedded more deeply), we use binwalk to scan the file for signatures of nested files:
$ binwalk mystery.bin
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
0 0x0 Zip archive data, at least v2.0 to extract
128 0x80 End of Zip archive, footer signature
If an archive or an image is detected inside, we extract it automatically with the -e option:
$ binwalk -e mystery.bin
$ ls _mystery.bin.extracted/
flag.txt
This complementary approach is useful whenever a simple grep on the strings output isn't enough to spot the flag directly.
Whether via strings directly or after extraction with binwalk, the flag appears in the standard picoCTF{...} format among the text strings extracted from the file.
The flag is deliberately hidden — follow the method, you've earned it. 💪
A short challenge that builds reflexes essential for everything that follows:
file, strings, and binwalk form the go-to trio of tools for a first inspection of any unknown binary fileDiscuss this writeup with the community on the CTFdojo Discord.
Join the Discord →