http://185.181.10.234 cpuminer-sse2挖矿病毒清除笔记

in 前端 with 0 comment

先说原因
某个管理员使用root权限启动了redis且未设置密码。

清除过程
0.停止redis-server,配置密码,使用redis用户启动
1.killall cpuminer-sse2
2.删除 /tmp 目录下的挖矿程序
3.删除crontab任务,目录在/var/spool/cron/,/etc/cron.d 几个cron目录都看看
4.检查 /root/.ssh是否加了未知公钥

观察几天,看是否还能自动起来。

病毒还是会自动启动

观察
5.使用命令搜索find / -name="redis-server" 发现病毒加了不少虚假的redis-server
全部删掉

/etc/rc6.d/K01redis-server
/etc/rc2.d/S03redis-server
/etc/rc4.d/S03redis-server
/etc/systemd/system/redis-server.service
/etc/systemd/system/multi-user.target.wants/redis-server.service
/etc/default/redis-server
/etc/init.d/redis-server
/etc/rc1.d/K01redis-server
/etc/rc3.d/S03redis-server
/etc/logrotate.d/redis-server
/etc/rc0.d/K01redis-server
/etc/rc5.d/S03redis-server
/var/log/redis/redis-server.log
/var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/redis-server.service
/var/lib/systemd/deb-systemd-helper-enabled/redis-server.service.dsh-also
/var/lib/systemd/deb-systemd-helper-masked/redis-server.service
/var/lib/dpkg/info/redis-server.list
/var/lib/dpkg/info/redis-server.postrm
Comments are closed.