Cyborg
Task 1: Deploy the machine
Deploy the machine
We simply have to click on the
Start Machinebutton.

No answer needed
Task 2: Compromise the System
Scan the machine, how many ports are open?
Let's perform an
nmapscan on the IP address.
There are two open ports:
22
ssh
80
http
Answer
What service is running on port 22?
Answer
What service is running on port 80?
Answer
What is the user.txt flag?
Let's check the target's web page through the browser.

Now that we know it is hosting a
apache2server, we can brute force the directories usinggobuster.
Let's go to the
admmindirectory and see what we can find.

Let's go to the
Adminpage.

From what Alex said in his final message, we know that he has probably set up a squid proxy.
Before we look for it's directory let's see what
Archivehas.

Let's click on
Download.
We can extract his archive using the
tarutility.
After extracting the archive, if we go to
home/field/dev/final_archiveand cat theREADMEfile present there we get the following information.
BORG backup
BORG is a duplication program used to securely and efficiently backup data.
It can also be used to backup entire filesystems which can then be mounted onto other filesystems for easier examination.
Having read the messages between the two admin, we can guess that this is a probably a backup of Alex's filesystem.
However, before we do that, let's first check out the
etcdirectory as well.

Ah! So this is where the
squiddirectory for the Squid proxy was located. Let's go inside.

The
passwdfile probably has some useful information.

We have what looks to be a pair of a username
music_archiveand a hashed password$apr1$BpZ.Q.1m$F0qqPwHSOG50URuOVQTTn..Let's identify the hash using the
hash-identifierutility.
Before we crack the hash let's save the hash in a
hash.txtfile and take a look at the hash-mode for MD5(APR).

Now we can use
hashcatto crack the hash.
Now we know both the username and the password.
We are all set to extract the Alex's filesystem. We can use the
borgutility to do this.
If we then go to the
home/alex/Documentsdirectory, we see anote.txtfile.Let's
catout the file.
Let's try to
sshinto the machine using the above credentials.
We have successfully logged on to Alex's machine.
Let's look around to see what we can find.
The
user.txtfile seems interesting. Let's check it's contents.
Answer
What is the root.txt flag?
In order to find the root flag we need to become the
rootuser.Using the
sudo -lcommand we can see whatsudopermissions thealexuser has.
We can see the
/etc/mp3backups/backup.shscript can be executed by any user, including us.
Looking inside the
whilelook, we can see that the program takes in user command identified by-c, and executes it.Using this knowledge, we can set the
suidbit on the/bin/bashfile.
Now on executing the
bashcommand, we will get root privilege.Let's check our effective ID.
We can now go the
/rootdirectory.
Let's
catthe flag.
Answer
Last updated
Was this helpful?