Delivery (Easy)
Delivery Hackthebox Walkthrough
Enumeration
Nmap
We can see that port 80 is open. Lets navigate to that.
After some exploration, I found out that CONTACT US and HELPDESK will lead us to another link.
Contact us will lead us to a service called Mattermost
Meanwhile, notice that we can't access this link as it redirects to this domain, we need to add the IP and the domain to the /etc/host file.
After that, we will get a completely new webpage.
After poking around, we can create a new ticket by clicking the Open New Ticket
After submitting, a ticket will be created.
From the message above, we can see that if we want to add more information to the ticket, just email the email provided at the body message.
When we explore the account creation for the Mattermost service, when we use our own gmail to register, we can't seem to receive the email verification (or should I say we must use the domain email to register)
Link with the email provided above, we can use that email to register.
Then, we can use check ticket status by input the email and ticket ID that provided just now.
Wow, got the verification. We proceed to verify it and login.
There are some messages provided by root and there is a credentials given.
Remember there is a port 22 open? Lets SSH into it.
Finally got a foothold.
Privilege Escalation
After poking around for some time, we found that MySQL is running and we found a config.json that is inside the /opt/Mattermost/config directory.
We can see the credentials above which is
Log in to the mysql server and we can output the data records for table Users
Note: I just select username and password because the full output is too messy
Notice that we got the hash of root password.
Recalling back the root messages from Mattermost service, it is hint to use hashcat rules to crack the password.
Hashcat
We first need to create a wordlist for cracking the password. For this round we just need to input PleaseSubscribe!
Then we need to specify the type of the attack which the hash is in Bcrypt and the rules for attacking it.
We going to use the rules from /usr/share/hashcat/rules/best64.rule
After running the command above, we finally crack the hash which is PleaseSubscribe!21
Finally we can su to root!
Congrats!
Last updated