MULTICAST,GROUPRT,64BIT>
inet127.0.0.1netmask0xff000000broadcast127.255.255.255
inet6:
:
1/0
1.2系统当前路由
1.2.1说明
1.2.2检查方法
netstat-nr
1.2.3结果分析方法
bash-2.04#netstat-nr
Routingtables
DestinationGatewayFlagsRefsUseIfPMTUExpGroups
RouteTreeforProtocolFamily2(Internet):
default192.168.7.254UGc00en0--
127/8127.0.0.1U4113lo0--
192.168.7/24192.168.7.250U2157en0--
192.168.10.195192.168.7.254UGHW1158en01500-
RouteTreeforProtocolFamily24(Internetv6):
:
:
1:
:
1UH00lo016896-
1.3当前系统开放的端口
1.3.1说明
1.3.2检查方法
netstat-na|grepLISTEN
1.3.3结果分析方法
bash-2.04#netstat-na|grepLISTEN
tcp400*.25*.*LISTEN
tcp400127.0.0.1.49213*.*LISTEN
tcp400*.2401*.*LISTEN
tcp400*.32772*.*LISTEN
tcp400*.809*.*LISTEN
tcp400*.808*.*LISTEN
tcp400*.32771*.*LISTEN
tcp400*.199*.*LISTEN
tcp400*.6112*.*LISTEN
tcp400*.32769*.*LISTEN
tcp400*.37*.*LISTEN
tcp400*.13*.*LISTEN
tcp400*.19*.*LISTEN
tcp400*.9*.*LISTEN
tcp400*.7*.*LISTEN
tcp00*.512*.*LISTEN
tcp400*.543*.*LISTEN
tcp00*.513*.*LISTEN
tcp400*.544*.*LISTEN
tcp00*.514*.*LISTEN
tcp00*.23*.*LISTEN
tcp00*.21*.*LISTEN
tcp400*.111*.*LISTEN
tcp400*.6000*.*LISTEN
tcp400*.32768*.*LISTEN
1.4系统运行进程
1.4.1说明
1.4.2检查方法
ps-ef
1.4.3结果分析方法
bash-2.04#ps-ef
UIDPIDPPIDCSTIMETTYTIMECMD
root10005:
58:
08-0:
00/etc/init
root21443882005:
59:
43-0:
00dtgreet
root23683118005:
58:
44-0:
00/usr/lpp/X11/bin/X-D/usr/lib/X11//rgb-T-force:
0-auth/var/dt/A:
0-xidcUa
root29101005:
59:
01-0:
00/usr/sbin/srcmstr
root31181005:
58:
43-0:
00/usr/dt/bin/dtlogin-daemon
root34865170406:
14:
31pts/00:
00ps-ef
root38823118005:
58:
44-0:
00dtlogin<:
0>-daemon
root44081005:
58:
56-0:
00/usr/sbin/syncd60
root49081005:
58:
56-0:
00/usr/lib/errdemon
root51707744106:
01:
34pts/00:
00-bash
root55021005:
59:
31-0:
00/usr/sbin/cron
root56982910005:
59:
05-0:
00/usr/sbin/syslogd
root59402910005:
59:
08-0:
00sendmail:
acceptingconnectionsonport25
root61922910005:
59:
11-0:
00/usr/sbin/portmap
root64502910005:
59:
14-0:
00/usr/sbin/inetd
root67082910005:
59:
18-0:
00/usr/sbin/snmpd
root69662910005:
59:
21-0:
00/usr/sbin/dpid2
root77446450006:
01:
32-0:
00telnetd-a
root80022910005:
59:
25-0:
00/usr/sbin/biod6
root82642910005:
59:
28-0:
00/usr/sbin/rpc.statd
root85222910005:
59:
31-0:
00/usr/sbin/rpc.lockd
root87821005:
59:
38-0:
00/usr/sbin/uprintfd
root90342910005:
59:
35-0:
00/usr/sbin/qdaemon
root92962910005:
59:
38-0:
00/usr/sbin/writesrv
root100661005:
59:
38-0:
00/usr/bin/AIXPowerMgtDaemon
root108381005:
59:
42lft00:
00/usr/sbin/getty/dev/console
imnadm110941005:
59:
41-0:
00/usr/IMNSearch/httpdlite/httpdlite-r/etc/IMNSearch/httpdlite/httpdlite.conf
root116121005:
59:
42-0:
00/usr/lpp/diagnostics/bin/diagd
1.5系统信息
1.5.1说明
1.5.2检查方法
uname-a
1.5.3结果分析方法
bash-2.04#uname-a
AIXaix434001381144C00
1.6系统及安装软件信息
1.6.1说明
1.6.2检查方法
lslpp-Lall
1.6.3结果分析方法
bash-2.04#lslpp-Lall
FilesetLevelStateDescription
----------------------------------------------------------------------------
IMNSearch.rte.httpdlite2.0.0.1CNetQuestionWebServer
Java.rte.bin1.1.8.0CJavaRuntimeEnvironment
Executables
Java.rte.classes1.1.8.0CJavaRuntimeEnvironmentClasses
Java.rte.lib1.1.8.0CJavaRuntimeEnvironment
Libraries
X11.Dt.ToolTalk4.3.3.50CAIXCDEToolTalkSupport
X11.Dt.bitmaps4.3.3.0CAIXCDEBitmaps
X11.Dt.helpmin4.3.3.0CAIXCDEMinimumHelpFiles
X11.Dt.helprun4.3.3.0CAIXCDERuntimeHelp
X11.Dt.lib4.3.3.75CAIXCDERuntimeLibraries
X11.Dt.rte4.3.3.75CAIXCommonDesktopEnvironment
(CDE)1.0
……
xlC.msg.en_US.rte4.0.2.0CCSet++RuntimeMessages--U.S.
English
xlC.rte4.0.2.0CCSet++Runtime
StateCodes:
A--Applied.
B--Broken.
C--Committed.
O--Obsolete.(partiallymigratedtonewerversion)
?
--InconsistentState...Runlppchk-v.
2补丁安装情况
oslevel-r
3帐号和口令
3.1禁止所有的系统默认帐户的登录权限
3.1.1检查方法
cat/etc/passwd
3.1.2结果分析方法
例:
guest:
!
:
100:
100:
:
/home/guest:
3.1.3备注
1.修改/etc/passwd文件,使系统默认用户没有shell,例:
#chsh/bin/false
nobody:
!
:
4294967294:
4294967294:
:
/:
/bin/false
默认系统的帐户如下:
daemon,bin,sys,adm,nobody,
1.删除下列的无用的默认帐号,例:
#rmuser–p
应该删除下列系统帐号:
lpd,guest,uucp,nuucp
3.2Passwd设置参数
3.2.1说明
增强passwd配置
3.2.2检查方法
cat/etc/security/user
3.2.3结果分析方法
default:
admin=false
login=true
su=true
daemon=true
rlogin=true
sugroups=ALL
admgroups=
ttys=ALL
auth1=SYSTEM
auth2=NONE
tpath=nosak
umask=022
expires=0
SYSTEM="compat"
logintimes=
pwdwarntime=0
account_locked=false
loginretries=0
histexpire=0
histsize=0
minage=0
maxage=0
maxexpired=-1
minalpha=0
minother=0
minlen=0
mindiff=0
maxrepeats=8
dictionlist=
pwdchecks=
root:
admin=true
SYSTEM="compat"
loginretries=0
account_locked=false
……
3.2.4备注
修改/etc/security/user文件
#smitmkuser
#smitchuser
RestrictionValuesRecommendedValuesDefaultValuesMaximumValues
Minage0052
maxage12(5weeksforrootuser)052
maxexpired4-152
minalpha408
minother108
minlen6(8forrootuser)08
mindiff308
maxrepeats388
histexpire260260*
histsize8050
pwdwarntime1400
可以按上面的推荐值进行设置,也可以适当的进行调整。
3.3防止root从远程登录
3.3.1说明
Root从远程登录时,可能会被网络sniffer窃听到密码。
3.3.2检查方法
cat/etc/security/user
3.3.3结果分析方法
在有关root的设置里,应该有
rlogin=false
显示如下:
root:
admin=true
SYSTEM="compat"
loginretries=0
account_locked=false
rlogin=false
3.4减少登录会话时间
3.4.1说明
当登录的系统用户空闲时间超过设定值后,系统将自动logout,以防止恶意人员进入进行非法操作。
3.4.2检查方法
cat/etc/profile
cat/etc/environment
cat/etc/security/.profile
3.4.3结果分析方法
3.4.4备注
增加或修改(/etc/profile,etc/environment,/etc/security/.profile)文件中如下行
TMOUT=600;TIMEOUT=600;exportreadonlyTMOUTTIMEOUT
3.5Passwdpolicy
3.5.1说明
修改Passwdpolicy中关于用户密码默认设置
3.5.2检查方法
cat/etc/security/user
3.5.3结果分析方法
pwdwarntime=0
account_locked=false
loginretries=0
histexpire=0
histsize=0
minage=0
maxage=0
maxexpired=-1
minalpha=0
minother=0
minlen=0
mindiff=0
maxrepeats=8
dictionlist=
pwdchecks=
3.5.4备注
3.6是否所有用户都可以su
3.6.1说明
确保只有必需的用户才可以su
3.6.2检查方法
cat/etc/security/user
3.6.3结果分析方法
3.6.4备注
默认情况下系统允许所有的用户su
4网络与服务
4.1TCP/UDP小服务
4.1.1说明
这些服务通常是用来进行网络调试的,包括:
echo、discard、datetime、chargen
检查方法
cat/etc/inetd.conf
4.1.2结果分析方法
echostreamtcpnowaitrootinternal
discardstreamtcpnowaitrootinternal
chargenstreamtcpnowaitrootinternal
daytimestreamtcpnowaitrootinternal
timestreamtcpnowaitrootinternal
echodgramudpwaitrootinternal
discarddgramudpwaitrootinternal
chargendgramudpwaitrootinternal
daytimedgramudpwaitrootinternal
timedgramudpwaitrootinternal
4.2Fingerd
4.2.1说明
可被入侵者用来获取远程系统用户的一些信息
4.2.2检查方法
cat/etc/inetd.conf|grepfingerd
4.2.3结果分析方法
bash-2.04#cat/etc/inetd.conf|grepfingerd
#fingerstreamtcpnowaitnobody/usr/sbin/fingerdfingerd
4.3login(rlogin)shell(rsh)exec(rexec)
4.3.1说明
用来方便的登陆或执行远程系统的命令。
1.可能被用来获得主机信任关系的信息
2.被入侵者用来留后门
3.成为被ip欺骗的服务对象
4.3.2检查方法
cat/etc/inetd.conf|greplogin
cat/etc/inetd.conf|grepshell
cat/etc/inetd.conf|grepexec
4.3.3结果分析方法
loginstreamtcp6nowaitroot/usr/sbin/rlogindrlogind
shellstreamtcp6nowaitroot/usr/sbin/rshdrshd
execstreamtcp6nowaitroot/usr/sbin/rexecdrexecd
4.4kshell
klogin
comsat
uucp
bootps
systat
netstat
tftp
talk
ntalk
dtspc
4.4.1说明
以上服务大都不在公开服务器上使用,且存在一定的风险。
检查方法
cat/etc/inetd.conf
4.5rquotad
rexd
rstatd
rusersd
rwalld
sprayd
pcnfsd
ttdbserver
cmsd
4.5.1说明
在inetd.conf中启动的RPC服务,已经有多次极严重的安全漏洞记录
4.5.2检查方法
cat/etc/inetd.conf|greprpc.
4.5.3结果分析方法
#rquotadsunrpc_udpudpwaitroot/usr/sbin/rpc.rquotadrquotad1000111
#rexdsunrpc_tcptcpwaitroot/usr/sbin/rpc.rexdrexd1000171
rstatdsunrpc_udpudpwaitroot/usr/sbin/rpc.rstatdrstatd1000011-3
rusersdsunrpc_udpudpwaitroot/usr/lib/netsvc/rusers/rpc.rusersdrusersd1000021-2
rwalldsunrpc_udpudpwaitroot/usr/lib/netsvc/rwall/rpc.rwalldrwalld1000081
spraydsunrpc_udpudpwaitroot/usr/lib/netsvc/spray/rpc.spraydsprayd1000121
pcnfsdsunrpc_udpudpwaitroot/usr/sbin/rpc.pcnfsdpcnfsd1500011-2
ttdbserversunrpc_tcptcpwaitroot/usr/dt/bin/rpc.ttdbserverrpc.ttdbserver1000831
cmsdsunrpc_udpudpwaitroot/usr/dt/bin/rpc.cmsdcmsd1000682-5
4.6Rc.dt
4.6.1说明
rc.dt用于启动图形界面,推荐不在服务器上使用。
4.6.2检查方法
cat/etc/inittab|greprc.dt
4.6.3结果分析方法
bash-2.04#cat/etc/inittab|greprc.dt
dt:
2:
wait:
/etc/rc.dt
4.6.4备注
将此行注释或删除。
4.7R.serial
4.7.1说明
此程序用于启动拔号服务,没有使用此功能时请禁止这个服务。
4.7.2检查方法
bash-2.04#cat/etc/inittab|grep.serial
4.8Rc.nfs
4.8.1说明
网络文件系统,建议不使用此服务。
4.8.2检查方法
cat/etc/inittab|greprc.nfs
4.8.3结果分析方法
bash-2.04#cat/etc/inittab|greprc.nfs
rcnfs:
2:
wait:
/etc/rc.nfs>/dev/console2>&1#StartNFSDaemons
4.9Rc.tcpip
4.9.1说明
这个程序用于启动一些关于tcpip的服务。
4.9.2检查方法
catrc.tcpip|grepstart
4.9.3结果分析方法
bash-2.04#catrc.tcpip|grepstart
#startsTCP/IPdaemons(sendmail,inetd,etc.)
#start-
#startsdaemonsusingeithersrcorcommand-linemethod
#$2:
non-nullifweshouldusesrctostartthe