根除矿机病毒xmrig

根除矿机病毒xmrig


#删除挖矿程序

ps -ef | grep -E 'xmrig|mxrig' | grep -v grep | awk '{print $2}' | xargs kill -9
rm -rf /root/c3pool/ /root/.cfg/ /tmp/.systemd/
find / -name "*xmrig*" -exec rm -rf {} \; 2>/dev/null :ml-citation{ref="2,3" data="citationList"}


* * * * * sleep 30; /root/shell/wakuang.sh > /dev/null 2>&1 #每隔30秒执行一次

寻找进程文件 cd
/proc/进程号/ ls -l

find / -name *c3pool* 找到执行文件:
/usr/bin/xm systemctl status pid eg:systemctl status 4903 查看日志 sudo journalctl -e
tail -f /var/log/cron  查看定时任务日志 crontab
-u 设定某个用户的cron服务 crontab -l 显示crontab文件(显示已设置的定时任务) crontab -e 编辑crontab文件(编辑定时任务) crontab -r 删除crontab文件(删除定时任务) crontab -i 删除crontab文件提醒用户(删除定时任务)

 

posted on 2024-09-13 17:39  Ruthless  阅读(277)  评论(0)    收藏  举报