useless
AUTHOR: LOIC SHEMA
Description There’s an interesting script in the user’s home directory The work computer is running SSH. We’ve been given a script which performs some basic calculations, explore the script and find a flag. Hostname: saturn.picoctf.net Port: 52202 Username: picoplayer Password: password
Solution
This made me a bit mad, I ran into some rabbit holes at first. The challenge was quite fun. Lets get into it then, shall we?
- We first ssh into the server
ssh -p 52202 picoplayer@saturn.picoctf.net
- We get to see an executable file
useless
- When we run the executable, it tells us to read the code first.
- I thus
cat
the file to read it. - Reading the code I now understand how to run the code
./useless add 5 5
- I notice a very interesting
else
statement at the end of theif loop
- It says
Read the Manual
.. - I immedietly remembered the linux manual
man
.
In Linux, theman
command is used to display the manual pages (documentation) for various commands, programs, and system functions. It provides detailed information about the usage, options, and examples of how to use a particular command or function. - I therefore run
man useless
and at the end I see the flag.
Comments powered by Disqus.