Linux系统病毒木马排查清除方法

Linux:
1.检查系统日志 
检查系统错误登陆日志,统计IP重试次数(last命令是查看系统登陆日志,比如系统被reboot或登陆情况) 
注:此时last命令也有可能变得不可靠,需要检查
--------------------- 

2.检查系统用户
查看是否有异常的系统用户 
[root@yeyiboy-IDC ~]# cat /etc/passwd

查看是否产生了新用户,UID和GID为0的用户 
[root@yeyiboy-IDC ~]# grep “0” /etc/passwd

查看passwd的修改时间,判断是否在不知的情况下添加用户 
[root@yeyiboy-IDC ~]# ls -l /etc/passwd

查看是否存在特权用户 
[root@yeyiboy ~]# awk -F: ‘3==0 {print3==0 {print1}’ /etc/passwd

查看是否存在空口令帐户 
[root@yeyiboy ~]# awk -F: ‘length(2)==0 {print2)==0 {print1}’ /etc/shadow
--------------------- 

3.检查异常进程
top  #仔细检查异常进程pid
ls -l /proc/pid/exe 查看异常进程命令所在地

4.简单判断有无木马
有无下列文件
cat /etc/rc.d/init.d/selinux
cat /etc/rc.d/init.d/DbSecuritySpt
ls /usr/bin/bsd-port 
ls /usr/bin/dpkgd
查看大小是否正常
ls -lh /bin/netstat
ls -lh /bin/ps
ls -lh /usr/sbin/lsof
ls -lh /usr/sbin/ss
--------------------- 

删除如下目录及文件
rm -rf /usr/bin/dpkgd  (ps netstat lsof ss)
rm -rf /
  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

miaobinfei

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值