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] |