Skip to main content

Enumeration

Run Nmap Scan

Tip: cat nmap | grep 'open' | cut -d / -f 1 | tr '\n' ',’ to get all the ports

View Website

Index

Untitled

/People

Untitled

/Umbraco

Untitled

Directory Bruteforcing (Run Gobuster)

Enumerating FTP (Failed)

List directories and files

Nothing is shown in the FTP.

Check if file upload is permitted

File upload is not permitted from the anonymous user

Enumerating SMB (Failed)

Guest login is not permitted

Enumerating NFS

Show which folder is available

Enumerated NFS protocol using showmount , and there was a folder called /site_backups

Mounting the Folder

I’m going to mount NFS folder /site_backups to our local folder called /tmp/nfs.

Viewing the Folder

After mounting, I cd into the /tmp/nfs which is mounted to /site_backups. Since it is only allowed to be viewed by the file owner, I changed my user account to root to view it.

Exploitation

Finding Credentials

Finding credentials from Web.config

Web.config is a config file used for IIS. It contains a credential which can be extract by the command cat Web.config | grep 'conntectionString. Here you can see that the credential is referenced through the file called Umbraco.sdf

Searching Umbraco.sdf

Searching for Strings in Umbraco.sdf

The file Umbraco.sdf was a binary file which contains our credential. Since I just wanted the credentials, I used strings .

Cracking the Hash

CrackStation - Online Password Hash Cracking - MD5, SHA1, Linux, Rainbow Tables, etc. I used crackstation to decrypt the hash. Untitled

Accessing Services with the obtained Credentials

FTP (Failed)

SMB (Failed)

/Umbraco

Untitled We got in!

Exploiting Umbraco

Enumerating Service Information

Untitled When you click the ? icon located at the bottom, the popup menu will appear at the left shown above. The version used is Umbraco 7.12.4

Searching for Exploit

Here I’m going to use aspx/webapps/49488.py. I tried the other exploit, but the exploit didn’t work. (aspx/webapps/46153.py)

Generating Reverse Shell

Online - Reverse Shell Generator Set your attack machine IP and Port Untitled Generate powershell exploit in Base64 → Goto powershell #3 (base64) Untitled Copy the base64 payload with -e
Place the base64 code with -e inside the proc.StartInfo.Arguments
This is the payload that I used.

Configuring RHOST and Authentication Credentials

Listen to Reverse Shell and Exploit

Privilege Escalation

Using Kernel Exploit (Failed)

Getting Systeminfo and Saving the file as systeminfo.txt

Save the above text as systeminfo.txt (Without the command)

Install and execute wes-ng

Search for Privilege Escalation Kernel Exploit

No exploits

Enumerating Services

Searching for interesting services

TeamViewer_Service.exe seems interesting!

Finding Credentials from TeamViewer Registry

The Registry SecurityPasswordAES REG_BINARY FF9B1C73D66BCE31AC413EAE131B464F582F6CE2D1E1F3DA7E8D376B26394E5B is what we were finding!

Cracking TeamViewer Credentials

https://gist.github.com/rishdang/442d355180e5c69e0fcb73fecd05d7e0

Accessing SMB using Admin Credentials

Reference