Solaris安全设置和日志管理实用教案_第1页
Solaris安全设置和日志管理实用教案_第2页
Solaris安全设置和日志管理实用教案_第3页
Solaris安全设置和日志管理实用教案_第4页
Solaris安全设置和日志管理实用教案_第5页
已阅读5页,还剩19页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、PROMOpenBoot安全级别 None:不需要任何口令 Command:除了boot和go之外所有命令(mng lng)都需要口令 Full:除了go命令(mng lng)之外所有命令(mng lng)都需要口令 设置OpenBoot口令 eeprom security-password 改变安全级别 setenv security-mode=command 防止堆栈(duzhn)的缓冲区溢出 n#cp /etc/system /etc/ n#vi /etc/systemset noexec_user_stack=1 set noexec_user_stack_log=1 第1页/共23页

2、第一页,共24页。SUID/SGID real user ID 用户(yngh)登录IDwho am i effective user ID 用户(yngh)会话过程IDwhoami E.g. 获得bash的root SUID #cp /bin/bash /home/badman/.bash #chmod 4777 /home/badman/.bash 定期察看系统中SUID和SGID文件 第2页/共23页第二页,共24页。系统(xtng)的启动和关闭 更改不必要的启动文件(wnjin) 检查所有在和以S开头的文件(wnjin),去掉不必要的服务以下/etc/中的服务是必须的:K15rrcd

3、S05RMTMPFILES K15solved S20sysetup S72inetsvc S99audit S21perf S99dtlogin K25snmpd S S99netconfig K50pop3 S74syslog S75cron S92rtvc-config K60nfs.server K65nfs.client S69inet K92volmgt README S95SUNWmd.sync S01MOUNTFSYS S71sysid.sys S88utmpd S95rrcd 第3页/共23页第三页,共24页。备份(bi fn) 系统初装时的备份 定期(dngq)备份 增量式

4、备份 特别备份 tar ufsdump e.g. Perform a full level 0 backup of the /export/home file system# umount /export/home# fsck /export/home# ufsdump 0uf /dev/rmt/0 /export/home ufsrestore第4页/共23页第四页,共24页。用户账号和环境(hunjng)安全 口令管理passwd -n 30 user #强迫用户(yngh)每30天修改一次密码passwd -f user #强迫用户(yngh)在下一次登录时修改口令passwd -n 2

5、 -x 1 user #禁止用户(yngh)修改口令passwd -l user #封锁用户(yngh)账号,禁止登录 删除不必要的帐号 sys uucp nuucp listen等等 在/etc/shadow的password域中放上NP字符第5页/共23页第五页,共24页。 取消ROOT的远程登陆 /etc/default/login/etc/ftpusers /etc/shells 配置ROOT的环境将umask设为077或者027 查看用户环境中路径设置情况,不要有./ NIS的安全问题/var/yp/securenets加入信任(xnrn)主机采用NIS+ 用户账号和环境(hunjn

6、g)安全(cont.)第6页/共23页第六页,共24页。 Telnet和ftpinetd 守护进程 /etc/ ftp stream tcp nowait root /usr/local/bin/tcpd /usr/local/bin/wu-ftpd telnet stream tcp nowait root /usr/local/bin/tcpd /etc/servicesftp 21/tcptelnet 23/tcp取消(qxio)不必要的服务,然后kill HUP inetdPID网络服务第7页/共23页第七页,共24页。网络服务(cont.) r服务(fw)(见下页图)2)$HOME/

7、.rhosts 3)修改 tcpd的访问控制 first check /etc/e.g.second check /etc/e.g.ALL: /usr/bin/mailx -s %d: connection attempt from %c 第8页/共23页第八页,共24页。网络服务(cont.)第9页/共23页第九页,共24页。网络服务(cont.) 取消NFS服务修改/etc/dfs/dfstabNFS server启动脚本NFS client启动脚本 rpcbind安全依靠(yko)远程系统的IP地址和远程用户的UID来验证 第10页/共23页第十页,共24页。ndd 修改核心(hxn)和

8、TCP/IP的设备参数 ndd /dev/arp ? ndd /dev/icmp ? ndd /dev/ip ? ndd /dev/tcp ? #ndd -set /dev/arp arp_debug 0 0: 代表特性禁止 #ndd -set /dev/arp arp_debug 1 1: 代表特性允许 第11页/共23页第十一页,共24页。ndd(cont.) 减少ARP过期时间 #ndd -set /dev/arp arp_cleanup_interval 60000 #ndd -set /dev/ip ip_ire_flush_interval 60000 60000=60000 ms

