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

Solaris安全手冊(cè)( 三 )


chmod 600 daemonlog authlog kernlog userlog maillog lprlog cronlog
newslog locallog alertlog;
kill -1 `pgrep syslogd`
使用rotate_log來(lái)修剪和壓縮LOGS文件,在root cron中增加如下條目:
## Prune syslog logs weekly, keeping the last 6 months or so:
55 23 * * 6 /secure/rotate_log -L /var/log -c -m 600 -M 400 -c -s -n 40 alertlog
55 23 * * 6 /secure/rotate_log -L /var/log -c -m 600 -M 400 -c -s -n 40 authlog
55 23 * * 6 /secure/rotate_log -L /var/log -c -m 600 -M 400 -c -s -n 20 cronlog
55 23 * * 6 /secure/rotate_log -L /var/log -c -m 600 -M 400 -c -s -n 40 daemonlog
55 23 * * 6 /secure/rotate_log -L /var/log -c -m 600 -M 400 -c -s -n 40 kernlog
55 23 * * 6 /secure/rotate_log -L /var/log -c -m 600 -M 400 -c -s -n 40 locallog
55 23 * * 6 /secure/rotate_log -L /var/log -c -m 600 -M 400 -c -s -n 20 newslog
55 23 * * 6 /secure/rotate_log -L /var/log -c -m 600 -M 400 -c -s -n 40 userlog
55 23 * * 6 /secure/rotate_log -L /var/log -c -m 600 -M 400 -c -s -n 10 lprlog
55 23 * * 6 /secure/rotate_log -L /var/log -c -m 600 -M 400 -c -s -n 20 maillog
# Reset syslog daemon
0,15,30 0 * * 0 kill -HUP `cat /etc/syslog.pid`
為了你自己使用上面的條目請(qǐng)?jiān)趓oot cron中使其他的log修剪(pruning)無(wú)效:
#10 3 * * 0,4 /etc/cron.d/logchecker
#10 3 * * 0 /usr/lib/newsyslog
#15 3 * * 0 /usr/lib/fs/nfs/nfsfind
#1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
#30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
Pruning of login & other logs:
## Empty login/logout records at year end
0 0 31 12 * /secure/wtrim.pl wtmp
0 0 31 12 * /secure/wtrim.pl wtmpx 20
# Solaris 2.x logs:
0 4 * * 6 /secure/rotate_log -L /var/adm -c -m 640 -M 440 -c -s -n 30 loginlog
0 4 * * 6 /secure/rotate_log -L /var/adm -c -m 640 -M 440 -c -s -n 30 sulog
0 4 * * 6 /secure/rotate_log -L /var/adm -c -m 640 -M 440 -c -s -n 2 vold.log
0 4 * * 6 /secure/rotate_cron
crons
刪除不需要的crons:rm /var/spool/cron/crontabs/{lp,sys,adm}
Root cron 條目:
通過(guò)可信賴的來(lái)源使用rdate設(shè)定日期(你或許使用NTP協(xié)議,這將使時(shí)間精確一些,但正向上面所說(shuō)的增加帶寬和不必要的安全問(wèn)題):
## Synchronise the time(同步時(shí)間):
0 * * * * /usr/bin/rdate YOURTIMEHOST >/dev/null 2>&1
文件權(quán)限
必須限制一些有關(guān)ROOT操作的權(quán)限或干脆使其無(wú)效:
chmod 0500 /usr/sbin/snoop /usr/sbin/devinfo
chmod o-r /var/spool/cron/crontabs/*
chmod 000 /bin/rdist
chmod o-rx /etc/security
chmod og-rwx /var/adm/vold.log
chmod u-s /usr/lib/sendmail #Except for mailgateways
chmod 400 /.shosts /etc/sshd_config /etc/ssh_known_hosts
再在登錄信息上設(shè)置警告用戶非授權(quán)登錄的信息(如果要起訴侵入者你就需要這些信息) 。如在Telnet和SSH,在/etc/motd中設(shè)置警告語(yǔ)句:
ATTENTION: You have logged onto a secured XXXX Corporation server.
Access by non YYYY administrators is forbidden.
For info contact YYYY@XXX.com
重新啟動(dòng),通過(guò)SSH登錄,現(xiàn)在使用ps -e來(lái)顯示進(jìn)程列表:
PID TTY TIME CMD
0 ? 0:00 sched
1 ? 0:00 init
2 ? 0:00 pageout
3 ? 0:09 fsflush
156 ? 0:00 ttymon
152 ? 0:00 sac
447 ? 0:06 sshd
88 ? 0:00 inetd
98 ? 0:00 cron
136 ? 0:00 utmpd
605 ? 0:00 syslogd
175 console 0:00 ttymon
469 pts/1 0:00 csh
466 ? 0:01 sshd
625 pts/1 0:00 ps
及使用netstat -a 將顯示最小的網(wǎng)絡(luò)連接(如只有SSH):
UDP
Local Address Remote Address State
-------------------- -------------------- -------
*.syslog Idle
*.* Unbound
TCP
Local Address Remote Address Swind Send-Q Rwind Recv-Q State
-------------------- -------------------- ----- ------ ----- ------ -------

推薦閱讀