• 服务器有无中木马前期诊断 注意:wget最好是从服务器上卸载掉,因为多数情况是wget下载木马到服务器的


    # rpm -qf /usr/bin/wget 
    wget-1.12-5.el6_6.1.x86_64
    rpm -e --nodeps wget

    有无下列文件:

     cat /etc/rc.d/init.d/selinux 
    #!/bin/bash
    /usr/bin/bsd-port/getty
    # cat /etc/rc.d/init.d/DbSecuritySpt 
    #!/bin/bash
    /data1/apps/merchant-wap-tomcat/6sz
    ]# ls /usr/bin/bsd-port/
    conf.n  getty  getty.lock
    # ls /usr/bin/dpkgd/
    lsof  netstat  ps  ss
    # ll -h /usr/bin/dpkgd/
    total 436K
    -rwxr-xr-x 1 root root 143K Mar 29 14:15 lsof
    -rwxr-xr-x 1 root root 126K Mar 29 14:15 netstat
    -rwxr-xr-x 1 root root  88K Mar 29 14:15 ps
    -rwxr-xr-x 1 root root  74K Mar 29 14:15 ss

    查看大小是否正常:

    [root@Appsrv160 bsd-port]# du -sh /bin/netstat #这个已经修复
    124K    /bin/netstat
    [root@Appsrv160 bsd-port]# du -sh /bin/ps #这个已经修复
    84K    /bin/ps
    [root@Appsrv160 bsd-port]# du -sh /usr/sbin/lsof 
    1.2M    /usr/sbin/lsof
    [root@Appsrv160 bsd-port]# du -sh /usr/sbin/ss
    1.2M    /usr/sbin/ss

    如果大小为1.2M,或者大小超过200k的都可以判定为异常文件,如果上面文件有异常,立即删除以下文件,如果删除以后

    立限恢复,先列改权限chmod 000 file_name,然后醒看文件的隐藏权限,lsattr file_name 去掉i,然后再删除。

    首先我是先把这些命令修复:

    修复后发现有以下问题:

    # du -sh /usr/sbin/*|grep M
    2.5M    /usr/sbin/aliyun-service
    1.9M    /usr/sbin/cache_check
    2.2M    /usr/sbin/cache_dump
    2.2M    /usr/sbin/cache_repair
    2.2M    /usr/sbin/cache_restore
    1.3M    /usr/sbin/prelink
    2.2M    /usr/sbin/thin_dump
    2.2M    /usr/sbin/thin_repair
    2.2M    /usr/sbin/thin_restore

    当我查看本的自己的机器的时候也发现如下:

    [root@localhost nb]# du -sh /usr/sbin/*|grep M
    1.3M    /usr/sbin/eapol_test
    1.1M    /usr/sbin/grub2-bios-setup
    1.3M    /usr/sbin/grub2-install
    1.1M    /usr/sbin/grub2-macbless
    1.1M    /usr/sbin/grub2-probe
    1.1M    /usr/sbin/grub2-sparc64-setup
    1.7M    /usr/sbin/lvm
    1.2M    /usr/sbin/ModemManager
    2.6M    /usr/sbin/NetworkManager
    1.2M    /usr/sbin/pdata_tools
    1.4M    /usr/sbin/wpa_supplicant

    所以不确定,现不去查这个文件!!!!

    删除以下文件和目录:

    # rm -rf /usr/bin/dpkgd/
    lsof     netstat  ps       ss 
    rm -rf /usr/bin/bsd-port/
    conf.n      getty       getty.lock
    # rm -f /usr/bin/.sshd
    # cat /tmp/gates.lod 
    6385
    rm -f /tmp/gates.lod
    # rm -f /tmp/moni.lod 
    # cat /etc/rc.d/init.d/DbSecuritySpt 
    #!/bin/bash
    /data1/apps/merchant-wap-tomcat/6sz
    # rm -f /etc/rc.d/init.d/DbSecuritySpt 

    参考:https://wenku.baidu.com/view/f94ba2c232d4b14e852458fb770bf78a65293a82.html

  • 相关阅读:
    django的json返回值带有汉字的处理
    easyui datagrid插件对返回数据的预处理
    easyui checkbox
    江西师大教育技术学硕士研究生培养方向介绍
    杯水人生
    成员管理及membership
    一份网络教育应用试题
    国外十大搜索引擎
    本科生毕业论文格式结构
    FCKeditor配置参考文章
  • 原文地址:https://www.cnblogs.com/bass6/p/6748451.html
Copyright © 2020-2023  润新知