前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >紧急预警:wls9_async_response.war组件漏洞的延续

紧急预警:wls9_async_response.war组件漏洞的延续

作者头像
数据和云
发布2019-06-28 11:02:04
5040
发布2019-06-28 11:02:04
举报
文章被收录于专栏:数据和云

墨墨导读:2019 年 6 月 19 日,Oracle 官方正式发出通告,weblogic 存在一个最新的高位漏洞 cve-2019-2729。此漏洞来源于 OracleWebLogicServer 的 WebServices 组件,分值达到 9.8。

1. 问题跟踪


2019 年 6 月 19 日,Oracle 官方正式发出通告,weblogic 存在一个最新的高位漏洞 cve-2019-2729。此漏洞来源于 OracleWebLogicServer 的 WebServices 组件,分值达到 9.8。 (简单说利用反序列化漏洞在不需要用户、密码的情况下远程攻击运行的 weblogicserver)。 其实在6月16日,国内不少安全厂商就已经反馈此漏洞,此漏洞根源在于oraclecve-2019-2725 修复不彻底,应用了 cve-2019-2725 补丁后,仍然被绕过。

建议重点修复那种架构简单,外网直接访问 weblogic 的应用。 https://www.oracle.com/technetwork/security-advisory/alert-cve-2019-2729-5570780.html

重新定义漏洞为 CVE-2019-2729

2. 分析及发现


总的来说就是每一个 weblogicserver 实例都会发布一个内部的异步 webservice 应用 (bea_wls9_async_response.war),该服务处理异步请求响应功能。但可以使用参数禁用它。

2.1 Disabling The Internal Asynchronous Service

By default, every WebLogic Server instance deploys an internal asynchronous Web Service that handes the asynchronous request-response feature. To specify that you do not want to deploy this internal service, start the WebLogic Server instance using the -Dweblogic.wsee.skip.async.response=true Java system property. One reason for disabling the asynchronous service is if you use a WebLogic Server instance as a Web proxy to a WebLogic cluster. In this case, asynchronous messages will never get to the cluster, as required, because the asynchronous service on the proxy server consumes them instead. For this reason, you must disable the asynchronous service on the proxy server using the system property.

漏洞排查:

http://ip:port/_async/AsyncResponseService

什么样的应用可以禁用?

如果确认本 domain 没有使用异步 webservices,那么完全可以禁用这个组件

使用 weblogic 异步 webservices 示例:

如何确认

一般会引起下面三个 weblogic 自带的 class

importweblogic.wsee.async.AsyncPreCallContext; importweblogic.wsee.async.AsyncCallContextFactory; importweblogic.wsee.async.AsyncPostCallContext;

