文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>LINUX Security CheckList

LINUX Security CheckList

时间:2006-07-24  来源:cifan

1       系统信息

1.1 主机名、域名信息检查

1.1.1    说明:

得到系统主机名、域名

1.1.2    检查方法:

hostname    domainname

1.1.3    结果分析方法:

# hostname

cat

# domainname

(none)

1.2 系统版本信息检查

1.2.1    说明:

得到系统版本信息

1.2.2    检查方法:

uname -a

1.2.3    结果分析方法:

# uname -a

Linux Sec 2.4.19 #17 SMP Wed Oct 30 14:18:13 CST 2002 i686 i686 i386 GNU/Linux

1.2.4    备注:

本例输出中系统内核版本为2.4.19

 

1.3 网卡信息检查

1.3.1    说明:

得到网卡信息

1.3.2    检查方法:

ifconfig -a

1.3.3    结果分析方法:

# ifconfig -a

1.3.4    备注:

HWaddr:MAC地址

inet addr:IP地址

Bcast:广播地址

Mask:掩码

 

如果系统已经安装iproute2(通过rpm -qa | grep iproute确认),则可以使用ip命令获得网卡信息。

获得网卡地址:

# ip add ls

 获得网卡信息:

# ip link ls

 获得系统ARP表:

# ip neigh ls

 获得系统路由表:

# ip ro ls

 

更多ip命令请参考ip(8),即# man 8 ip

 

1.4 系统路由信息检查

1.4.1    说明:

得到系统路由信息

1.4.2    检查方法:

netstat –r    ip ro ls

1.4.3    结果分析方法:

# netstat -r

 

# ip ro ls

 

1.4.4    备注:

如果系统支持ip命令,建议使用ip命令进行信息检查。

 

1.5 系统加载模块信息检查

1.5.1    说明:

查看系统已加载的模块

1.5.2    检查方法:

lsmod

1.5.3    结果分析方法:

# lsmod

2       补丁安装情况

2.1 系统已安装的rpm包信息检查

2.1.1    说明:

得到系统已经安装的rpm包列表

2.1.2    检查方法:

rpm -qa

2.1.3    结果分析方法:

# rpm -qa

 

3       帐号和口令

3.1 系统空密码帐号信息检查

3.1.1    说明:

查看系统是否存在空密码帐号

3.1.2    检查方法:

awk -F: '($2 = = "") { print $1 }' /etc/shadow

3.1.3    结果分析方法:

# awk -F: '($2 = = "") { print $1 }' /etc/shadow

3.2 系统uid=0帐号信息检查

3.2.1    说明:

查看系统uid=0的帐号

3.2.2    检查方法:

awk -F: '($3 = = 0) { print $1 }' /etc/passwd

3.2.3    结果分析方法:

# awk -F: '($3 == 0) { print $1 }' /etc/passwd

root

3.2.4    备注:

本例输出说明只有root帐号uid=0

 

3.3 系统缺省用户(组)信息检查

3.3.1    说明:

得到系统缺省用户(组)

3.3.2    检查方法:

cat /etc/passwd

3.3.3    结果分析方法:

查看是否存在系统缺省帐号,如:

lp, sync, shutdown, halt, news, uucp, operator, games, gopher等

3.4 系统帐号shell变量信息检查

3.4.1    说明:

得到系统帐号shell变量

3.4.2    检查方法:

cat /etc/passwd

3.4.3    结果分析方法:

# cat /etc/passwd

看最后域是否是/sbin/nologin或/dev/null

3.5 passwd、shadow文件检查

3.5.1    说明:

检查系统passwd、shadow文件,确保系统中每个用户都有密码,并且密码被shadow。

3.5.2    检查方法:

pwck

3.5.3    结果分析方法:

# pwck

 

3.6 系统缺省密码最短长度检查

3.6.1    说明:

得到系统缺省密码最短长度

3.6.2    检查方法:

cat /etc/login.defs | grep PASS_MIN_LEN

3.6.3    结果分析方法:

# cat /etc/login.defs | grep PASS_MIN_LEN

#       PASS_MIN_LEN    Minimum acceptable password length.

PASS_MIN_LEN    5

3.7 系统自动注销帐号登录检查

3.7.1    说明:

得到超时后系统自动注销帐号登录信息

3.7.2    检查方法:

cat /etc/profile | grep TMOUT

3.7.3    结果分析方法:

