当前位置:网站首页>记一次清理挖矿病毒的过程
记一次清理挖矿病毒的过程
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.重启服务
最好重启下服务器再重启服务,此时服务已正常。
边栏推荐
- Proxy and reverse proxy
- Absolute primes (C language)
- [go][转载]vscode配置完go跑个helloworld例子
- [Digital IC manual tearing code] Verilog automatic beverage machine | topic | principle | design | simulation
- JPEG2000 matlab source code implementation
- It's not my boast. You haven't used this fairy idea plug-in!
- 【Redis设计与实现】第一部分 :Redis数据结构和对象 总结
- This year, Jianzhi Tencent
- 1292_FreeROS中vTaskResume()以及xTaskResumeFromISR()的实现分析
- Description of web function test
猜你喜欢
Is it profitable to host an Olympic Games?
PostgreSQL 修改数据库用户的密码
KDD 2022 | realize unified conversational recommendation through knowledge enhanced prompt learning
HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
guava:Collections.unmodifiableXXX创建的collection并不immutable
uni-app App端半屏连续扫码
Quick news: the flybook players' conference is held online; Wechat payment launched "education and training service toolbox"
Michael smashed the minority milk sign
Set up a time server
OneNote in-depth evaluation: using resources, plug-ins, templates
随机推荐
缓存更新策略概览(Caching Strategies Overview)
3D face reconstruction: from basic knowledge to recognition / reconstruction methods!
C语言:#if、#def和#ifndef综合应用
Leetcode topic [array] -118 Yang Hui triangle
Nodejs tutorial expressjs article quick start
Z function (extended KMP)
Tiktok will push the independent grass planting app "praiseworthy". Can't bytes forget the little red book?
强化学习-学习笔记5 | AlphaGo
[Digital IC manual tearing code] Verilog automatic beverage machine | topic | principle | design | simulation
Replace Internet TV set-top box application through digital TV and broadband network
Fzu 1686 dragon mystery repeated coverage
JPEG2000 matlab source code implementation
嵌入式开发的7大原罪
Nodejs教程之Expressjs一篇文章快速入门
快讯:飞书玩家大会线上举行;微信支付推出“教培服务工具箱”
Univariate cubic equation - relationship between root and coefficient
Efficiency tool +wps check box shows the solution to the sun problem
string的底层实现
[Li Kou brushing questions] one dimensional dynamic planning record (53 change exchanges, 300 longest increasing subsequence, 53 largest subarray and)
JS traversal array and string