Wave a flag
Name: Wave a flag Description: Can you invoke help flags for a tool or binary? This program has extraordinarily helpful information... Author: syreal Tags: Easy, General Skills, picoCTF 2021 Challenge from: picoCTF 2021 Files: warm Hints: 1. This program will only work in the webshell or another Linux computer. 2. To get the file accessible in your shell, enter the following in the Terminal prompt: $ wget https://mercury.picoctf.net/static/cfea736820f329083dab9558c3932ada/warm 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 4. -h and --help are the most common arguments to give to programs to get more information from them! 5. Not every program implements help features like -h and --help.
Theory
According to the description, to get the flag we have to open an executable file or something to invoke a flag it says, and we'll need to use the help parameter for something. Idk let's just see what the program has.
Solution
First download and run it:
shukularuni-picoctf@webshell:~$ wget https://mercury.picoctf.net/static/cfea736820f329083dab9558c3932ada/warm --2025-04-17 12:27:29-- https://mercury.picoctf.net/static/cfea736820f329083dab9558c3932ada/warm Resolving mercury.picoctf.net (mercury.picoctf.net)... 18.189.209.142, ... Connecting to mercury.picoctf.net (mercury.picoctf.net)|18.189.209.142|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 10936 (11K) [application/octet-stream] Saving to: 'warm' warm 100%[=================================================================================================================================================================>] 10.68K --.-KB/s in 0s 2025-04-17 12:27:29 (352 MB/s) - 'warm' saved [10936/10936] shukularuni-picoctf@webshell:~$ ./warm -bash: ./warm: Permission denied
Oh, right. We don't have permission to execute the file, we can just bypass that by adding the executable permission to the file:
shukularuni-picoctf@webshell:~$ chmod +x warm shukularuni-picoctf@webshell:~$ ls README.txt warm shukularuni-picoctf@webshell:~$ ./warm Hello user! Pass me a -h to learn what I can do! shukularuni-picoctf@webshell:~$ ./warm -h Oh, help? I actually don't do much, but I do have this flag here: picoCTF{b1scu1ts_4nd_gr4vy_30e77291}
There we go! That's the flag.
I rated this level as "good"! :3
https://play.picoctf.org/practice/challenge/170