Analytics

Recon

![[Labs/HackTheBox/Seasonal/Season 3/Analytics/nmap_scan.log styled]]

HTTP (80)

![[Labs/HackTheBox/Machines/Analytics/images/Writeup.png]]

Enumerate subdomains:

└─$ domain='analytical.htb'; ffuf -u "http://$domain/" -H "Host: FUZZ.$domain" -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -mc all -fw 4
       v2.1.0-dev
data                    [Status: 200, Size: 77858, Words: 3574, Lines: 28, Duration: 153ms]
:: Progress: [4989/4989] :: Job [1/1] :: 564 req/sec :: Duration: [0:00:09] :: Errors: 0 ::

Metabase is running on this subdomain

![[Labs/HackTheBox/Machines/Analytics/images/Writeup-1.png]]

Application version is disclosed in the source: v0.46.6

![[Labs/HackTheBox/Machines/Analytics/images/Writeup-2.png]]

Chaining our way to Pre-Auth RCE in Metabase (CVE-2023-38646)arrow-up-rightCVE-2023-38646arrow-up-right PoC

The PoC didn't work for me for some reason, error about Vector arg to map conj must be a pair so it must be related to base64 blob and bash.

I just used curl to get the shell:

Application contains database.db (directory...), but no sqlite3.

Download via netcat:

metabase.db.mv.db file is a H2 Server database file, DBeaver can be used to open it. I don't think the password is crackable so Im going to avoid it for now.

![[Labs/HackTheBox/Machines/Analytics/images/Writeup-3.png]]

Environment variables hold interesting data!

SSH

Creds: metalytics:An4lytics_ds20223#

User.txt

Privilege Escalation

Linpeas shows nothing interesting.

As of doing retired box HTB suggests checking kernel version. Box was released on 07 Oct 2023 so there's probably some kernel exploit.

Ubuntu Local Privilege Escalation (CVE-2023-2640 & CVE-2023-32629)arrow-up-rightCVE-2023-2640-CVE-2023-32629arrow-up-right

Root.txt

Last updated