9、 默认是300000 建立( jinl)静态ARP表 #more file1 08:00:20:ba:a1:f2user. 08:00:20:ee:de:1f #arp -f file1 禁止ARP#ifconfig interface -arp(前提是使用静态的ARP表 )第12页/共23页第十二页,共24页。ndd(cont.) 关闭IP转发(zhun f)#ndd -set /dev/ip ip_forwarding 0 严格限定多主宿主机#ndd -set /dev/ip ip_strict_dst_multihoning 1 关闭转发(zhun f)包广播#ndd -set /dev

10、/ip ip-forward_directed_broadcasts 0 关闭转发(zhun f)源路由包#ndd -set /dev/ip ip_forward_src_routed 0 第13页/共23页第十三页,共24页。ndd(cont.) 关闭对echo广播的响应(xingyng)#ndd -set /dev/ip ip_respond_to_echo_boadcast 0 关闭响应(xingyng)时间戳广播 #ndd -set /dev/ip ip_respond_to_timestamp_broadcast 0 关闭地址掩码广播#ndd -set /dev/ip ip_resp

11、ind_to_address_mask_broadcast 0 忽略ICMP重定向错误报文#ndd -set /dev/ip ip_ignore_redirect 1 第14页/共23页第十四页,共24页。ndd(cont.) 禁止本机发送错误重定向报文#ndd -set /dev/ip ip_send_redirects 0 关闭时间戳响应 #ndd -set /dev/ip ip_respond_to_timestamp 0 提高(t go)未连接队列大小(SYN flood attack)#ndd -set /dev/tcp tcp_conn_req_max_q0 4096 提高(t g

12、o)连接队列大小(连接耗尽攻击)#ndd -set /dev/tcp tcp_conn_req_max_q 1024 第15页/共23页第十五页,共24页。IP欺骗(qpin) 攻击过程1)使被信任主机的网络暂时瘫痪2)连接到目标机的某个端口来猜测ISN基值和增加规律3)把源址址伪装成被信任主机,发送带有SYN标志的数据段请求连接 4)等待目标机发送SYN+ACK包给已经瘫痪的主机5)再次伪装成被信任主机向目标机发送的ACK,此时发送的数据段带有预测的目标机的ISN+1 6)连接建立(jinl),发送命令请求 改进办法修改/etc/default/inetinit使用更好的随机ISN生成方法

13、TCP_STRONG_ISS=2 第16页/共23页第十六页,共24页。cron和at 查看所有(suyu)的cron任务#crontab l/var/spool/cron/crontabs cron日志/etc/default/cron里设置CRONLOG=yes cron用户配置 /etc/和/etc/ at 用户配置/etc/和/etc/ 第17页/共23页第十七页,共24页。系统日志 /etc/ Example:*.err /var/adm/messages*.err is the selector field; * is the facility, . is the delimite

14、r, and err is the level of the message/var/adm/messages Is the action field Notecan use the * to select all facilities (for example *.err); cannot use it to select all levels for a facility (for example, kern.*)第18页/共23页第十八页,共24页。系统日志(cont.) Another sample /etc/#user1 and user2 receive alert message

15、s if they are logged in.*.alert user1,user2#All logged-in users will receive emerg messages.*.emerg *#If the LOGHOST variable was evaluated as TRUE, messages are #forwarded to the syslogd of the remote system. ifdef(LOGHOST, /var/log/authlog, loghost) LOGHOSTexample in host1#more /etc/hosts192.9.200

16、.1 host1 loghost/LOGHOST is TRUE第19页/共23页第十九页,共24页。系统日志(cont.) Enables TCP tracing# grep inetd /etc/usr/sbin/inetd -s -t &/Add the t option# grep /etc/*./var/adm/messages#/etc/ stop#/etc/ start /restart the syslogd daemon Forward the messages to the printer #vi /etc/*./dev/lp0 第20页/共23页第二十页,共24页

17、。系统日志(cont.)Example of syslog Logged Entry第21页/共23页第二十一页,共24页。补丁(b ding)管理 显示(xinsh)系统中安装的所有patch及版本showrev p patchadd p 安装patchpatchadd Note: -d option instructs the commands not to save copies of the files being updated or replaced in the /var/sadm/patch directory. However, it also prevents being able to back ou

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论