✅Delivery (Easy)
Last updated
Last updated
Delivery is a beginner-friendly box that does not require a lot of technical skills to solve. The foothold is about chaining logic flaws between OSTicket and Mattermost. The privesc is hashcat rule-based attack, based on a hint offered when getting the foothold.
Visit port 80. The "Contact Us" page has two links:
To access these two links, edit /etc/hosts
:
The idea is:
Create a ticket on OSTicket and get a @delivery.htb
email address
Register an account on Mattermost using the @delivery.htb
email address
Go back to OSTicket and abuse the "Check Ticket Status" feature to get the activation link from Mattermost
Grab the activation link:
Enter Mattermost:
Here we learn that the credential is maildeliverer:Youve_G0t_Mail!
. The comment on hashcat is the hint for privesc.
Login as the maildeliverer
user through SSH:
Search for the keyword "mattermost":
In /opt/mattermost/config/config.json
, we find a SQL credential mmuser:Crack_The_MM_Admin_PW
:
The password itself is also a hint. Login as mmuser
through mysql
:
The Users
table from the mattermost
database contains usernames and passwords:
Dump the password of root:
Identify hash type:
bcrypt
hashes correspond to 3200
in hashcat:
Remember the hint from the Mattermost comment? Here we should use PleaseSubscribe!
as wordlist and conduct the hashcat rule-based attack. hashcat documentation says:
The rule-based attack is one of the most complicated of all the attack modes. The reason for this is very simple. The rule-based attack is like a programming language designed for password candidate generation. It has functions to modify, cut or extend words and has conditional operators to skip some, etc. That makes it the most flexible, accurate and efficient attack.
This idea is very similar to mutation in fuzzing.
The hashcat rules are located in /usr/share/hashcat/rules
. For this box, we use best64.rule
:
The flags in the hashcat command represents:
-a 0
: set attack mode to "dictionary attack"
-m 3200
: set hash type to bcrypt
-r /usr/share/hashcat/rules/best64.rule
: use best64.rule
to conduct rule-based attack
-o password.txt
: save the output to password.txt
Once the password is cracked, switch to the root user: