Hackthebox - Health
Author: irogir
Initial Enumeration
sql
1 | # Nmap 7.92 scan initiated Sun Aug 21 10:06:05 2022 as: nmap -sC -sV -vvv -oN nmap/health 10.129.11.149 |
Web
Creating
Trying /webhook/ endpoint without UUID w get a stack trace
Trying file://… or http://localhost
throw an error as MonitoredURL blocked
Running an Python redirect server
python
1 | #!/usr/bin/env python3 |
We see that port 3000 is running an Gogs Server
Also in the page we see that the gogs version is
really old
After lots of struggles i was able to proceed to get an SQLi
but using the SQLi
python
1 | #!/usr/bin/env python3 |
I got all the Values
avrasm
1 | username: susanne |
Cracking the hash
we get the password as february15
Checking pspy
We see a cron running to do the health check
with that we create a task with monitoredUrl to be file:///root/.ssh/id_rsa
and waiting for a minute we get the root private key
with the key we can ssh to the box as root