# cat /etc/profile | grep TMOUT

3.7.4    备注:

本例输出表示并未对自动注销帐号登录作设置

 

3.8 root PATH环境变量检查

3.8.1    说明:

得到root PATH环境变量,是否包含当前目录“.”

3.8.2    检查方法:

echo $PATH | grep “:.”

3.8.3    结果分析方法:

# echo $PATH | grep “:.”

3.8.4    备注:

此检查有一定的局限性,只检查了当前用户的路径设置。

 

3.9 禁止使用ftp的帐号检查

3.9.1    说明:

得到禁止使用ftp的帐号

3.9.2    检查方法:

cat /etc/ftpusers

3.10    结果分析方法:

# cat /etc/ftpusers

 

3.11    允许su为root的帐号信息检查

3.11.1   说明:

检查是否允许任何人su为root

3.11.2   检查方法:

vi /etc/pam.d/su

3.11.3   结果分析方法:

# vi /etc/pam.d/su

auth sufficient /lib/security/pam_rootok.so

auth required /lib/security/pam_wheel.so group=wheel

3.11.4   备注:

本例输出表示只有wheel组中的用户才可以允许su为root

3.11.5   bash shell保存少量命令检查

3.11.6   说明:

得到bash shell能保存的命令条数

3.11.7   检查方法:

cat /etc/profile | grep HISTSIZE

3.11.8   结果分析方法:

# cat /etc/profile | grep HISTSIZE

HISTSIZE=1000

3.12    用户对主机使用的限制检查

3.12.1   说明:

得到系统限制用户对主机使用的信息

3.12.2   检查方法:

cat /etc/security/limits.conf

3.12.3   结果分析方法:

# cat /etc/security/limits.conf

# /etc/security/limits.conf

#

#Each line describes a limit for a user in the form:

#

#<domain>        <type>  <item>  <value>

#

#Where:

#<domain> can be:

#        - an user name

#        - a group name, with @group syntax

#        - the wildcard *, for default entry

#

#<type> can have the two values:

#        - "soft" for enforcing the soft limits

#        - "hard" for enforcing hard limits

#

#<item> can be one of the following:

#        - core - limits the core file size (KB)

#        - data - max data size (KB)

#        - fsize - maximum filesize (KB)

#        - memlock - max locked-in-memory address space (KB)

#        - nofile - max number of open files

#        - rss - max resident set size (KB)

#        - stack - max stack size (KB)

#        - cpu - max CPU time (MIN)

#        - nproc - max number of processes

#        - as - address space limit

#        - maxlogins - max number of logins for this user

#        - priority - the priority to run user process with

#        - locks - max number of file locks the user can hold

#

#<domain>      <type>  <item>         <value>

#

 

#*               soft    core            0

#*               hard    rss             10000

#@student        hard    nproc           20

#@faculty        soft    nproc           20

#@faculty        hard    nproc           50

#ftp             hard    nproc           0

#@student        -       maxlogins       4

 

# End of file

3.12.4   备注:

本例输出表示系统并未限制用户对主机的使用(进程使用、尝试登录次数等)

 

3.13    系统是否允许guest或匿名连接信息检查

3.13.1   说明:

查看系统是否允许guest或匿名连接

3.13.2   检查方法:

cat /etc/ftpaccess | grep class

3.13.3   结果分析方法:

# cat /etc/ftpaccess | grep class

# User classes...

class   all   real,guest,anonymous  *

4       网络与服务

4.1 系统运行进程检查

4.1.1    说明:

得到系统运行进程

4.1.2    检查方法:

ps -aux

4.1.3    结果分析方法:

# ps -aux

 

4.1.4    备注:

计算系统运行进程个数:# ps –aux | wc -l

 

4.2 系统打开端口信息检查

4.2.1    说明:

得到系统打开的端口信息

4.2.2    检查方法:

netstat -an

4.2.3    结果分析方法:

# netstat -an

  

4.3 系统服务信息检查

4.3.1    说明:

得到系统服务信息

4.3.2    检查方法:

lsof -i       netstat -at

4.3.3    结果分析方法:

# lsof -i

 

netstat -at

 

4.3.4    备注:

如果系统未安装lsof,使用netstat –a --ip:

# netstat -a --ip

 

4.4 xinetd/inetd服务信息检查

4.4.1    说明:

查看系统是否运行xinetd/inetd服务

