PicoCTF Writeups – strings it

Information: 

CTF Name: PicoCTF

CTF Challenge: strings it

Challenge Category: General Skills

Challenge Points: 100

PicoCTF 2019.

# Challenge Description: 

Can you find the flag in file without running it?

Writeup 

To solve this challenge I first clicked on the file word on the description. By clicking, a file was downloaded. The file was named strings.

In the description, they ask if I can find the flag without running the file. They also leave a hint on the challenge name “strings it”. This is a hint because I know strings is a command from the Binutils of the GNU Operating System. If you type man strings, this comes up.

By reading briefly the manual it is possible to see that this command returns to the user all the strings that are in the file given as an argument. 

After reading the manual I decided to run the command “strings strings” which is basically the command strings on the file strings. This command returned an enormous amount of strings making it too difficult to find the flag.

To solve this I decided to combine this command with the pipe and grep commands of the Linux terminal, as such:

 
I will try to break down the command I used to get the flag. 
 
The pipe command, which is represented by the “|“, is responsible to send the output of the command strings as input to the grep command. 
The grep command will search the output received by the pipe command and find the lines that have the substring “pico“. I choose the substring “pico” because the format of the PicoCTF flags is usually picoCTF{…}, which turned out to be a good idea.
 
As you can see we now have the flag:
 
Show flag
picoCTF{5tRIng5_1T_7f766a23}

The image source can be found here.  

Thank you very much for reading!

Cheers,

MRegra

Leave a Reply

Your email address will not be published. Required fields are marked *