日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

C Yassp工具包安裝安全的 Solaris 系統(tǒng)( 三 )


55 23 * * 6 /secure/rotate_log -n 40 kernlog
55 23 * * 6 /secure/rotate_log -n 40 local0log
55 23 * * 6 /secure/rotate_log -n 40 local2log
55 23 * * 6 /secure/rotate_log -n 40 local5log
55 23 * * 6 /secure/rotate_log -n 40 newslog
55 23 * * 6 /secure/rotate_log -n 40 userlog
55 23 * * 6 /secure/rotate_log -n 40 lprlog
55 23 * * 6 /secure/rotate_log -n 40 maillogd
在root的cron中加入每年清理日志文件的條目
##Empty login/logout records at year end
0 0 31 12 * /secure/wtrim.pl wtmp 20
0 0 31 12 * /secure/wtrim.pl wtmpx 20
#
#Solaris 2.x logs
0 4 * * 6 /secure/totate_log -L /var/adm -n 30 loginlog
0 4 * * 6 /secure/rotate_log -L /var/adm -n 30 sulog
0 4 * * 6 /secure/rotate_log -L /var/adm -n 2 vold.log
0 4 * * 6 /secure/rotate_cron

其它的需要在root的cron設(shè)置條目:
每天與可靠的時(shí)間源進(jìn)行時(shí)間同步,使用rdate(NTP會(huì)更加精確,但會(huì)帶來相應(yīng)的風(fēng)險(xiǎn))
##Synchronise the time:
0 * * * * /usr/bin/rdate YOURTIMEHOST >/dev/null 2>&1
安裝檢查重要進(jìn)程是否運(yùn)行的腳本,monitor_processes.pl并在root的cron中加入:
##Check that important processes are running during Office hours:
##[If you run 7x24,modify accordingly]
0,30 8-19 * *1-5 /secure/monitor_processes.pl sshd httpd

每次安裝新的程序后,最好在文件中記錄下來,如:
cat >/etc/mods<
15.10.00 james New install of Solaris8 and tools
EOF

10、限制SUID文件
設(shè)置SUID位的文件,允許用戶以文件所有者的權(quán)限執(zhí)行此程序 。常用來讓普通用戶執(zhí)行只有root

能運(yùn)行的程序,但是存在緩存溢出的風(fēng)險(xiǎn) 。
* Solaris有很多“SUID root”的執(zhí)行程序,每一個(gè)都會(huì)帶來風(fēng)險(xiǎn),因此盡可能多的停止SUID程

序 。
* 閱讀SUID的參考文件

發(fā)現(xiàn)系統(tǒng)中的SUID文件
使用find命令:
find / -perm -u s -ls
find / -perm -g s -ls 查找GUID程序

如何處理SUID文件:
* 直接刪除
* 關(guān)閉程序(chmod 000 FILENAME)
* 移去SUID位(chmod ug-s FILENAME)
* 對(duì)文件回以組限制(首先移去所有人的權(quán)限 chmod o-rwx),允許組訪問(chgrp MYGROUP

MYFILE) 。

哪些SUID文件需要回以限制
* 在一些具有用戶帳號(hào)的敏感服務(wù)器上或者關(guān)鍵的進(jìn)程由非root用戶運(yùn)行,應(yīng)盡可能地減少SUID

文件 。
* 對(duì)于可靠性要求非常高的系統(tǒng),建議除"pt_chmod","utmp_update"和"su"以外,其余全停 。
* Reg Quinton解釋了每一個(gè)SolarisSUID程序,并給出配置建議 。
* 例子:
* 象uucp這樣的工具,基本無用,可以刪除
pkgrm SUNWbnuu
chmod ug-s /usr/bin/cu /usr/bin/uu* /usr/lib/uucp/*
* 另一個(gè)沒有用處的工具包是kcms(Kodak Color Management System)
pkgrm SUNWkcspf SUNWcspx SUNWkcspg SUNWkcsrt
chmod ug-s /usr/openwin/bin/kcms*
* 如果不使用打印機(jī)
chmod ug-s /usr/lib/lp/bin/netpr /usr/sbin/lpmove /usr/bin/lp /usr/bin/lpset

/usr/bin/lpstat /usr/bin/cancel /etc/lp/alerts/printer
* 只允許root使用r命令
chmod ug-s /usr/bin/rcp /usr/bin/rlogin /usr/bin/rsh
* 只允許root對(duì)網(wǎng)絡(luò)進(jìn)行偵聽及列出進(jìn)程列表
chmod ug-s /usr/sbin/snoop /usr/sbin/devinfo /bin/rdist /usr/bin/netstat

/usr/local/bin/top /usr/sbin/traceroute /usr/local/bin/lsof /usr/bin/*/ps

/usr/ucb/*/ps /usr/sbin/*/whodo /usr/bin/*/uptime /usr/bin/*/w
* 只允許root做備份和恢復(fù)
chmod ug-s /usr/lib/fs/ufs/ufsdump /ufs/ib/fs/ufs/ufsrestore
* 假設(shè)不使用YP、NIS
chmod ug-s /usr/bin/chkey
* 只允許root使用cron和at
chmod ug-s /usr/bin/at /usr/bin/atq /usr/bin/atrm /usr/bin/crontab
* 只允許root管理系統(tǒng)
chmod ug-s /usr/bin/admintool /usr/lib/fs/ufs/quota /usr/bin/tip /usr/bin/fdformat

/usr/bin/eject /usr/bin/volcheck /usr/bin/volrmmount /usr/bin/rmformat
* 不使用Openwindows和CDE
chmod ug-s /usr/dt/bin/* /usr/openwin/*/*
* Sendmail:不做email服務(wù)器的主機(jī)不需要sendmail設(shè)置SUID位

推薦閱讀