可能重复:
我的服务器被黑了应急
我不是服务器pipe理员,在“debugging”服务器方面经验不足。 但是从看我的日志文件,看起来好像我被黑客攻击了。
但我不知道该怎么办: – /
服务器types:VPS
操作系统:Linux 2.6.18
服务器:Centos 5
pipe理界面:Parallels Plesk 9
当前内存使用情况:1024个中的200个。
错误日志文件7月10日
[Sat Jul 09 15:37:38 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/web [Sat Jul 09 15:37:39 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/php-my-admin [Sat Jul 09 15:37:39 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/websql [Sat Jul 09 15:37:40 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/phpmyadmin [Sat Jul 09 15:37:40 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/phpMyAdmin [Sat Jul 09 15:37:40 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/phpMyAdmin-2 [Sat Jul 09 15:37:41 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/php-my-admin [Sat Jul 09 15:37:41 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/phpMyAdmin-2.2.3 [Sat Jul 09 15:37:41 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/phpMyAdmin-2.2.6 [Sat Jul 09 15:37:42 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/phpMyAdmin-2.5.1 [Sat Jul 09 15:37:42 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/phpMyAdmin-2.5.4 [Sat Jul 09 15:37:43 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/phpMyAdmin-2.5.5-rc1 [Sat Jul 09 15:37:43 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/phpMyAdmin-2.5.5-rc2 [Sat Jul 09 15:37:43 2011] [error] [client 72.46.146.130] File does not exist: /var/www/vhosts/default/htdocs/phpMyAdmin-2.5.5 [Sat Jul 09 19:15:14 2011] [notice] mod_fcgid: process /var/www/vhosts/mysite.no/httpdocs/index.php(9512) exit(server exited), terminated by calling exit(), return code: 0 [Sat Jul 09 20:01:34 2011] [error] [client 93.158.147.8] File does not exist: /var/www/vhosts/default/htdocs/robots.txt [Sat Jul 09 21:09:18 2011] [notice] mod_fcgid: process /var/www/vhosts/mysite.no/httpdocs/index.php(18166) exit(normal exit), terminated by calling exit(), return code: 0 [Sat Jul 09 21:09:18 2011] [warn] mod_fcgid: cleanup zombie process 18166
错误日志文件八月
[Sun Jul 31 03:34:54 2011] [warn] Init: SSL server IP/port conflict: default-217-170-195-78:443 (/etc/httpd/conf.d/zz010_psa_httpd.conf:78) vs. horde.webmail:443 (/etc/httpd/conf.d/zzz_horde_vhost.conf:41) [Sun Jul 31 03:34:54 2011] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!! [Sun Jul 31 03:34:54 2011] [warn] WARNING: Attempt to change ServerLimit ignored during restart [Wed Aug 03 18:54:45 2011] [notice] mod_fcgid: server /var/www/vhosts/mysite.no/httpdocs/index.php(10098) started [Wed Aug 03 18:54:46 2011] [notice] mod_fcgid: too much /var/www/vhosts/mysite.no/httpdocs/index.php process(current:8, max:8), skip the spawn request [Sun Jul 31 12:20:29 2011] [warn] mod_fcgid: cleanup zombie process 17543 [Thu Aug 04 07:38:57 2011] [error] [client 188.138.88.210] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
我已经search了一下,看看是否有什么“指南”,我应该做的。 但是,我刚刚在与自己相同的情况下发现了很多论坛,并没有明确的答案。
有可能没有明确的答案,但我很确定有几个人应该知道的步骤。
我现在应该采取哪些措施来阻止黑客入侵?
是什么让你觉得你被黑了? 日志显示没有迹象。
他们只是表明有人试图访问您的服务器上不存在的一些文件。
而且他们表明你有一个configuration错误的networking服务器与CGI模块导致僵尸进程和死亡进程。
@Iain评论说,这是一个自动扫描,如果他对错,我不确定是否是我的头顶,但是我认为这是值得注意的,因为对网站进行encryption并重build它有点费劲如果这只是一个扫描。
首先,你有备份吗? 如果是这样,您可以尝试将您的备份的/ sbin和/ bin以及其他目录的内容与您的生产环境进行比较以查找更改。
你有安装文件完整性检查器? 事实上,如果您被黑客入侵,但没有用,请考虑安装像tripwire或samhain这样的系统。 正确configuration,他们可以通过电子邮件发送警报,当文件被改变或有可疑的活动。 (注意 – 这需要维护。当您更新系统时,相应地更新其数据库)
用chkrootkit和rkhunter检查系统。
监视系统是否有exception的networking活动。 使用像ntop这样的程序; 获取有关系统“正常”行为的统计信息,以便知道何时不正确或应该查看。 检查不寻常的开放端口。
用clamscan扫描您的系统,看看是否有任何常见的恶意软件迹象。
如果你没有备份…开始制作它们!
暂时我会谷歌类似的行为,你在日志中看到,看看是否有人发布有关它,发现它只是一个扫描。 如果你的系统不好玩,恶意软件扫描工具没有find任何你可能不用担心的事情(虽然如果被黑客攻击,偏执的反应是不相信你的二进制文件)。 如果你是通过一个使用打包程序的发行版进行安装的话,可能会检查你的二进制文件与打包程序,以确保一切都匹配…如果校验和匹配,你应该是好的。
我不认为你被黑客攻击,有人只是testing锁。
我会阻止72.46.146.130在你的防火墙(或通过本地防火墙),然后去检查你的锁自己(环顾四周查看Security.SE的build议)。
您可以稍后解除防火墙规则 – 您也可以联系VersaWeb( Whois中IP地址的联系信息)中的滥用行为人,如果您觉得特别有用/迂腐,请举报事件。
这只是一个寻找安装phpMyAdmin的机器人 – 旧版本中有可被利用的错误。 我们一直在服务器上看到类似的模式。 你没有被黑客入侵,但你应该小心保持任何phpMyAdmin安装,你可能是最新的。
编辑:正如其他人已经注意到的,日志表明这只是一个扫描。 尽pipe如此,我将把它作为黑客恢复的快速指南。
你必须弄清楚是怎么发生的 可能这是一些不安全的代码。 如果需要的话,请人帮助你,但只是重build将确保再次发生这种情况。
编辑 :正如其他人已经注意到的,日志表明这只是一个扫描。 尽pipe如此,我将把它作为黑客恢复的快速指南。
我的黑客灾难计划:
dd拷贝 closures服务器可能对您很困难(VPS),请快速备份并用火焚烧。