一台服务器被黑,很多系统命令被修改,并且命令文件即使使用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

 

 

 

相关文章:

  • 2022-12-23
  • 2021-08-13
  • 2021-09-17
  • 2022-01-29
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
  • 2021-05-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
  • 2021-12-10
相关资源
相似解决方案