首页  编辑  

如何检查服务器被黑了

Tags: /计算机文档/Linux & Unix/   Date Created:

如何检查服务器被黑了

http://serverfault.com/questions/2783/how-do-i-know-if-my-linux-server-has-been-hacked

Keep a pristine copy of critical system files (such as ls, ps, netstat, md5sum) somewhere, with an md5sum of them, and compare them to the live versions regularly. Rootkits will invariably modify these files. Use these copies if you suspect the originals have been compromised.

aide or tripwire will tell you of any files that have been modified - assuming their databases have not been tampered with.

Configure syslog to send your logfiles to a remote log server where they can't be tampered with by an intruder. Watch these remote logfiles for suspicious activity

read your logs regularly - use logwatch or logcheck to synthesize the critical information.

Know your servers. Know what kinds of activities and logs are normal.

检查系统:

grep :x:0: /etc/passwd

只应该返回一行结果,类似下面:

root:x:0:0:root:/root:/bin/bash