記一次centos 服務器中毒事件

雲平臺反應路由器流量異常,已經被強制關閉。html

這致使系統出現了很大了故障,路由器下面幾十個集羣,幾百臺機器,不知道哪臺機器出了問題,不能定位,真心糾結。centos

一臺臺在控制檯上看流量圖,最終定位到一臺elasticsearch服務器異常。bash

登陸上去,查看。服務器

tmp目錄下有好多不知名文件。。。elasticsearch

[root@index_8 ~]# ll -rt /tmp
total 2420
-rw-------. 1 root root 0 Jan 23 2014 yum.log
drwxr-xr-x 2 root root 4096 Apr 4 21:58 jna-3506402
drwxr-xr-x 2 root root 4096 Apr 4 21:58 hsperfdata_root
-rwxrwxrwx 1 root root 1223123 Apr 20 20:43 yijasjd.64
-rwxr-xr-x 1 root root 1223123 Apr 20 20:43 hfhqhdo.32
-rw-r--r-- 1 root root 4672 Apr 22 22:01 chomd.1
-rwxr-xr-x 1 root root 4 Apr 22 23:20 moni.lod
-rwxr-xr-x 1 root root 4 Apr 22 23:47 gates.lod
-rw-r--r-- 1 root root 73 Apr 27 00:11 conf.nspa

有正在執行的不知名程序。code

'''
ps axu |grep tmp
root 1902 0.1 0.0 105924 768 ? Ssl Apr22 8:27 /tmp/hfhqhdo.32
'''htm

立立刻搜索,找了個開源軟件查殺一下。blog

wget -c http://pkgs.repoforge.org/clamav/clamav-db-0.98-2.el6.rf.x86_64.rpm
wget -c http://pkgs.repoforge.org/clamav/clamav-0.98-2.el6.rf.x86_64.rpm
wget -c http://pkgs.repoforge.org/clamav/clamd-0.98-2.el6.rf.x86_64.rpm
rpm -ivh clamav-db-0.98-2.el6.rf.x86_64.rpm
yum install -y libtool-ltdl
rpm -ivh clamav-0.98-2.el6.rf.x86_64.rpm
rpm -ivh clamd-0.98-2.el6.rf.x86_64.rpm
service clamd start
service clamd status
freshclam
clamscan /homecrontab

寫進定時任務。

vi clamsc.sh
#/bin/bash
date_time=date +%Y%m%d
data_path=/mnt
PATH=/usr/bin:/bin
clamscan -r –remove \({data_path} >/var/log/clamdscan_\){date_time}.log
[root@localhost ~]#crontab -l

  • 12 * * * /clamsc.sh

1:"記一次被劫持掛馬經歷:Elasticsearch的遠程執行漏洞"
2:"服務器被黑以後的處理經歷"
3:"CentOS安裝配置clamav的若干問題"
4:"CentOS6.5下安裝ClamAV-0.98 " [5:"網址"](http://www.xianren.org/system/centos-clamav-0-98.html

相關文章
相關標籤/搜索