Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux教程

出現「Unknown HZ value! (288) Assume 100」代表主機已被入侵

那天早上收到通知說伺服器的 root 密碼被改掉了,實測果然登不進去,繞了一圈才把密碼救回來。在沒有任何人動過密碼的前提下密碼卻變了,剩下的可能性只有一個:主機已經被入侵。接著執行 process 相關指令時,畫面跳出這行提示:

Unknown HZ value! (288) Assume 100.
root 15575 0.0 0.0 61116 740 pts/3 S 11:40 0:00 grep httpd

這個錯誤是什麼意思

查了資料才確認,這行訊息本身就是被入侵的鐵證:

Unknown HZ value! (##) Assume 100 -- You've been hacked!

On RHEL or CentOS 4 or 5, if you run the top command and see
something like "Unknown HZ value! (75) Assume 100", the number
may be anything.

If you see this, run rkhunter immediately, because your box has
probably been taken over by a rootkit -- either SHV4 or SHV5.

The only reason you see this clue is that the rootkit replaces the
top command (among others) with a substitute that hides its
processes. Their replacement top is old (version 1.2) and cannot
handle the HZ value of the 2.6 Linux kernel.

Sad to say, but if this happens to you, it's time to reinstall your OS!

換句話說,top 被掉了包,而掉包用的舊版 top 看不懂 2.6 核心的 HZ 值,才洩漏了破綻。

用 rkhunter 覆核

照建議裝了 rkhunter 掃一遍,Warning 與 Not Found 一大堆,同時抓到三個可疑 rootkit:

Rootkits checked : 258
Possible rootkits: 3
Rootkit names    : cb Rootkit, SHV4 Rootkit, SHV5 Rootkit

後續處理

SHV4/SHV5 這類後門會替換 ls、ifconfig、login、ssh 等基礎指令,也就是說你在機器上看到的很多「正常」都是假的。想徹底清除非常不容易,而且當下也判斷不出注入途徑究竟是 root 密碼被暴力破解,還是系統本身有漏洞。

現實的選擇是:先把資料備份出來,然後重裝系統。與其花時間和看不見的後門拉鋸,不如從乾淨的媒體重建,再回頭補上入侵路徑的防護。

Copyright © Linux教程網 All Rights Reserved