We only have one port open. Let's head over to our browser and check what website is running.
File Server??
Looks like a file server. There is even a link to access the login page. Let's click on it.
Further googling reveals that there are no default credentials for HTTP File Server (HFS). Let's try a different route.
Using Metasploit
Initial Foothold
From our nmap scan, we know the HFS is version 2.3. Let's search for any publicly available exploits.
We find several.Let's first focus on the Remote Command Execution vulnerabilities. I can see there's a metasploit exploit so I'll check that one out first.
After configuring the options, I run the exploit.
Success! I get a meterpreter shell and go on to retrieve the user flag.
User Flag retrieved
We also receive further information regarding the box. For instance, it's architecture is x64, and it's running Windows 2012 R2 (6.3 Build 9600).
Our meterpreter shell is x86/windows. It's important to change it to be the same type as our machine. To do that, use the background command to background our current session. Then use the post/windows/manage/archmigrate module which checks if the meterpreter architecture is the same as the OS architecture and if it's incompatible, it spawns a new process with the correct architecture and migrates into that process. Finish setting up the options then run it.
Once it has successfuly run, exit out of the module using the back command. Then run our initial session using session -i 1. This will change our meterpreter session to be x64.
Let's use the getuid command to find out who we are on the machine.
Since we are not authority\system, we will need to escalate our privileges.
Privesc with Metasploit
The getsystem command also doesn't work for us.
Let's background our session and use suggester.
Type info to find out more details about it.
Suggester Description
Let's run it.
We get a few hits that our machine could be vulnerable to some exploits. Before we go ahead in finding out more about them and see if they can help us privesc, let's do some further enumeration.
We know that the machine's OS is Windows 2012 R2 (6.3 build 9600). Let's google for exploits against it.
We get feedback on which vulnerabilities exist on the machine.
We already tried exploiting MS16-032 using msfconsole but unfortunately, it failed. We could try exploiting it manually but it's a little too out of scope for this machine. It involves a lot of powershell modification. We are also going to ignore the others for now. But this is a useful tool and we will remember it for the future.
Open up google and search for windows exploit suggester.