当前位置:网站首页>记一次清理挖矿病毒的过程
记一次清理挖矿病毒的过程
2022-07-06 13:28:00 【奔跑吧邓邓子】
一、现象
网站挂掉了,查看后台服务已宕掉,无法正常重启。
二、处理
1.查看内存使用情况
在没有启动任何服务的情况下,内存已基本被耗尽:
free -h
total used free shared buff/cache available
Mem: 7.6G 6.4G 581M 401M 690M 640M
Swap: 0B 0B 0B
2.查看各进程资源使用情况
top
top - 11:44:00 up 389 days, 23:40, 4 users, load average: 0.00, 0.01, 0.05
Tasks: 209 total, 1 running, 156 sleeping, 0 stopped, 52 zombie
%Cpu(s): 0.1 us, 0.2 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 8008264 total, 683664 free, 6721116 used, 603484 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 642776 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2999 root 20 0 162244 2432 1592 S 0.3 0.0 0:00.68 top
5303 root 30 10 3180208 56596 784 S 0.3 0.7 1791:48 xmrig
...
看到 xmrig 占用了资源。
3.查看计划任务
ls /var/spool/cron/
root
查看 root 文件内容:
vi root
30 21 * * * bash /usr/local/apache-tomcat-8.0.46/bin/.moneroocean/miner.sh
查看 .moneroocean 目录下文件:
cd /usr/local/apache-tomcat-8.0.46/bin/.moneroocean
ll
total 8628
-rw-r--r-- 1 root root 6983 Jun 8 03:52 config.json
-rwxr-xr-x 1 root root 375 Jun 8 03:49 miner.sh
-rwxr-xr-x 1 root root 8821240 Apr 1 09:46 xmrig
4.删除文件
cd /var/spool/cron/
rm -rf *
cd /usr/local/apache-tomcat-8.0.46/bin/
rm -rf .moneroocean/
5.杀掉 xmrig 进程
查找所有的 xmrig 进程并杀掉:
ps -ef | grep xmrig
6.重启服务
最好重启下服务器再重启服务,此时服务已正常。
边栏推荐
- Nodejs tutorial let's create your first expressjs application with typescript
- JPEG2000-Matlab源码实现
- Guava: three ways to create immutablexxx objects
- The use method of string is startwith () - start with XX, endswith () - end with XX, trim () - delete spaces at both ends
- [sliding window] group B of the 9th Landbridge cup provincial tournament: log statistics
- Explain ESM module and commonjs module in simple terms
- 039. (2.8) thoughts in the ward
- 中国白酒的5场大战
- 14 years Bachelor degree, transferred to software testing, salary 13.5k
- 通过数字电视通过宽带网络取代互联网电视机顶盒应用
猜你喜欢
抖音將推獨立種草App“可頌”,字節忘不掉小紅書?
[interpretation of the paper] machine learning technology for Cataract Classification / classification
[Li Kou brush questions] 32 Longest valid bracket
Z function (extended KMP)
快讯:飞书玩家大会线上举行;微信支付推出“教培服务工具箱”
Quick news: the flybook players' conference is held online; Wechat payment launched "education and training service toolbox"
guava:Collections.unmodifiableXXX创建的collection并不immutable
JPEG2000 matlab source code implementation
Five wars of Chinese Baijiu
一行代码可以做些什么?
随机推荐
HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
互联网快讯:吉利正式收购魅族;胰岛素集采在31省全面落地
中国白酒的5场大战
Is this the feeling of being spoiled by bytes?
WEB功能测试说明
Chris LATTNER, the father of llvm: why should we rebuild AI infrastructure software
In JS, string and array are converted to each other (I) -- the method of converting string into array
[go][转载]vscode配置完go跑个helloworld例子
Nodejs教程之Expressjs一篇文章快速入门
How do I remove duplicates from the list- How to remove duplicates from a list?
Quick news: the flybook players' conference is held online; Wechat payment launched "education and training service toolbox"
快讯:飞书玩家大会线上举行;微信支付推出“教培服务工具箱”
Yyds dry inventory run kubeedge official example_ Counter demo counter
JPEG2000-Matlab源码实现
@GetMapping、@PostMapping 和 @RequestMapping详细区别附实战代码(全)
SQL:存储过程和触发器~笔记
Leetcode topic [array] -118 Yang Hui triangle
string的底层实现
guava:Collections.unmodifiableXXX创建的collection并不immutable
JS traversal array and string