β Silo (Medium)
Lesson Learn
Report-Penetration
Vulnerable Exploit: Default Credentials
System Vulnerable: 10.10.10.82
Vulnerability Explanation: The machine is using default credential which could allow us to upload reverse shell and gain initial foothold on the machine.
Privilege Escalation Vulnerability: Not restricted access to sensitive file
Vulnerability Fix: Implement strong password policy and restricted permission
Severity: High
Step to Compromise the Host:
Reconnaissance
Port 80 http Microsoft-IIS/8.5
Port 135,49152,49153,49154,49155,49160,41961, 41962 running Microsoft Window RPC
Port 139,445 running microsoft SMB
Port 1521, 49159 running Oracle TNS listener
Port 5985, 47001 running Microsoft-HTTPAPI/2.0
Enumeration
Port 80 Microsoft-IIS/8.5
I will go through port 80 first, it just displays a default webpage of IIS. For gobuster result also didn't find any interest. Let Move On.

Port 139,445 SMB
We didn't see anything interesting too.
Port 1521,49159 Oracle TNS Listener
There is a blackhat presentation about the exploit.
First thing we need to identify SID with the help of tool odat and sidguesser module.
Next step, we need to guess or brute force for username / password with SID we found. Let copy the wordlist from metasploit and add / in between username and password.
We found valid credential scott / tiger.
Let connect to the oracle with the help of tool sqlplus. As we can see we have least privilege.
Let connect again with as sysdba which mean as sudo in oracle. We can see, with sysdba, we have a lot of information.
#1 Exploitation (No Priv-Esc)
Let generate our reverse shell payload with exe extension.
Let start our netcat listener on port 4444.
Try to upload our payload to the machine. We have least privilege. Let try with sysdba.
Once, we have upload, we cannot execute it via web browser. We can use module externaltable.
We are now the authority system.

#2 Exploitation (Priv-Esc)
Shell as service user
Let upload the file command execution to the machine.

As we have checked the system is x64 architecture, let start SMB Server to share file netcat.
Start our netcat listener on port 4444.
Try to execute netcat reverse shell to our machine.


Shell as Authority System
Going through user Phineas, we found file Oracle issue.txt which contain the link to dropbox and password.
On our terminal screen could not read the password properly.

Let download it to our machine and open it with notepad or gedit. Now we can see it properly.

Follow through the link and it's valid. Enter the password we found a zip file to download.


Let download it to our machine and unzip it. We see there is a file with dmp extension.
DMP file contains data dumped from a program's memory space. They are often created when a program has an error or crashes.
There is a tool called Volatility, we can download from here. Volatility is an open-source memory forensics framework for incident response and malware analysis.
First enumerating on OS. We found it's running on Window server 2012 and x64.
Let run the tool volatility --info flag to see the profiles.
As we can see the profiles name Win2012R2x64. Let run with plugin kdbgscan.
Now we have the offsets for the registry of SYSTEM and SAM. Let use the plugin hashdump to extract hash from the machine.
Now we got the hash of all the users on the machine.
Last updated