当前位置:网站首页>记一次清理挖矿病毒的过程
记一次清理挖矿病毒的过程
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.重启服务
最好重启下服务器再重启服务,此时服务已正常。
边栏推荐
- c语言char, wchar_t, char16_t, char32_t和字符集的关系
- @Detailed differences among getmapping, @postmapping and @requestmapping, with actual combat code (all)
- 红杉中国,刚刚募资90亿美元
- Enhance network security of kubernetes with cilium
- Chris LATTNER, the father of llvm: why should we rebuild AI infrastructure software
- [Li Kou brushing questions] one dimensional dynamic planning record (53 change exchanges, 300 longest increasing subsequence, 53 largest subarray and)
- SQL:存储过程和触发器~笔记
- R3live notes: image processing section
- Proxy and reverse proxy
- PostgreSQL 修改数据库用户的密码
猜你喜欢
Shake Sound poussera l'application indépendante de plantation d'herbe "louable", les octets ne peuvent pas oublier le petit livre rouge?
红杉中国,刚刚募资90亿美元
Is it profitable to host an Olympic Games?
OneNote in-depth evaluation: using resources, plug-ins, templates
PostgreSQL install GIS plug-in create extension PostGIS_ topology
[sliding window] group B of the 9th Landbridge cup provincial tournament: log statistics
50 commonly used numpy function explanations, parameters and usage examples
[Digital IC manual tearing code] Verilog automatic beverage machine | topic | principle | design | simulation
PostgreSQL 安装gis插件 CREATE EXTENSION postgis_topology
Absolute primes (C language)
随机推荐
Quick access to video links at station B
PostgreSQL 安装gis插件 CREATE EXTENSION postgis_topology
Sql: stored procedures and triggers - Notes
在最长的距离二叉树结点
el-table表格——sortable排序 & 出现小数、%时排序错乱
Four common ways and performance comparison of ArrayList de duplication (jmh performance analysis)
缓存更新策略概览(Caching Strategies Overview)
Caching strategies overview
3D face reconstruction: from basic knowledge to recognition / reconstruction methods!
JS learning notes OO create suspicious objects
Thinking about agile development
Tiktok will push the independent grass planting app "praiseworthy". Can't bytes forget the little red book?
[redis design and implementation] part I: summary of redis data structure and objects
Technology sharing | packet capturing analysis TCP protocol
From campus to Tencent work for a year of those stumbles!
Hill | insert sort
After working for 5 years, this experience is left when you reach P7. You have helped your friends get 10 offers
启动嵌入式间:资源有限的系统启动
JS operation DOM element (I) -- six ways to obtain DOM nodes
[in depth learning] pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs