打印本文 打印本文 关闭窗口 关闭窗口
Linux 网络安全技巧
作者:武汉SEO闵涛  文章来源:敏韬网  点击数1601  更新时间:2009/4/22 20:47:26  文章录入:mintao  责任编辑:mintao
1 root root 20164 Apr 17 12:57 /bin/login
*-rwxr-sr-x 1 root root 3860 Apr 19 15:39 /sbin/netreport
-r-sr-xr-x 1 root root 46472 Apr 17 16:26 /sbin/pwdb_chkpwd
[root@deep]# chmod a-s /usr/bin/chage
[root@deep]# chmod a-s /usr/bin/gpasswd
[root@deep]# chmod a-s /usr/bin/wall
[root@deep]# chmod a-s /usr/bin/chfn
[root@deep]# chmod a-s /usr/bin/chsh
[root@deep]# chmod a-s /usr/bin/newgrp
[root@deep]# chmod a-s /usr/bin/write
[root@deep]# chmod a-s /usr/sbin/usernetctl
[root@deep]# chmod a-s /usr/sbin/traceroute
[root@deep]# chmod a-s /bin/mount
[root@deep]# chmod a-s /bin/umount
[root@deep]# chmod a-s /bin/ping
[root@deep]# chmod a-s /sbin/netreport

你可以用下面的命令查找所有带s位标志的程序:
[root@deep]# find / -type f ( -perm -04000 -o -perm -02000 ) -exec ls -lg {} ;
> suid-sgid-results
把结果输出到文件suid-sgid-results中。
为了查找所有可写的文件和目录,用下面的命令:
[root@deep]# find / -type f ( -perm -2 -o -perm -20 ) -exec ls -lg {} ; > ww-files-results
[root@deep]# find / -type d ( -perm -2 -o -perm -20 ) -exec ls -ldg {} ; > ww-directories-results
用下面的命令查找没有拥有者的文件:
[root@deep]# find / -nouser -o -nogroup > unowed-results
用下面的命令查找所有的.rhosts文件:
[root@deep]# find /home -name .rhosts > rhost-results
 

上一页  [1] [2] 

打印本文 打印本文 关闭窗口 关闭窗口