Servmon
Personal Rating: Medium
Enumeration
sudo nmap -sV -sC -p- <IP>
That is a lot of output. It is clear that we have a Windows Server machine with an IIS based website.
21 ftp:
So there is some secure folder in Sharepoint for passwords
80 http:
The directory traversal is very simple: /../../../../../../../../../../../../windows/win.ini But it did not work.
8443 https:
5666:
Likely NRPE (Nagios)
There are many Nagios exploits according to searchsploit. Maybe I can find out the version.
6699:
Possibly WinMX or napster
NVMS LFI
Possibly we can get the Passwords.txt file via the LFI that was mentioned in Confidential.txt eventhough it did not work at first.
The metasploit version of the exploit worked. But why?
This is what metasploit sent. After testing the same in the browser I saw that something removed my payload from the URL ;_;
The resulting file contained 7 passwords. I will try them all with nathan and nadine on ssh. Using hydra will make that faster:
hydra -L userlist.txt -P 20231211170419_default_10.10.10.184_nvms.traversal_767567.txt 10.10.10.184 ssh
Internal Enumeration
So I could log in with nadine. nadine has no special privileges:
I transferred winpeasx64.exe onto the host with a python webserver and wget in powershell and ran it.
It actually seems like Defender blocked WinPEAS:
Access to the command systeminfo
is also denied.
Since evil-winrm has a built-in AMSI bypass, I will try that.
evil-winrm -i 10.10.10.184 -u nadine -p 'L1k3B1gBut7s@W0rk'
This did work. In ‘Program Files’ you can see ‘Windows Defender Advanced Threat Protection’.
This, which I found with searchsploit, might work: NSClient++ 0.5.2.35 - Privilege Escalation
According to the exploit entry, I can grab the Password from C:\Program Files\NSClient++\nsclient.ini:
This also worked: .\nscp.exe web password --display
Lets see if it works for ssh with root. Nope. Also not for Nathan.
With the Python version I get a 403 and with the metasploit version I get that the admin password is wrong.
Privilege Escalation
Using scanner/ssh/ssh_login I could get a metasploit session with nadine:L1k3B1gBut7s@W0rk
I was about to set up dynamic port forwarding to the host, but using netstat -ano
I could see that I should be able to regularly access the application.
Watching Ippsecs video since I was stuck here I found out, that the only reason why I could not properly use the website at port 8443 was that it does only work with chromium ;_;
So this exploit should now be possible
ew2x6SsGTxjRwXOT
Did not work, the page shows 403
The Python version of the exploit did not work either:
With a local port forwarding it worked, so it seems like the application is not accessible online
Now this one worked better but I did not get a shell: windows/http/nscp_authenticated_rce
It looks like I have to do the exploit manually to make it work.
This one seems to work with ssh local port forwarding set up, but nc.exe did not work as the file seems corrupted.
python3 exploit.py 'cmd.exe /c "C:\Users\Nadine\Documents\evil.bat"' https://127.0.0.1:8443 ew2x6SsGTxjRwXO
Another attempt:
Got it!
Last updated