Challenge Description
This challenge is similar to strings it and Wave a flag.
After downloading the files using wget
, I ran file static
to check the file type of this file. Once again, it is a binary executable file. strings
will likely be useful here.
strings
command
strings
prints the strings of printable characters in files, specifically binary files.
I then ran nano ltdis.sh
, which was the bash script file provided in the challenge.
Yep, this bash script ltdis.sh
is a bash script that attempts to disassemble a binary file and extract strings from it.
Acquiring the flag
I figured that running the bash script will likely be equivalent to running strings
for the purpose of acquiring the flag, since they both work by displaying only the printable strings in static
.
Indeed, running strings static | grep -C 5 "pico"
displayed the flag in the terminal. I used the -C 5
argument to display the5 lines of context before and after the matching line that contains the flag, but this is optional.
Flag
picoCTF{d15a5m_t34s3r_f6c48608}