当前位置:网站首页>记一次清理挖矿病毒的过程
记一次清理挖矿病毒的过程
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.重启服务
最好重启下服务器再重启服务,此时服务已正常。
边栏推荐
- js 根据汉字首字母排序(省份排序) 或 根据英文首字母排序——za排序 & az排序
- guava: Multiset的使用
- Guava: use of multiset
- 麦趣尔砸了小众奶招牌
- [sliding window] group B of the 9th Landbridge cup provincial tournament: log statistics
- 【力扣刷题】32. 最长有效括号
- C language: comprehensive application of if, def and ifndef
- Divide candy
- string的底层实现
- Redistemplate common collection instructions opsforzset (VI)
猜你喜欢

Numpy download and installation
![[Li Kou brushing questions] one dimensional dynamic planning record (53 change exchanges, 300 longest increasing subsequence, 53 largest subarray and)](/img/1c/973f824f061d470a4079487d75f0d0.png)
[Li Kou brushing questions] one dimensional dynamic planning record (53 change exchanges, 300 longest increasing subsequence, 53 largest subarray and)

Is it profitable to host an Olympic Games?

Absolute primes (C language)

Internet News: Geely officially acquired Meizu; Intensive insulin purchase was fully implemented in 31 provinces

1292_FreeROS中vTaskResume()以及xTaskResumeFromISR()的实现分析

50个常用的Numpy函数解释,参数和使用示例

Seven original sins of embedded development

抖音將推獨立種草App“可頌”,字節忘不掉小紅書?

The difference between break and continue in the for loop -- break completely end the loop & continue terminate this loop
随机推荐
SQL:存储过程和触发器~笔记
Michael smashed the minority milk sign
Fastjson parses JSON strings (deserialized to list, map)
[in depth learning] pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs
JS according to the Chinese Alphabet (province) or according to the English alphabet - Za sort &az sort
[redis design and implementation] part I: summary of redis data structure and objects
Web开发小妙招:巧用ThreadLocal规避层层传值
string的底层实现
Microsoft technology empowerment position - February course Preview
技术分享 | 抓包分析 TCP 协议
The role of applicationmaster in spark on Yan's cluster mode
通过数字电视通过宽带网络取代互联网电视机顶盒应用
jvm:大对象在老年代的分配
From campus to Tencent work for a year of those stumbles!
js 根据汉字首字母排序(省份排序) 或 根据英文首字母排序——za排序 & az排序
14年本科毕业,转行软件测试,薪资13.5K
JPEG2000-Matlab源码实现
Nodejs教程之Expressjs一篇文章快速入门
强化学习-学习笔记5 | AlphaGo
VIM basic configuration and frequently used commands