Simple TLS Listener

$ nc -lvnp 12345

Option 1 — ncat from nmap

nmap includes a version of netcat called ncat that supports TLS. This is the easiest option as it can also generate a certificate on the fly for you. Example:

$ ncat -lvnp 12345 --ssl

Option 2 — socat

socat is a more advanced version of netcat that includes numerous useful features. To create a TLS server you will need to generate a server key and certificate first using openssl:

$ openssl req -new -x509 -keyout test.key -out test.crt -nodes
$ cat test.key test.crt > test.pem
$ socat openssl-listen:12345,reuseaddr,cert=test.pem,verify=0,fork stdio

--

--

Random rumblings about #InfoSec. The opinions expressed here are my own and not necessarily those of my employer.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Airman

Airman

Random rumblings about #InfoSec. The opinions expressed here are my own and not necessarily those of my employer.