π©Mr Robot
Can you root this Mr. Robot styled machine? This is a virtual machine meant for beginners/intermediate users. There are 3 hidden keys located on the machine, can you find them?

1.Reconnaisance
1.1 Nmap
Using nmap to scan and identify open ports and services
Webpage
Navigating to the webpage, we get a cool interactive shell-like environment with references to the series Mr Robot. Really fun to play with this and explore the given commands to find more references to the show.

2. Scanning
2.1 Gobuster
Using Gobuster to brute-force directories.
We see a lot of directories and from the list we can find out that it is a WordPress site. We also see
/robots.txtwhich might contain some interesting folders
/robots.txt
/robots.txtNavigating to
robots.txt

We get two new directories
fsocity.dicandkey-1-of-3.txt
/fsocity.dic
/fsocity.dicWe get a dictionary file, possibly useful for brute-forcing later on
Key 1 :
http://10.10.20.163/key-1-of-3.txt
3. Gaining Access
3.1 wp-login
In order to login to the
/wp-login.php, we need admin credentials sop that we can upload our reverse shell and gain access to the box.

For every wrong username, we find the we get an error
Invalid usernameFurther inspecting the request in
burpsuite, we can see that the username and password values are stored in variableslogandpwdand sent to the server respectively

3.2 Hydra
We can use
hydraand the corresponding error messages along with thefsocity.dicfile wordlist to brute-force username and password.The wordlist contains over 850000 words. In order to save time, we can filter repeats from
fsocity.dicand save the filtered (and much smaller) list tofsocity_filtered.dicwhich reduces the number of words to just under 11500
Using hydra and the error message, we can brute-force the username with
fsocity_filtered.dicwordlist and by keeping the password static(In this instance astest)
We get the username
Elliot
Now using the username, we try to login again, and get another error
he password you entered for the username Elliot is incorrect

With this error message, we repeat the brute-forcing attack on the password with
fsocity_filtered.dicw3ordlist, this time usingElliotas the username.
We get the login credentials,
Elliot : ER28-0652
3.3 Reverse Shell
Login in to the portal, we can upload the php -reverse-shell from pentestmonkey in
Appearance>Editor>Header(make sure to change the IP address)

Starting
netcatand executing the reverse shell to get a connection
Stabilizing the shell
Using
findto serch for any file names starting withkey-
We get a hit for
key-2-of-3.txtlocated in the home directory of userrobot
We do not have the permission to access the key as the current user, but we do get access to user
robot's md5 password hash
3.4 John
Saving the md5 hash to a file name
raw-md5.txtin the attacker machine
Using john to crack the password of
robot
We get the credentials
robot : abcdefghijklmnopqrstuvwxyz
Login in as
robotand gettingkey-2-of-3.txt
4.Privilege Escalation
Finding any SUID files for privilege escalation
We can see that SUID is set on
/usr/local/bin/nmapEscalating permissions with
nmapwith the help of gtfobins.
Reading
key-3-of-3.txt
Last updated