清理挖矿程序的脚本

systemctl disable myservice.service
systemctl stop myservice.service
systemctl status myservice.service
rm -fr /usr/lib/systemd/system/myservice.service

rm -fr /root/.cfg
rm -fr /usr/bin/mslog
rm -fr /usr/bin/player

sed -i /disown/d /var/spool/cron/root
crontab -l

sed -i /tutu/d /etc/passwd
grep tutu /etc/passwd

sed -i /tutu/d /etc/shadow
grep tutu /etc/shadow

if [ -f "/usr/local/lib/libextrasshd.so" ];then
  cat /etc/ld.so.preload
  > /etc/ld.so.preload
  mv /usr/local/lib/libextrasshd.so /tmp/libextrasshd.xyz
fi

cp /etc/skel/.bash* /root/

chattr -i .ssh/authorized_keys

find /root -name "libextrasshd.so" -o -name "sshc" -o -name "player" -o -name "dealer"
find /usr -name "libextrasshd.so" -o -name "sshc" -o -name "player" -o -name "dealer"
posted @ 2024-03-08 10:36  Gshelldon  阅读(53)  评论(0编辑  收藏  举报