We can use dirb to try to enumerate hidden urls but we don’t find anything, but for the message on the web we can think about steganography
We download cat-original.jpg , and cat-hidden.jpg and we use stegcracker and steghide to extract data hidden in the images.
We extract the hidden data in the images using the steghyde command.
We can use ssh in as: markus and mateo on port 2222
We know where the id_rsa is, but only root can read it. On the other hand, in bonita’s home, there is a binary called beroot, but it can only be executed by bonita or the root user.
We discover a note with a path to a file in wav format, we can be suspicious of data hidden inside the audio file.
We downloaded stegcracker and tried to use it, but it doesn’t work.
We can try to discover the content in gogogo.wav, when we play the content we realise that it’s a Morse code that we can decode in a web application:
From here we need to find a way to apply privilege escalation, we can download LinPEAS
, a vulnerability detection script, and gain access to Bonita’s id_rsa
linpeas.sh shows some capabilities:
The cap_dac_read_search capability allows us to bypass discretionary access controls to read and search any file or directory.
So with the tail command we can read the id_rsa file.
We can now log in as Bonita and read the user flag, and with the tail command we can also read the root.txt, but we can also try to examine the beroot binary found in Bonita’s home directory.
user flag and beroot
Copy the remote file to Kali and examine it online with the web decompiler
:
In the source code we can see the password to gain root access, the number ‘5880’, we run the binary, enter the password and now we can read the root flag.