-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Statically built ncat fails to manage input from network when --ssl switch is active. For example:
C:\nmap-6.47\ncat\Release>ncat.exe 10.0.2.2 8888 --ssl -vvv -e cmd.exe
Ncat: Version 6.47 ( http://nmap.org/ncat )
NCAT DEBUG: Not doing certificate verification.
libnsock nsi_new2(): nsi_new (IOD #1)
libnsock nsock_connect_ssl(): SSL connection requested to 10.0.2.2:8888/tcp (IOD #1) EID 9
libnsock nsock_trace_handler_callback(): Callback: SSL-CONNECT SUCCESS for EID 9 [10.0.2.2:8888]
Ncat: SSL connection to 10.0.2.2:8888.
Ncat: SHA-1 fingerprint: DBF1 C72E C572 1B5E 6AA1 942C F3D9 FAA1 6710 752D
libnsock nsi_new2(): nsi_new (IOD #2)
NCAT DEBUG: Executing: cmd.exe
NCAT DEBUG: Creating named pipe ".\pipe\ncat-2340-0"
NCAT DEBUG: Register subprocess 00000168 at index 0.
----------------- other side sent command here -----------------
NCAT DEBUG: Unregister subprocess 00000168 from index 0.
NCAT DEBUG: Subprocess still running, terminating it.
NCAT DEBUG: Subprocess ended with exit code 0.
Command is not executed and connection is dropped aparently with no error message. When executing the same sequence without --ssl switch it works as expected.