挖矿木马排查
排查
查看可疑进程
$ htop
注意挖矿进程所属的用户。
校验所有软件包
$ rpm -Va
防止命令被替换。
查看是否修改了动态链接库
查看预加载的动态链接文件:
$ cat /etc/ld.so.preload
$ echo $LD_PRELOAD
清除
使用iptables阻断与矿池通讯
$ iptables -A INPUT -s xxx.com -j DROP
$ iptables -A OUTPUT -d xxx.com -j DROP
关闭定时任务
查看可疑的定时任务并删除
$ crontab -l
# 或
$ vim /var/spool/cron/root
还有一些目录下:
/etc/crontab、/var/spool/cron、/etc/cron.daily/、/etc/cron.hourly/、/etc/cron.monthly/、/etc/anacrontab
清除启动项
启动项的目录下:
/etc/rc0.d/、/etc/rc1.d/、/etc/rc2.d/、/etc/rc3.d/、/etc/rc4.d/、/etc/rc5.d/、/etc/rc6.d/、/etc/rc.d/、/etc/rc.local
清除公钥文件
查看或删除可疑公钥文件:
$ vim ~/.ssh/authorized_keys
杀死挖矿程序
$ kill -9 pid
# 或
$ pkill ddg.3014
解锁
使用chattr
解锁一些加了锁的文件:
$ chattr -i /file
Last updated
Was this helpful?