Chúng ta có thể đăng nhập vào host Windows bằng Evil-WinRM (Evil Windows Remote Management) thông qua shell (tương tự SSH) mà không cần sử dụng RDP (Remote Desktop Protocol):

evil-winrm -i IP -u username -p password

Lưu ý là Windows host phải enable và chạy dịch vụ WinRM. Câu lệnh enable:

winrm quickconfig

Tham khảo: https://learn.microsoft.com/en-us/troubleshoot/windows-server/remote/how-to-enable-windows-remote-shell

Error

Nếu xảy ra lỗi sau khi kết nối

Error: An error of type OpenSSL::Digest::DigestError happened, message is Digest initialization failed: initialization error
 
Error: Exiting with code 1

Thì thêm đoạn sau vào /etc/ssl/openssl.conf để cho phép sử dụng các thuật toán cũ:

[provider_sect]
default = default_sect
legacy = legacy_sect
 
[default_sect]
activate = 1
 
[legacy_sect]
activate = 1

Tham khảo: https://forum.hackthebox.com/t/evil-winrm-error-on-connection-to-host/257342/13

list
from outgoing([[WinRM]])
sort file.ctime asc

Resources