4.4.2    检查方法:

ps -aux | grep inetd    ps -aux | grep xinetd

4.4.3    结果分析方法:

# ps -aux | grep xinetd

root   383  0.0  0.6  2088  832 ?        S    20:06   0:00 xinetd -stayalive

4.4.4    备注:

本例输出表示系统运行xinetd,

# cd /etc/xinetd.d

# grep “disable” ./*

./chargen:      disable = yes

./chargen-udp:  disable = yes

./cvs:  disable = no

./daytime:      disable = yes

./daytime-udp:  disable = yes

./echo: disable = yes

./echo-udp:     disable = yes

./rsync:        disable = yes

./servers:      disable = yes

./services:     disable = yes

./time: disable = yes

./time-udp:     disable = yes

./wu-ftpd:      disable = yes

输出中disable=no表示xinetd启动cvs进程,执行netstat -a进行确认。

# netstat -a

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address           Foreign Address         State     

tcp   0      0 *:cvspserver            *:*                     LISTEN    

 

4.5 /etc/hosts.conf信息检查

4.5.1    说明:

得到系统解析地址的信息

4.5.2    检查方法:

/etc/host.conf

4.5.3    结果分析方法:

# cat /etc/host.conf

order hosts,bind

4.5.4    备注:

本例输出表示先通过hosts文件解析,然后通过DNS解析。

 

4.6 /etc/hosts.equiv信息检查

4.6.1    说明:

查看是否存在/etc/hosts.equiv文件

4.6.2    检查方法:

ls -al /etc/hosts.equiv

4.6.3    结果分析方法:

# ls -al /etc/hosts.equiv

4.7 /etc/rc.d/init.d自动运行脚本检查

4.7.1    说明:

查看系统开机自动运行的脚本

4.7.2    检查方法:

ls -al /etc/rc.d/init.d

4.7.3    结果分析方法:

# ls -al /etc/rc.d/init.d/

total 208

drwxr-xr-x    2 root         4096 Nov 13 14:12 ./

drwxr-xr-x   10 root         4096 May 10 22:12 ../

-rwxr-xr-x    1 root         2633 Aug 23  2002 aep1000*

-rwxr-xr-x    1 root          941 Aug 28  2002 anacron*

-rwxr-xr-x    1 root         1458 Jun 23  2002 apmd*

-rwxr-xr-x    1 root         1176 Jul 25  2002 atd*

-rwxr-xr-x    1 root         9435 Aug 27  2002 autofs*

-rwxr-xr-x    1 root         2455 Aug 23  2002 bcm5820*

-rwxr-xr-x    1 root         1095 Aug 24  2002 cpqarrayd*

-rwxr-xr-x    1 root         1316 Jul 20  2002 crond*

-rwxr-xr-x    1 root        10068 Jul 14  2002 functions*

-rwxr-xr-x    1 root         1541 Jun 24  2002 gpm*

-rwxr-xr-x    1 root         5075 Aug 14  2002 halt*

-rwxr-xr-x    1 root         2366 Sep  5  2002 httpd*

-rwxr-xr-x    1 root         5636 Aug  7  2002 iptables*

-rwxr-xr-x    1 root         1152 Jul  9  2002 irda*

-rwxr-xr-x    1 root         1084 Aug  3  2002 kdcrotate*

-rwxr-xr-x    1 root         1347 Sep  5  2002 keytable*

-rwxr-xr-x    1 root          481 Jul  6  2002 killall*

-rwxr-xr-x    1 root         1919 Sep  3  2002 kudzu*

-rwxr-xr-x    1 root         1539 Aug 24  2002 microcode_ctl*

-rwxr-xr-x    1 root         5024 Jun 26  2002 netfs*

-rwxr-xr-x    1 root         6402 Jul 10  2002 network*

-rwxr-xr-x    1 root         4522 Aug  1  2002 nfs*

-rwxr-xr-x    1 root         2286 Aug  1  2002 nfslock*

-rwxr-xr-x    1 root         2066 Sep  6  2002 nscd*

-r-xr-xr-x    1 root         4596 Aug 31  2002 pcmcia*

-rwxr-xr-x    1 root         1901 Aug  7  2002 portmap*

-rwxr-xr-x    1 root         1516 Jun 26  2002 random*

-rwxr-xr-x    1 root         2211 Jun 26  2002 rawdevices*

