Linux操作系统安全检查

作为程序员也可以了解一下这些知识

一、检查系统密码文件,查看文件修改日期

[root@fedora ~]# ls -l /etc/passwd


二、查看passwd文件中有哪些特权用户

[root@fedora ~]# awk -F: '$3= =0 {print $1}' /etc/passwd


三、查看系统里有没有空口令帐户

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


四、检查系统守护进程

cat /etc/inetd.conf | grep -v "^#"


五、检查网络连接和监听端口

netstat –an

netstat –rn

ifconfig –a


六、查看正常情况下登录到本机的所有用户的历史记录

last


七、检查系统中的core文件

find / -name core -exec ls -l {} \;


八、检查系统文件完整性

rpm –qf /bin/ls

rpm -qf /bin/login

md5sum –b 文件名

md5sum –t 文件名九、查找是否有后门

cat /etc/crontab

ls /var/spool/cron/

cat /etc/rc.d/rc.local

ls /etc/rc.d

ls /etc/rc3.d

find / -type f -perm 4000

Comments : 0

有问题可在下面发表评论,当然没事也可以在下面吹吹牛皮、扯扯淡!

发表评论

*


Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/blog/content/templates/Bitter/footer.php:40) in /www/wwwroot/blog/include/lib/view.php on line 23