代码语言:javascript
复制
packageexamples.webservices.async_req_res;
importweblogic.jws.WLHttpTransport; importweblogic.jws.ServiceClient; importweblogic.jws.AsyncResponse; importweblogic.jws.AsyncFailure;
importweblogic.wsee.async.AsyncPreCallContext; importweblogic.wsee.async.AsyncCallContextFactory; importweblogic.wsee.async.AsyncPostCallContext;
importjavax.jws.WebService; importjavax.jws.WebMethod;
importexamples.webservices.async_req_res.StockQuotePortType;
importjava.rmi.RemoteException;
@WebService(name="StockQuoteClientPortType", serviceName="StockQuoteClientService", targetNamespace="http://examples.org/")
@WLHttpTransport(contextPath="asyncClient", serviceUri="StockQuoteClient",
云和恩墨 成就所托 www.enmotech.com
http://www.enmotech.com 实力成就稳健 技术创造价值 -6
portName="StockQuoteClientServicePort")
/** * ClientWebServicethatinvokestheStockQuoteServiceasynchronously. */
publicclassStockQuoteClientImpl{
@ServiceClient(wsdlLocation="http://localhost:7001/async/StockQuote?WSDL", serviceName="StockQuoteService",portName="StockQuote")
privateStockQuotePortTypeport;
@WebMethod publicvoidasyncOperation(Stringsymbol,StringuserName) throwsRemoteException{
AsyncPreCallContextapc=AsyncCallContextFactory.getAsyncPreCallContext(); apc.setProperty("userName",userName);
try{ port.getQuoteAsync(apc,symbol); System.out.println("ingetQuotemethodofStockQuoteClientWS");
}catch(RemoteExceptionre){
System.out.println("RemoteExceptionthrown"); thrownewRuntimeException(re);
}
}
@AsyncResponse(target="port",operation="getQuote") publicvoidonGetQuoteAsyncResponse(AsyncPostCallContextapc,intquote){ //GettheuserNameproperty wesetonAsyncPreCallContext StringuserName=(String)apc.getProperty("userName"); System.out.println("-------------------"); System.out.println(username+"Gotquote"+quote); System.out.println("-------------------"); }
@AsyncFailure(target="port",operation="getQuote") publicvoidonGetQuoteAsyncFailure(AsyncPostCallContextapc,Throwablee){ System.out.println("-------------------"); e.printStackTrace();
云和恩墨 成就所托 www.enmotech.com
http://www.enmotech.com 实力成就稳健 技术创造价值 -7
System.out.println("-------------------");
}
}

3. 影响范围


Weblogic: 9.2~12213(重点是外网直接访问 weblogic 的应用) 参考文档:

9.2

https://docs.oracle.com/cd/E13222_01/wls/docs92/webserv/advanced.html#wp265081

1221

https://docs.oracle.com/middleware/1221/wls/WSRPC/jax-rpc-async.htm#WSRPC317

各版本错误纠正日期说明:

ErrorCorrectionSupportDatesforOracleWebLogicServer(文档 ID950131.1) 注意:举例说官方指出影响 12.2.1.3 版本,实际是影响 12.2.*版本,即影响 12.2 的所有版本,只 是因为这几个版本已经过了错误纠正日期。没有对应补丁而已。

4. 整改建议


3.1 添加-Dweblogic.wsee.skip.async.response=true

在启动脚本中添加上面参数,可以禁用此组件

示例:

调整前效果:

调整后效果: 组件访问被禁用

3.2 删除此 war 包

示例如下:

find.-namebea_wls9_async_response.war

3.3 防火墙、负载均衡器实施限制

禁止访问带有这种/_async 上下文根

3.4 打补丁 4 月 27 日官方发布补丁已经失效,请使用 2019-6-19 新发布补丁进行修复。 SecurityAlertCVE-2019-2729PatchAvailabilityDocumentforOracleWebLogicServer(文档 ID 2555019.1)

如果已经应用 cve-2019-2725 的补丁,必须先卸载后,才能应用 cve-2019-2729 补丁。 鉴于已有先例,彻底的解决方案使用 3.1 、3.2 、3.3。

3.5 附录

附:早期wls-wsat组件漏洞仍存在安全风险,如果http://ip_address:port/wls-wsat/CoordinatorPortType 可以访问,那么建议从防火墙、负载均衡器禁止访问带有这种/wls-wsat 上下文根、或者删除 示例如下:

find.-name*wsat* /home/WebLogic/Oracle/Middleware/wlserver_10.3/server/lib/wls-wsat.war home/WebLogic/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp/.in ternal/wls-wsat.war /home/WebLogic/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp/_ WL_internal/wls-wsat

12.2.1.0 及以后此功能已经禁用

5. 参考


  • WarningMessageonJMScomponentsintheConsole(DocID1347384.1)
  • https://docs.oracle.com/cd/E13222_01/wls/docs92/webserv/advanced.html#wp265081
  • https://docs.oracle.com/middleware/1221/wls/WSRPC/jax-rpc-async.htm#WSRPC307
  • https://docs.oracle.com/cd/E23943_01/web.1111/e13735/asynch.htm#WSRPA117

原创:刘韬,云和恩墨中间件服务交付团队专家,在中间件领域有多年的实战经验,精通 WebLogic server,Websphere,Jboss,Tomcat,tuxedo,mq,osb等多种中间件技术,对中间件的故障处理、性能优化、升级迁移等需求积累了丰富经验。

编辑:尹文敏

资源下载

关注公众号:数据和云(OraNews)回复关键字获取

2018DTCC , 数据库大会PPT

2018DTC,2018 DTC 大会 PPT

ENMOBK,《Oracle性能优化与诊断案例》

DBALIFE ,“DBA 的一天”海报

DBA04 ,DBA 手记4 电子书

122ARCH ,Oracle 12.2体系结构图

2018OOW ,Oracle OpenWorld 资料

产品推荐

云和恩墨Bethune Pro2 企业版,集监控、巡检、安全于一身,你的专属数据库实时监控和智能巡检平台,漂亮的不像实力派,你值得拥有!

云和恩墨zData一体机现已发布超融合版本和精简版,支持各种简化场景部署,零数据丢失备份一体机ZDBM也已发布欢迎关注。

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2019-06-20,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 数据和云 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
消息队列 TDMQ
消息队列 TDMQ (Tencent Distributed Message Queue)是腾讯基于 Apache Pulsar 自研的一个云原生消息中间件系列,其中包含兼容Pulsar、RabbitMQ、RocketMQ 等协议的消息队列子产品,得益于其底层计算与存储分离的架构,TDMQ 具备良好的弹性伸缩以及故障恢复能力。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档