Year of the Rabbit
Task 1: Flags

Question
What is the user flag?
Let's scan the target machine using
nmap.
There are three open ports:
21
ftp
22
ssh
80
http
We can brute force the directories of the webpage using
gobuster.
Let's go to the
assets/directory.

Let's check out the
style.cssfile. We will avoid theRickRolled.mp4file for obvious reasons.

So now we can go to
/sup3r_s3cr3t_fl4g.php.

If we click
OKwe just get Rick Rolled.Let's intercept the request in Burpsuite.

We can
Forwardthis request.

Let's see what is in the
/WExYY2Cv-qUdirectory.

We can download the
Hot_Babe.pngfile usingwget.
Let's use the
stringsutility to see the strings present inside the file.
Let's save the password to a file called
ftp_passwords.txt.Now using
hydrawe can brute force the FTP login.
So the password for
ftpuseris5iez1wGXKfPKQ.Let's login using those credentials.
Let's look around for important files.
We can download the
Eli's_Creds.txtfile to our machine using thegetcommand.
Let's read the contents of the file.
The text is in Brain Fuck.
We can use an online decoder to decode it.

The password for the
eliuser isDSpDiM1wAEwid.We can try to login through SSH using these credentials.
After a bit of searching we can find the
user.txtfile.
Let's try to read it.
The user
elidoes not have the permission to read theuser.txtfile.Let's try to find the
s3cr3tmentioned in the message.
We can now read the
.th1s_m3ss4ag3_15_f0r_gw3nd0l1n3_0nly!file.
So now we know that the password for
gwendolineuser isMniVCQVhQHUNI.Let's switch users.
We can now read the
user.txtfile we saw earlier.
Answer
What is the root flag?
We can check what commands
gwendolinecan execute usingsudo.
Let's check the version of
sudo.
We can find an exploit for that version om Exploit-DB.

Let's craft our exploit.
Next we have to type the following:

We must have
rootaccess.
Let's get the root flag.
Answer
Last updated
Was this helpful?