-rwxr-xr-x    1 root         1782 Sep 10  2002 rhnsd*

-rwxr-xr-x    1 root         1260 Sep  3  2002 saslauthd*

-r-x------    1 root          177 Nov 13 14:12 secuve_file*

-rwxr-xr-x    1 root         2362 Aug 30  2002 sendmail*

-rwxr-xr-x    1 root         1175 Jul 10  2002 single*

-rwxr-xr-x    1 root          627 Aug 24  2002 smartd*

-rwxr-xr-x    1 root         1160 Sep  1  2002 snmpd*

-rwxr-xr-x    1 root         1131 Sep  1  2002 snmptrapd*

-rwxr-xr-x    1 root         2647 Aug 14  2002 sshd*

-rwxr-xr-x    1 root         1369 Jun 24  2002 syslog*

-rwxr-xr-x    1 root         2407 Aug 16  2002 xinetd*

-rwxr-xr-x    1 root         2501 Jun 24  2002 ypbind*

4.8 开放端口与进程信息检查

4.8.1    说明:

查看某个开放端口由哪个进程打开

4.8.2    检查方法:

假设要查看的开放端口是2401,执行fuser -n tcp 2401,返回的进程ID为pid,

再执行ps -aux | grep pid。

4.8.3    结果分析方法:

# fuser -n tcp 2401

2401/tcp:              383

# ps -aux | grep 383

root   383  0.0  0.6  2088  832 ?        S    20:06   0:00 xinetd -stayalive

4.8.4    备注:

本例输出表示2401端口由xinetd进程打开。

此检查可以检测系统开放的不明端口。

 

4.9 /etc/rc.d/rc[0-6].d脚本信息检查

4.9.1    说明:

查看/etc/rc.d/rc[0-6].d下运行的脚本

4.9.2    检查方法:

ls -al /etc/rc.d/rc0.d

ls -al /etc/rc.d/rc6.d

4.9.3    结果分析方法:

# ls -al rc3.d/

total 8

drwxr-xr-x    2 root         4096 Nov 13 14:21 ./

drwxr-xr-x   10 root         4096 May 10 22:12 ../

lrwxrwxrwx  1 root      28 Nov 13 14:12 BS99file -> /etc/rc.d/init.d/secuve_file*

lrwxrwxrwx  1 root           15 Oct 29  2002 K03rhnsd -> ../init.d/rhnsd*

lrwxrwxrwx  1 root           17 Oct 29  2002 K05anacron -> ../init.d/anacron*

lrwxrwxrwx  1 root           13 Oct 29  2002 K05atd -> ../init.d/atd*

lrwxrwxrwx  1 root           18 Oct 29  2002 K05keytable -> ../init.d/keytable*

lrwxrwxrwx  1 root         19 Oct 29  2002 K05saslauthd -> ../init.d/saslauthd*

lrwxrwxrwx    1 root           13 Oct 29  2002 K15gpm -> ../init.d/gpm*

lrwxrwxrwx    1 root           13 Oct 29  2002 K20nfs -> ../init.d/nfs*

lrwxrwxrwx    1 root           14 Oct 29  2002 K24irda -> ../init.d/irda*

lrwxrwxrwx  1 root          18 Oct 29  2002 K30sendmail -> ../init.d/sendmail*

lrwxrwxrwx    1 root           16 Oct 29  2002 K45smartd -> ../init.d/smartd*

lrwxrwxrwx    1 root           15 Oct 29  2002 K50snmpd -> ../init.d/snmpd*

lrwxrwxrwx  1 root       19 Oct 29  2002 K50snmptrapd -> ../init.d/snmptrapd*

lrwxrwxrwx    1 root           15 Oct 29  2002 K60crond -> ../init.d/crond*

lrwxrwxrwx  1 root           17 Oct 29  2002 K70aep1000 -> ../init.d/aep1000*

lrwxrwxrwx  1 root         17 Oct 29  2002 K70bcm5820 -> ../init.d/bcm5820*

lrwxrwxrwx    1 root           16 Oct 29  2002 K72autofs -> ../init.d/autofs*

lrwxrwxrwx    1 root           14 Oct 29  2002 K74apmd -> ../init.d/apmd*

lrwxrwxrwx    1 root           15 Oct 29  2002 K75netfs -> ../init.d/netfs*

lrwxrwxrwx   1 root           17 Oct 29  2002 K86nfslock -> ../init.d/nfslock*

