Linux 服务器 cpu ni 占用率很高,被入侵过应该如何排查问题

2018-05-21 16:57:11 +08:00
 testVmap

详情: 服务器被黑过,cpu 的 ni 占用率很高,loadaverage 也很高,应该如何排查有问题的进程。 系统: 4 核 8G CentOS Linux release 7.2.1511 (Core)

top 命令结果
top - 16:46:40 up 4 days, 23:38,  2 users,  load average: 4.35, 4.30, 4.31
Tasks: 146 total,   2 running, 144 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.1 us,  0.0 sy, 99.9 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :  8010524 total,  4296640 free,  1017188 used,  2696696 buff/cache
KiB Swap:  1048572 total,  1039052 free,     9520 used.  5176172 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                          
30060 root      20   0 5259924 141036  18488 S   0.7  1.8   0:22.02 node                                                                                             
  975 root      20   0  114452   3408    992 S   0.3  0.0   1:04.21 hosteye                                                                                          
 2952 root      20   0 1293876  12520   1056 S   0.3  0.2  22:46.92 redis-server                                                                                     
30055 root      20   0 5259916 162624  18572 S   0.3  2.0   1:17.48 node                                                                                             
31983 root      20   0  148220   2088   1468 R   0.3  0.0   0:00.91 top                                                                                              
    1 root      20   0  127320   3232   1848 S   0.0  0.0   0:08.40 systemd                                                                                          
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kthreadd                                                                                         
    3 root      20   0       0      0      0 S   0.0  0.0   0:00.58 ksoftirqd/0                                                                                      
    5 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0H                                                                                     
    7 root      rt   0       0      0      0 S   0.0  0.0   0:00.08 migration/0                                                                                      
    8 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_bh                                                                                           
    9 root      20   0       0      0      0 R   0.0  0.0   2:09.62 rcu_sched                                                                                        
   10 root      rt   0       0      0      0 S   0.0  0.0   0:02.64 watchdog/0                                                                                       
   11 root      rt   0       0      0      0 S   0.0  0.0   0:02.12 watchdog/1  

5452 次点击
所在节点    Linux
10 条回复
skylancer
2018-05-21 17:25:05 +08:00
ni 很高,top 又看不出异常
那不先看看是不是 top 和 ps 被替换了?
jssyxzy
2018-05-21 17:31:15 +08:00
鸟哥私房菜 里面有专
youyoumarco
2018-05-21 17:42:32 +08:00
简单暴力的方法:备份重要数据,直接装系统。生产环境集群模式下推进。独立服务器的话,就需要排查命令是否被替换,看看端口的连接情况,和自己的备份版本做文件比对或者 MD5 对比。
realpg
2018-05-21 18:08:54 +08:00
被黑过,在没有牛逼运维的情况下,必须重做系统。
Actrace
2018-05-21 19:05:43 +08:00
这是,被人拉出来挖矿了?
一般来说没救了,直接重装系统吧。
soho176
2018-05-21 19:09:19 +08:00
入侵的漏洞不修复 装系统也没用。
defunct9
2018-05-21 21:26:26 +08:00
开 ssh,让我上去看看
msg7086
2018-05-22 00:27:54 +08:00
被黑过还折腾啥?核心系统文件说不定都被替换了个爽,格盘重装啦。
pony279
2018-05-22 09:12:32 +08:00
realpg
2018-06-17 15:33:21 +08:00
你既然问了问题,说明你没有 handle 这个问题的能力和知识

所以解决方案是唯一的:重装系统

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/456574

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX