Brute It
Task 1: About this box
Deploy the machine

No answer needed
Task 2: Reconnaissance
Search for open ports using nmap.
How many ports are open?
Let's perform a
nmapscan against the machine.
There are two open ports:
22
ssh
80
http
Answer
What version of SSH is running?
The answer is present in the
nmapscan.
Answer
What version of Apache is running?
The answer is in the
nmapscan.
Answer
Which Linux distribution is running?
The answer is in the
nmapscan.
Answer
Search for hidden directories on web server.
What is the hidden directory?
Let's brute force the web pages using
gobuster.
Answer
Task 2: Getting a shell
What is the user:password of the admin panel?
Let's go to the
admin/directory.

We can check the source code using
CTRL+U.

Now that we know the username, we can use
hydrato brute force the password.
Answer
Crack the RSA key you found.
What is John's RSA Private Key passphrase?>
Let's login with
adminas the username andxavieras the password.

Let's download the
RSA private keyfor the userjohn.
We can use
ssh2johnto create a hash file.
Now we can use
johnto crack the hashes.
Answer
user.txt
Let's change the permissions of the
id_rsafile.
Now that we know that the password for
johnisrockinroll, let's login through SSH.
Let's read the
user.txtfile.
Answer
Web flag
The web flag was present on the page with the RSA private key.
Task 4: Privilege Escalation
Find a form to escalate your privileges.
What is the root's password?
Let's check what
sudocommandsjohnhas the permission to execute.
So we can run
/bin/catas an elevated user.That means we can cat the
/etc/shadowfile.
We can tell that the
rootuser's password is hashed using SHA-512 by the$6$characters.Let's save the
rootuser's hash on our machine.
We have to find the correct mode for SHA-512.

Let's run
hashcatin order to crack this hash.
Answer
root.txt
Let's switch to the
rootuser.
We can now read the
root.txtfile.
Answer
Last updated
Was this helpful?