lrwxrwxrwx  1 root           17 Oct 29  2002 K87portmap -> ../init.d/portmap*

lrwxrwxrwx   1 root           18 Oct 29  2002 K92iptables -> ../init.d/iptables*

lrwxrwxrwx    1 root           15 Oct 29  2002 K95kudzu -> ../init.d/kudzu*

lrwxrwxrwx    1 root           16 Oct 29  2002 K96pcmcia -> ../init.d/pcmcia*

lrwxrwxrwx 1 root   23 Oct 29  2002 S00microcode_ctl -> ../init.d/microcode_ctl*

lrwxrwxrwx  1 root           17 Oct 29  2002 S10network -> ../init.d/network*

lrwxrwxrwx  1 root           16 Oct 29  2002 S12syslog -> ../init.d/syslog*

lrwxrwxrwx  1 root           16 Oct 29  2002 S20random -> ../init.d/random*

lrwxrwxrwx    1 root           14 Oct 29  2002 S55sshd -> ../init.d/sshd*

lrwxrwxrwx 1 root       20 Oct 29  2002 S56rawdevices -> ../init.d/rawdevices*

lrwxrwxrwx    1 root           16 Oct 29  2002 S56xinetd -> ../init.d/xinetd*

lrwxrwxrwx    1 root           15 Oct 29  2002 S85httpd -> ../init.d/httpd*

lrwxrwxrwx    1 root           11 Oct 30  2002 S99local -> ../rc.local*

4.9.4    备注:

以S开头的为该运行级别下运行的脚本

 

4.10    系统ping响应信息检查

4.10.1   说明:

查看系统是否响应ICMP请求

4.10.2   检查方法:

cat /proc/sys/net/ipv4/icmp_echo_ignore_all

或从同网段的另一台机器ping该主机

4.10.3   结果分析方法:

# cat /proc/sys/net/ipv4/icmp_echo_ignore_all

0

4.10.4   备注:

本例输出表示系统响应ICMP请求

 

4.11    系统服务运行等级信息检查

4.11.1   说明:

查看系统服务运行等级信息

4.11.2   检查方法:

chkconfig --list

4.11.3   结果分析方法:

# chkconfig --list      

syslog          0:off   1:off   2:on    3:on    4:on    5:on    6:off

microcode_ctl   0:off   1:off   2:on    3:on    4:on    5:on    6:off

netfs           0:off   1:off   2:off   3:off   4:on    5:on    6:off

network         0:off   1:off   2:on    3:on    4:on    5:on    6:off

random          0:off   1:off   2:on    3:on    4:on    5:on    6:off

rawdevices      0:off   1:off   2:off   3:on    4:on    5:on    6:off

saslauthd       0:off   1:off   2:off   3:off   4:off   5:off   6:off

xinetd          0:off   1:off   2:off   3:on    4:on    5:on    6:off

portmap         0:off   1:off   2:off   3:off   4:on    5:on    6:off

apmd            0:off   1:off   2:on    3:off   4:on    5:on    6:off

atd             0:off   1:off   2:off   3:off   4:on    5:on    6:off

gpm             0:off   1:off   2:on    3:off   4:on    5:on    6:off

autofs          0:off   1:off   2:off   3:off   4:on    5:on    6:off

irda            0:off   1:off   2:off   3:off   4:off   5:off   6:off

keytable        0:off   1:on    2:on    3:off   4:on    5:on    6:off

kudzu           0:off   1:off   2:off   3:off   4:on    5:on    6:off

sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off

snmpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off

snmptrapd       0:off   1:off   2:off   3:off   4:off   5:off   6:off

sendmail        0:off   1:off   2:on    3:off   4:on    5:on    6:off

smartd          0:off   1:off   2:off   3:off   4:off   5:off   6:off

iptables        0:off   1:off   2:on    3:off   4:on    5:on    6:off

nfs             0:off   1:off   2:off   3:off   4:off   5:off   6:off

nfslock         0:off   1:off   2:off   3:off   4:on    5:on    6:off

rhnsd           0:off   1:off   2:off   3:off   4:on    5:on    6:off

pcmcia          0:off   1:off   2:on    3:off   4:on    5:on    6:off

crond           0:off   1:off   2:on    3:off   4:on    5:on    6:off

anacron         0:off   1:off   2:on    3:off   4:on    5:on    6:off

