修复 JBoss 漏洞操作手册
中毒现象:
1. ps axf 看到多出了很多进程,尤其是有 pnscan 这个进程,它会对外扫描整个网络, 导致网络拥塞:
sh -c ./pnscan -r JBoss -w "HEAD / HTTP/1.0\r\n\r\n" -t 6400 61.223.0.0/16 8080 > /tmp/sess_008802541
2. crontab -l 看到多出了,有些中毒的则没有这个现象:
1 1 10 * * /root/.sysdbs
1 1 24 * * /root/.sysync.pl
1 1 10 * * /root/.sysdbs
1 1 24 * * /root/.sysync.pl
3. ${JBOSS_HOME}/bin/多出了好多文件, 这些文件的 owner 为未知 (比如为 1000): a.tar.gz bm.c bm.h bm.o flu.pl fly.pl install-sh ipsort kisses/ kisses.tar.gz kisses.tar.gz.1 linda.pl lindb.pl Makefile pnscan pnscan.c pnscan.o version.c version.o
修改:
1.清除 JBOSS 后门程序: all(default,minimal)这三个目录下都需要检查一下并做对应 ( 的处理。 ) # ${JBOSS_HOME}/server/all(default,minimal)/deploy/management/ 将该目录下的 iesvc.war wstats.war zecmd.war zmeu.war 等删除。 只留下 console-mgr.sar
2. 修改 jboss 配置:
一、JMX 安全设置: (all(default,minimal)这三个目录下都需要检查一下并做对应的 处理。 )
# vi ${JBOSS_HOME}/server/all(default,minimal)/deploy/jmx-console.war/WEB-INF/web.xml
<!-- A security constraint that restricts access to the HTML JMX console to users with the role JBossAdmin. Edit the roles to what you want and uncomment the WEB-INF/jboss-web.xml/security-domain element to enable secured access to the HTML JMX console. -->
<security-constraint>
<web-resource-collection>
<web-resource-name>HtmlAdaptor</web-resource-name>
<description>An example security config that only allows users with the role JBossAdmin to access the HTML JMX console web application </description>
<url-pattern>/*</url-pattern>
<!-<http-method>GET</http-method>
<http-method>POST</http-method> -->
</web-resource-collection>
<auth-constraint>
<role-name>JBossAdmin</role-name>
</auth-constraint>
</security-constraint>
把 GET 和 POST 两行注释掉,同时 security-constraint 整个部分不要注释掉。
# vi ${JBOSS_HOME}/server/all(default,minimal)/deploy/jmx-console.war/WEB-INF/jbossweb.xml
<jboss-web>
<!-- Uncomment the security-domain to enable security. You will need to edit the htmladaptor login configuration to setup the login modules used to authentication users. -->
<security-domain>java:/jaas/jmx-console</security-domain>
</jboss-web>
把 security-domain 注释去掉。
# vi ${JBOSS_HOME}/server/all(default,minimal)/conf/props/jmx-console-users.properties
# A sample users.properties file for use with the UsersRolesLoginModule admin=emsppassword123 修改 admin 密码
二、WEB-CONSOLE 安全设置: (all(default,minimal)这三个目录下都需要检查一下 并做对应的处理。 )
#vi ${JBOSS_HOME}/server/all(default,minimal)/deploy/management/console-mgr.sar/web -console.war/WEB-INF/web.xml
<!-- A security constraint that restricts access to the HTML JMX console to users with the role JBossAdmin. Edit the roles to what you want and uncomment the WEB-INF/jboss-web.xml/security-domain element to enable secured access to the HTML JMX console. -->
<security-constraint>
<web-resource-collection>
<web-resource-name>HtmlAdaptor</web-resource-name> <description>An example security config that only allows users with the role JBossAdmin to access the HTML JMX console web application </description>
<url-pattern>/*</url-pattern>
<!-<http-method>GET</http-method>
<http-method>POST</http-method> -->
</web-resource-collection>
<auth-constraint>
<role-name>JBossAdmin</role-name>
</auth-constraint>
</security-constraint>
把 GET 和 POST 两行注释掉,同时 security-constraint 整个部分不要注释掉。
# vi ${JBOSS_HOME}/server/all(default,minimal)/deploy/management/console-mgr.sar/web -console.war/WEB-INF/jboss-web.xml
<!-- Uncomment the security-domain to enable security. You will need to edit the htmladaptor login configuration to setup the login modules used to authentication users. -->
<security-domain>java:/jaas/web-console</security-domain>
把 security-domain 注释去掉。
# vi ${JBOSS_HOME}/server/all(default,minimal)/deploy/management/console-mgr.sar/web
-console.war/WEB-INF/classes/web-console-users.properties
# A sample users.properties file for use with the UsersRolesLoginModule admin= emsppassword123 修改 admin 密码
最后启动 jboss 生效。
分享到:
相关推荐
jboss利用 jboss漏洞
帮助修补JBOSS安全漏洞,防止别人黑进你的服务器。
JBOSS使用手册 JBOSS使用手册 JBOSS使用手册
Jboss安装配置手册
jboss中间件的反序列化漏洞检测工具,可检测主机搭建的中间件并获得shell
jboss4版本下,jbossweb-tomcat55.sar升级包,修复Apache Tomcat DIGEST身份验证多个安全漏洞(CVE-2012-3439) 升级包中的jar来源于tomcat5.5.36 使用方法:直接替换jboss中旧的jbossweb-tomcat55.sar
jboss portal 开发手册 e文版
Struts2及jboss漏洞利用工具。非常好用本人几经尝试过。 Struts2的漏洞实用工具 ,以及jboss的jar cmd运行代码,良心出品
JBOSS使用手册
Jboss 7官方配置,部署手册。稀有资料走过路过不要错过!
jbossesb开发手册,适合初学者学习使用
jboss漏洞和struts漏洞的详细解决方法
jboss漏洞getshell工具
操作手册操作手册操作手册操作手册操作手册
CVE-2017-12149漏洞利用工具,针对该漏洞快速方便的进行利用。
An Introduction to JMX Jboss Class Loading and Types 讲述了Jboss所使用的技术和配置,是学习Jboss机制的不错资料
jboss集群安装手册
JBOSS安装手册大全,详细介绍了JBOSS安装步骤和安装过程中出现的问题,值得一看