模拟删除木马的操作:
1. 使用rm是无法删除的。
查看该文件的属性,发现属性为i(immutable)
[root@www ~]# lsattr .h*
----i-------- .hacker
[root@www ~]# rm .hacker
rm: remove write-protected regular empty file `.hacker'? y
rm: cannot remove `.hacker': Operation not permitted
2. 使用chattr命令去掉i属性。
[root@www ~]# chattr -i .hacker
使用lsattr命令查看属性。
[root@www ~]# lsattr .h*
------------- .hacker
3. 确认去掉了i属性之后就可以使用rm命令删除该木马文件了。
[root@www ~]# rm .hacker
rm: remove regular empty file `.hacker'? y
[root@www ~]# ls -l .h*
ls: .h*: No such file or directory