当前位置:网站首页>解决挖矿病毒 sshd2(redis未设密码、清除crontab定时任务)
解决挖矿病毒 sshd2(redis未设密码、清除crontab定时任务)
2022-06-23 05:37:00 【zetor_major】
在天翼云使用redis,开启了6379端口,但是当时未对redis设置密码、导致挖矿病毒入侵,如图:

此病毒,执行原理,请参考文章:
https://www.freebuf.com/column/211777.html
病毒脚本参考:
https://www.cnblogs.com/mikeguan/p/11314005.html
解决:
一、此病毒在启动后,会占用主机cpu至99%.

1. 查询病毒路径,lsof -p pid:

2. 清除病毒线程
kill -9 pid
3. 清除病毒程序
rm -rf /tmp/javax/*
二、由于清除后,可由定时任务拉起,比较顽固,在清除进程的同时,要清除定时任务,
![]()
详细如下:
1. 如不使用linux定时任务,crontab,可清除
rm -rf /etc/cron.d/root
rm -rf /var/spool/cron/crontabs
rm -rf /etc/crontab
关闭自启动:
systemctl disable crond.service
2. 如使用,则针对清除
rm -rf /var/spool/cron/crontabs/root
rm -rf /var/spool/cron/root
注:遇到删不掉的,执行:
- chattr -i /var/spool/cron/root
- chattr -a /var/spool/cron/root
cat -n /var/log/cron | tail -10
4. 清除成功后
- 请给redis设置密码,
- 配置远程端口安全组
- 修改redis bind ip(建议)
边栏推荐
- leetcode - 572. A subtree of another tree
- 将TensorFlow1.x改写为pytorch
- Link of Baidu URL Parameters? Recherche sur le chiffrement et le décryptage des paramètres d'URL (exemple de Code)
- c#数据库报错问题大家帮我看看吧
- Functions and basic structure of CPU
- 坐标 转化
- Phpstudy set 301 redirection
- JSON to proto
- 综合培养学生脑力思维的少儿编程
- 设计师需要懂的数据指标与数据分析模型
猜你喜欢
随机推荐
The softing datafeed OPC suite stores Siemens PLC data in an Oracle Database
C language removes line breaks (or other characters) at the end of strings
Give up Visio, this drawing tool is really fragrant!
Skilled use of slicing operations
XXL-SSO 实现SSO单点登录
js中if逻辑过多,常见优化
C# 获取DPI和真实分辨率的方式(可以解决一直是96的问题)
如何迁移virtualbox 的虚拟机到hype-v
百度URL参数之LINK?URL参数加密解密研究(代码实例)
QT creator builds osgearth environment (osgqt msvc2017)
聚焦智慧城市,华为携手中科星图共同开拓数字化新蓝海
Link of Baidu URL Parameters? Recherche sur le chiffrement et le décryptage des paramètres d'URL (exemple de Code)
Haas506 2.0 development tutorial - Advanced Component Library -modem Sim (only supports versions above 2.2)
English语法_副词 - ever / once
百度URL參數之LINK?URL參數加密解密研究(代碼實例)
索引——MySQL
Link of Baidu URL parameter? Research on URL parameter encryption and decryption (code example)
20220620 uniformly completely observable (UCO)
How to maintain secure encryption of email communication with FDA?
The central network and Information Technology Commission issued the National Informatization Plan for the 14th five year plan, and the network security market entered a period of rapid growth









