It was exploiting standard and unsecured jmx console on jboss (i'm still using jboss v4.0.2), well.. that was entirely my fault wasn't to prioritize securing jmx and web console on production server. The code on .jsp was intended to open a console (cmd on windows or sh on linux) and fortunately the jboss service was executed by user 'jboss' not 'root' (you can imagine what happen if it was root).
This 'accident' forcing me to take time (mine and users) to apply jboss security. First step is i opening bookmark list on my browser (believe me or not i was bookmarking an some articles about securing jboss a couple months ago) and start to apply them. Here are the links : SecuringTheJMXConsole - Jboss Comunity and JBoss Application Server Security Vulnerability Notice.
Now some security was applied, and i need to test it right? download the exploit code and put it into linux box because it wrote using perl and i don't have perl on my windows. First i try the exploit to jboss on my development server which using standard/unsecured version and the exploit was working, this proofing that the exploit is wasn't defect. Then i try it to jboss on production server which the jmx and web concole already secured, and failed while complaining can't upload the file.
For now the jboss is secure from the exploit while i still need to explore other posibilities.
Update: April 1, 2011
Days after implementing secure jmx and web console, i'm not found any alien .war file any more. But netstat result mention some unknown irc connections.
Then i take these step:
1. Run a full scan and found 3 infected files:
ieh: Trojan.Perl.Shellbot-2
.X-un1x: Trojan.Perl.Shellbot-2
xh: Linux.Rst
and remove them.
2. I also checking
/tmp
and removing some suspicious files/folders which is owned by jboss and nothing to do with currently deployed legit applications (i.e: hibernate cache files). 3. Kill all process by PID shown from
netstat
(i use -p option to show pid).4. Re-check all process which is owned by jboss except one which running Jboss Server.
5. Check again
netstat
to make sure there are no more unwanted connections.