ls /usr/bin/bsd-port
ls /usr/bin/dpkgd
#查看大小是否正常
ls -lh /bin/netstat
ls -lh /bin/ps
ls -lh /usr/sbin/lsof
ls -lh /usr/sbin/ss
2、上传如下命令到/root下
ps netstat ss lsof
3、删除如下目录及文件
rm -rf /usr/bin/dpkgd (ps netstat lsof ss)
rm -rf /usr/bin/bsd-port #木马程序
rm -f /usr/bin/.sshd #木马后门
rm -f /tmp/gates.lod
rm -f /tmp/moni.lod
rm -f /etc/rc.d/init.d/DbSecuritySpt(启动上述描述的那些木马变种程序)
rm -f /etc/rc.d/rc1.d/S97DbSecuritySpt
rm -f /etc/rc.d/rc2.d/S97DbSecuritySpt
rm -f /etc/rc.d/rc3.d/S97DbSecuritySpt
rm -f /etc/rc.d/rc4.d/S97DbSecuritySpt
rm -f /etc/rc.d/rc5.d/S97DbSecuritySpt
rm -f /etc/rc.d/init.d/selinux(默认是启动/usr/bin/bsd-port/getty)
rm -f /etc/rc.d/rc1.d/S99selinux
rm -f /etc/rc.d/rc2.d/S99selinux
rm -f /etc/rc.d/rc3.d/S99selinux
rm -f /etc/rc.d/rc4.d/S99selinux
rm -f /etc/rc.d/rc5.d/S99selinux
4、找出异常程序并杀死

5、删除含木马命令并重新安装(或者把上传的正常程序复制过去也行)
我自己重新安装好像不行,我是找的正常的机器复制的命令。
#ps
/root/chattr -i -a /bin/ps && rm /bin/ps -f
yum reinstall procps -y 或 cp /root/ps /bin
#netstat
/root/chattr -i -a /bin/netstat && rm /bin/netstat -f
yum reinstall net-tools -y 或 cp /root/netstat /bin
#lsof
/root/chattr -i -a /bin/lsof && rm /usr/sbin/lsof -f
yum reinstall lsof -y 或 cp /root/lsof /usr/sbin
#ss
/root/chattr -i -a /usr/sbin/ss && rm /usr/sbin/ss -f
yum -y reinstall iproute 或 cp /root/ss /usr/sbin
四、杀毒工具扫描
1、安装杀毒工具clamav
yum -y install clamav clamav-milter
2、启动服务
service clamd restart
3、更新病毒库
由于ClamAV不是最新版本,所以有告警信息。可以忽略或升级最新版本。
[root@mobile ~]# freshclam
ClamAV update process started at Sun Jan 31 03:15:52 2016
WARNING: Can't query current.cvd.clamav.net
WARNING: Invalid DNS reply. Falling back to HTTP mode.
Reading CVD header (main.cvd): WARNING: main.cvd not found on remote server
WARNING: Can't read main.cvd header from db.cn.clamav.net (IP: 185.100.64.62)
Trying again in 5 secs...
ClamAV update process started at Sun Jan 31 03:16:25 2016
WARNING: Can't query current.cvd.clamav.net
WARNING: Invalid DNS reply. Falling back to HTTP mode.
Reading CVD header (main.cvd): Trying host db.cn.clamav.net (200.236.31.1)...
OK
main.cvd is up to date (version: 55, sigs: 2424225, f-level: 60, builder: neo)








