|
*-rws--x--x 1 root root 5576 Apr 17 12:57 /usr/bin/newgrp
*-rwxr-sr-x 1 root tty 8392 Apr 17 12:57 /usr/bin/write
-rwsr-x--- 1 root squid 14076 Oct 7 14:48 /usr/lib/squid/pinger
-rwxr-sr-x 1 root utmp 15587 Jun 9 09:30 /usr/sbin/utempter
*-rwsr-xr-x 1 root root 5736 Apr 19 15:39 /usr/sbin/usernetctl
*-rwsr-xr-x 1 root bin 16488 Jul 6 09:35 /usr/sbin/traceroute
-rwsr-sr-x 1 root root 299364 Apr 19 16:38 /usr/sbin/sendmail
-rwsr-xr-x 1 root root 34131 Apr 16 18:49 /usr/libexec/pt_chown
-rwsr-xr-x 1 root root 13208 Apr 13 14:58 /bin/su
*-rwsr-xr-x 1 root root 52788 Apr 17 15:16 /bin/mount
*-rwsr-xr-x 1 root root 26508 Apr 17 20:26 /bin/umount
*-rwsr-xr-x 1 root root 17652 Jul 6 09:33 /bin/ping
-rwsr-xr-x 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
把結(jié)果輸出到文件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
四、建議替換的常見網(wǎng)絡(luò)服務應用程序
WuFTPD
WuFTD從1994年就開始就不斷地出現(xiàn)安全漏洞,黑客很容易就可以獲得遠程root訪問(Remote Root Access)的權(quán)限,而且很多安全漏洞甚至不需要在FTP服務器上有一個有效的帳號。最近,WuFTP也是頻頻出現(xiàn)安全漏洞。
它的最好的替代程序是ProFTPD。ProFTPD很容易配置,在多數(shù)情況下速度也比較快,而且它的源代碼也比較干凈(緩沖溢出的錯誤比較少)。有許多重要的站點使用ProFTPD。sourceforge.net就是一個很好的例子(這個站點共有3,000個開放源代碼的項目,其負荷并不小。。。一些Linux的發(fā)行商在它們的主FTP站點上使用的也是ProFTPD,只有兩個主要Linux的發(fā)行商(SuSE和Caldera)使用WuFTPD。
ProFTPD的另一個優(yōu)點就是既可以從inetd運行又可以作為單獨的daemon運行。這樣就可以很容易解決inetd帶來的一些問題,如:拒絕服務的攻擊(denial of service attack),等等。系統(tǒng)越簡單,就越容易保證系統(tǒng)的安全。WuFTPD要么重新審核一遍全部的源代碼(非常困難),要么完全重寫一遍代碼,否則WuFTPD必然要被ProFTPD代替。 |
|
【收藏】【打印】【進入論壇】 |
|
|
|
|
|
|
|