Reconnaissance
First, I added the new host to my known ones:
Then, I performed a Nmap scan:
So I checked its webpage:
I tried to check the login but I needed to add the subdomain data.analytical.htb
:
After adding it, we get a Metabase login:
Weaponization
I searched for โMetabase exploitโ in google and found CVE-2023-38646 Poc.
Exploitation
First, we must get the setup token (can be obtained under /api/session/properties
endpoint):
In my case itโs 249fa03d-fd94-4d5b-b94f-b4ebf3df681f
.
Then I executed the script like:
Now weโve got a reverse shell :D
Lateral Movement
It seems that we are inside a container:
We can also see a metabase.db
database, which could hide some credentials.
If we run printenv
we can see the variables that were set:
Now weโve got credentials (that worked via ssh on the host machine :D). We can now read user flag!
Privilege Escalation
We can obtain the kernel version of the OS with uname -a
:
So as it is an Ubuntu, we can check the version of it and the release with lsb_release -a
:
So if we search for โUbuntu jammy exploitโ we find CVE-2023-32629, also called GameOver(lay):
If we execute it we become root and can read root flag :D
Machine pwned!