Evil-winrm error on connection to host

Evil-winrm is a popular tool used to perform remote Windows exploitation and privilege escalation. When you encounter an error while connecting to a host using evil-winrm, there are several things you can do to troubleshoot the issue. Here are some tips to help you fix evil-winrm error on connection to host:

Verify the connection details: Ensure that you are using the correct IP address or hostname, port number, and credentials for the target system. Double-check the spelling and formatting of the connection details, as even a small error can prevent you from connecting.

Check network connectivity: Make sure that the target system is reachable from your machine. Check the firewall settings on the target system and any intermediate devices such as routers or firewalls that may be blocking the connection.

Verify credentials: Ensure that the credentials you are using to connect to the target system are correct and have sufficient privileges to perform the desired actions. Try using different credentials if you have them available.

Regards,
Rachel Gomez

Perfect. Thank you

I had the same issue with Ubuntu 22.04. Use ruby 2.7.0. This fixed my issue:

curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm pkg install openssl
rvm install ruby-2.7.0 --with-openssl-dir=$HOME/.rvm/usr
gem install evil-winrm
2 Likes

I love you! C: this worked for me

thanks

good job, thank you very much.

Same here, so I tried to run evil-winrm in Docker instead. The Digest-related error is gone, but I get another one:

Evil-WinRM shell v3.5
                                        
Info: Establishing connection to remote endpoint
                                        
Error: An error of type HTTPClient::ReceiveTimeoutError happened, message is execution expired
                                        
Error: Exiting with code 1

Update

Changing the VPN protocol type from UDP to TCP resolved the connection error.

save my day… thanks… i am using CrunchBang++

Carefully read the comments in the configuration file!!!11

# If you add a section explicitly activating any other provider(s), you most
# probably need to explicitly activate the default provider, otherwise it
# becomes unavailable in openssl.  As a consequence applications depending on
# OpenSSL may not work correctly which could lead to significant system
# problems including inability to remotely access the system.

So if activate = 1 is commented out in your [default_sect] you definitly want to uncomment this! That would have saved me an extra hour of troubleshooting… :roll_eyes:

For search engines: The evil-winrm error message without that additional activate was

/usr/lib/ruby/3.0.0/openssl/pkey.rb:132:in `initialize': could not parse pkey: (null) (OpenSSL::PKey::DHError)

Thank you so much, buddy! I can’t tell you how many hours I spent trying to fix this problem, and it was driving me crazy!
I’m using Debian 12 with Ruby version 3.1.2. After trying all the solutions offered by the community, I just couldn’t get it to work.
But thanks to your advice, I was able to downgrade to version “ruby 2.7.0p0 (2019-12-25 revision 647ee6f091)” and complete the machine.

THANK YOU SO MUCH!

Thank u so much. :sparkling_heart:

thanks

thanks!

thank you so much for this. for others, if you wanna do this solution you have to source ~/.rvm/scripts/rvm every time you wanna use evil-winrm. it might also ask you to install a specific version of nori, just do that and youll be gucci