aep1000         0:off   1:off   2:off   3:off   4:off   5:off   6:off

bcm5820         0:off   1:off   2:off   3:off   4:off   5:off   6:off

httpd           0:off   1:off   2:off   3:on    4:off   5:off   6:off

xinetd based services:

        chargen-udp:    off

        chargen:        off

        daytime-udp:    off

        daytime:        off

        echo-udp:       off

        echo:   off

        services:       off

        servers:        off

        time-udp:       off

        time:   off

        cvs:    on

        wu-ftpd:        off

        rsync:  off

4.12    系统是否安装ftp信息检查

说明:

查看系统是否安装ftp软件包

4.12.1   检查方法:

rpm -qa | grep ftp

ls /etc/xinetd.d/*ftp*

结果分析方法:

# rpm -qa | grep ftp

ftp-0.17-15

lftp-2.5.2-5

wu-ftpd-2.6.2-8

 

# ls /etc/xinetd.d/*ftp*

/etc/xinetd.d/wu-ftpd

4.13    系统是否存在sendmail服务或relay进程信息检查

4.13.1   说明:

查看系统是否存在sendmail服务或relay进程

4.13.2   检查方法:

cat /etc/sysconfig/sendmail

4.13.3   结果分析方法:

# cat /etc/sysconfig/sendmail

DAEMON=yes

QUEUE=1h

5       文件系统

5.1 初始文件创建权限信息检查

5.1.1    说明:

查看系统初始文件创建权限

5.1.2    检查方法:

umask

umask -S

5.1.3    结果分析方法:

查看普通用户初始文件创建权限

$ umask

0002

$ umask -S

u=rwx,g=rwx,o=rx

查看超级用户初始文件创建权限

# umask

0022

# umask -S

u=rwx,g=rx,o=rx

5.1.4    关键文件属性信息检查

5.2 说明:

查看系统关键文件属性

5.2.1    检查方法:

ls -al file_name

5.3 结果分析方法:

应对于如下系统关键文件属性进行检查:

/etc/shadow    /var/log/messages   /var/log/wtmp    /var/run/utmp

/etc/rc.d/init.d  /etc/inittab   /etc/group  /etc/crontab   /var/spool/cron

/etc/securetty  /etc/lilo.conf   /etc/grub.conf

5.4 /tmp属性信息检查

5.4.1    说明:

查看/tmp目录属性

5.4.2    检查方法:

ls -al /

5.4.3    结果分析方法:

# ls -al / | grep tmp

drwxrwxrwt    7 root         4096 May 11 20:07 tmp/

5.4.4    备注:

本例输出表示/tmp目录已设置sticky位

 

5.5 系统特殊文件信息检查

5.5.1    说明:

查看系统存在的特殊文件(SUID/SGID程序,/dev下的非设备文件,非/dev下的设备文件,所有可写的文件,没有属主的文件,rhosts文件等)

5.5.2    检查方法:

查找SUID/SGID程序:

# find / -type f ( -perm -04000 -o -perm -02000 ) -ls

查找/dev下的非设备文件:

# /bin/find  /dev  -type f  -exec ls -l {} \;

查找非/dev下的设备文件:

# /bin/find  /  \( -type b -o -type c\) -print | grep -v '^/dev/'

查找所有可写的文件:

# /bin/find / -perm -2 ! –type l -ls

查找没有属主的文件:

# /bin/find  /  \( -nouser –o –ongroup\) -print

查找rhosts文件:

# /bin/find  / -name .rhosts -print

5.5.3    结果分析方法:

同检查方法

5.5.4    备注:

本例所有输出可以重定向到文件,即在每个命令之后加入 > result,方便结果汇总。

5.6 系统分区加载信息检查

5.6.1    说明:

查看系统分区加载情况

5.6.2    检查方法:

mount

cat /etc/fstab

5.6.3    结果分析方法:

# mount

 

# cat /etc/fstab

 

5.7 共享文件系统信息检查

5.7.1    说明:

查看共享的文件系统信息

5.7.2    检查方法:

exportfs      cat /etc/export

5.7.3    结果分析方法:

# exportfs

# cat /etc/export

5.8 加载nfs文件系统信息检查

5.8.1    说明:

查看系统加载的nfs文件系统信息

5.8.2    检查方法:

df -k

5.8.3    结果分析方法:

# df -k

 

6       日志审核

6.1 系统AUTH日志信息检查

6.1.1    说明:

查看系统AUTH日志信息

6.1.2    检查方法:

cat syslog.conf | grep auth

6.1.3    结果分析方法:

# cat syslog.conf | grep auth

# Don't log private authentication messages!

*.info;mail.none;authpriv.none;cron.none                /var/log/messages

# The authpriv file has restricted access.

authpriv.*                                              /var/log/secure

6.1.4    备注:

本例输出表示AUTH日志信息均发往/var/log/secure

7       安全增强性

7.1 系统启动LILO密码设置检查

7.1.1    说明:

查看系统启动LILO是否设置密码

7.1.2    检查方法:

cat /etc/lilo.conf  | grep passwd

7.1.3    结果分析方法:

# cat /etc/lilo.conf  | grep passwd

7.1.4    备注:

本例输出表示系统启动LILO不需要输入密码

 

7.2 系统禁止Control-Alt-Delete键盘关闭命令信息检查

7.2.1    说明:

查看系统是否禁止Control-Alt-Delete键盘关闭命令

7.2.2    检查方法:

cat /etc/inittab | grep ca

7.2.3    结果分析方法:

# cat /etc/inittab | grep ca

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

7.2.4    备注:

本例输出表示系统并未禁止Control-Alt-Delete键盘关闭命令

 

7.3 登录时隐藏系统信息检查

7.3.1    说明:

查看系统是否屏蔽提示信息

7.3.2    检查方法:

控制台登录或查看/etc/issue、/etc/issue.net文件

 

7.4 系统是否多重引导信息检查

7.4.1    说明:

查看系统(特别是生产机)是否存在多重引导

7.4.2    检查方法:

cat /etc/lilo.conf

cat /etc/grub.conf

7.4.3    结果分析方法:

# cat grub.conf

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE:  You have a /boot partition.  This means that

#          all kernel and initrd paths are relative to /boot/, eg.

#          root (hd0,0)

#          kernel /vmlinuz-version ro root=/dev/sda2

#          initrd /initrd-version.img

#boot=/dev/sda

default=1

timeout=10

splashimage=(hd0,0)/grub/splash.xpm.gz

 

title Red Hat Linux (2.4.18-14)

        root (hd0,0)

        kernel /vmlinuz-2.4.18-14 ro root=LABEL=/

        initrd /initrd-2.4.18-14.img

 

title Red Hat Linux (2.4.19)

        root (hd0,0)

        kernel /bzImage-2.4.19 ro root=/dev/sda2

7.4.4    备注:

本例输出表示系统只安装了Red Hat Linux

 

7.5 系统启动时运行等级信息检查

7.5.1    说明:

查看系统启动时运行等级

7.5.2    检查方法:

cat /etc/inittab | grep id

7.5.3    结果分析方法:

# cat /etc/inittab | grep id

id:3:initdefault:

7.5.4    备注:

本例输出中3表示系统启动后进入多用户模式,5表示系统启动后进入X windows模式。

 

7.6 系统控制台访问信息检查

7.6.1    说明:

查看哪些系统帐号可以从控制台登录

7.6.2    检查方法:

cat /etc/security/access.conf | grep -v "#"

7.6.3    结果分析方法:

# cat /etc/security/access.conf | grep -v "#"

7.7 系统虚拟设备检查

7.7.1    说明:

查看哪些系统虚拟设备允许远程连接

7.7.2    检查方法:

cat /etc/securetty | grep -v "tty"

7.7.3    结果分析方法:

# cat /etc/securetty | grep -v "tty"

 

7.7.4    备注:

本例输出说明vc设备允许远程连接

8       后门与日志检查

检查系统日志文件是否完备,是否存在异常情况,如日期,大小,完整性。

 

9       第三方安全产品安装情况

是否禁用telnetd service使用openssh等加密连接协议来进行remote login登陆

若安装md5软件包 请检测/bin/login的md5效检值是否一至 与文件权限问题

若有必要可以truss跟踪ls, ps ,netstat 等系统调用  查看是否存在不正常的系统调用和函数劫持.

相关阅读 更多 +
排行榜 更多 +
里科竞技场最新版

里科竞技场最新版

飞行射击 下载
辣了么卷饼传奇最新版

辣了么卷饼传奇最新版

模拟经营 下载
尸潮塔防最新版

尸潮塔防最新版

策略塔防 下载