简体   繁体   中英

ncat SSL issues, Certificate verification failed (self signed certificate)

I'm currently trying to bind a cmd shell in Windows using ncat with SSL in order to allow a Kali Linux computer to connect.

On the Windows computer, I run

ncat --exec cmd.exe --allow KaliLinux.computer -vnl PortNumber --ssl

On the Kali Linux computer, I then run

ncat -v Windows.computer PortNumber --ssl

I am then prompted on the Kali Linux terminal:

Ncat: Certificate verification failed (self signed certificate).

However, I am still greeted with the Windows CMD output.

On attempting to run any sort of command over this ncat connection, no response is retrieved from the Windows computer and looking at the CMD screen on the Windows computer reveals the connection has closed without any warning/errors.

If I attempt the same without the --ssl flag, the binding and connection works as intended.

My query is, how do I override the certificate verification failed notification or how do I create a valid and secure SSL connection such that the connection works?

Check if your SSL version in both your Windows VM and Kali Linux are compatible. ncat 7.60 doesn't support tls 1.2 anymore.

The other way around is to use OpenSSL instead of ncat on your Kali Linux (you can still use ncat in your Windows VM).

Eg openssl s_client -connect 10.0.0.2:4444

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM