3 minutes
Hack the Box - Keeper - Write Up
Keeper
12th Aug 2023
Machine Author(s): knightmare
Enumeration
Initial nmap
scan:
80 - http
Add DNS entries for keeper.htb and tickets.keeper.htb in /etc/hosts
Enumerating Web Page Technologies:
The page is running a Request Tracker service. Request Tracker is an open-source issue tracking and workflow platform developed and supported by Best Practical Solutions.
Searching for Default Credentials on Google:
Upon further inspection of the panel, I discovered an open user ticket.
User Information Discovery:
After opening the user “lnogaard”, I discovered a password in the “Extra Info” field.
🔑 Welcome2023!
Initial Access
Utilizing the obtained user credentials, I attempted to log in via SSH.
User flag:
Privilege Scalation
I found some files in the home folder:
I recognized that the .kdbx is a KeePass database file. Consequently, I transferred it to my local machine using scp
I attempted to crack the password using John the Ripper.
But it took too long, so I decided to explore another approach.
While searching on Google for KeePass vulnerabilities, I came across CVE-2023-32784, which allows for dumping the master password from Keepass .dmp files.
https://github.com/CMEPW/keepass-dump-masterkey
I couldn’t dump the entire password; some characters were missing. But a quick search on Google revealed the reason for the error: the password contains special characters.
I downloaded KeePass and opened the .kdbx
file with the password rødgrød med fløde
I found a PuTTY key in the root entry.
Since PuTTY’s default format is .ppk, I’ll extract the content from the note and save it to a new file with the .ppk extension.
Convert the .ppk to .pem using puttygen
So, all that’s left is to connect via SSH as the root user and retrieve the flag.
Root Flag: