HackMyVM
Nmap Results
-> notes.txt
Hi teo, the database with your credentials to access the resource are in the secret directory (Don’t forget to change X to your employee number)
regards IT department
db.kdbx [Status: 200, Size: 2078, Words: 12, Lines: 15] index.html [Status: 200, Size: 7, Words: 1, Lines: 8]
Cracking the password of “db.kdbx”
dreams (db) <— password
Acessing db.kdbx
admin:w3bd4vXXX
Now we need to find the right employee number to fill the XXX.
Result
[80][http-get] host: 192.168.15.91 login: admin password: w3bd4v513
Submitting a reverse shell
Checking the “sudo -l”, it’s possible to execute wget as teo. So, upload a rsa key to teo
Then, just login via ssh using teo user.
user.txt –> ZHgKGiUPm7T7yyLDD9HnqXF3eIkLs6
PrivEsc
User teo may run the following commands on Serve: (root) NOPASSWD: /usr/local/bin/bro
Executing “sudo /usr/local/bin/bro curl”, note that the binary utilize “less” utility, so just run “!bash”. And there it is, you got root shell
root.txt –> vWiU6Ums1pmZAYX0QyXvkclyPZ4lyi