PicoCTF Writeup – Wave a flag

# Information:

CTF Name: PicoCTF

CTF Challenge: Wave a flag

Challenge Category: General Skills

Challenge Points: 10

picoCTF 2021.

# Used Tools:

  • Linux
  • file
  • chmod +x

# Challenge Description:

Can you invoke help flags for a tool or binary? This program has extraordinarily helpful information…

Hints:

Hint 1
This program will only work in the webshell or another Linux computer.
Hint 2
To get the file accessible in your shell, enter the following in the Terminal prompt: $ wget https://mercury.picoctf.net/static/f95b1ee9f29d631d99073e34703a2826/warm
Hint 3
Run this program by entering the following in the Terminal prompt: $ ./warm, but you’ll first have to make it executable with $ chmod +x warm
Hint 4
-h and –help are the most common arguments to give to programs to get more information from them!
Hint 5
Not every program implements help features like -h and –help.

# Writeup:

Hello, and welcome to another picoCTF challenge write-up. First, I downloaded the program (that you can obtain under “Description”).

Step 1:

I used the command file to see what kind of data was stored in the program called: warm.
Has you can see in the image below.

As you can see in the image above, the file is executable, and if you insert de command ls -al, you will see what kind of permissions are being executed (as you can see in the image below).

If you have something like: rwxr-xr-x, it means that you can read, write and execute. In this case, we can do it all. We can read because we have an r, we can write because we have a w, and we can execute because we have an x.


If you want to better understand about Linux permissions take a look at this post.


Step 2:

After knowing that I had permission to execute, I used the ./ command to see what was in the current directory. As you can see in the image below.

I was prompted to enter an -h, and that is what I did.

I got the flag.

The flag is:

Show flag
picoCTF{b1scu1ts_4nd_gr4vy_f0668f62}

Thank you very much for reading!

Cheers,

SoBatista


Leave a Reply

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