Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Linux 主機被入侵偵測實務:ps 偽裝、history 竄改、不明帳號、Rootkit 特徵識別

編輯:Linux 教學

駭客入侵後常植入 Rootkit 隱藏蹤跡。管理員可從四大徵兆快速判斷是否被植入:

1. ps 指令被替換

正常 /bin/ps 約 60 KB;若發現僅 12 KB 等異常縮小,極大機率被 Rootkit 替換為隱藏惡意進程的版本。

2. .bash_history 導向 /dev/null

執行 ls -l ~/.bash_history:
正常:-rw------- 1 user user 13829 ... .bash_history
被竄改:lrwxrwxrwx 1 user user 9 ... .bash_history -> /dev/null
發現符號連結指向 /dev/null,立即斷網、備份資料、重灌系統。

3. 不明 UID 0 帳號

grep :x:0: /etc/passwd 應僅回傳一行 root:x:0:0:root:/root:/bin/bash。若出現多行,表示有偽裝 root 的後門帳號。

4. 進階偵測建議

  • 部署入侵偵測系統 (IDS) 如 AIDE、Tripwire、OSSEC。
  • 定期離線比對關鍵二進制檔 checksum (rpm -Va / debsums)。
  • 集中式日誌伺服器防止本地日誌被清除。
  • 懷疑遭入侵時,優先聯繫專業資安廠商協助鑑識,切勿自行嘗試清理可能破壞證據。

基礎檢查雖有效,但無法替代完整纏繞防禦體系。

Copyright © Windows教程網 All Rights Reserved