一台服務器被黑,很多系統命令被修改,並且命令文件即使使用root賬號也無法刪除:
# rm -f /usr/bin/top rm: cannot remove `/usr/bin/top': Operation not permitted
網上查了一下原來是文件屬性被修改了,重置文件屬性后刪除成功。
# 查看文件屬性 # lsattr /usr/bin/top s----a------- /usr/bin/top # 取消被設置的屬性 # chattr -s /usr/bin/top # chattr -a /usr/bin/top # 刪除文件成功 # rm -f /usr/bin/top
詳細的文件屬性說明參見:
http://baike.baidu.com/view/2761030.htm