记录一次网站漏洞修复过程(二):第一轮处理(IIS目录枚举、应用程序错误)...

  • 解决IIS目录枚举

当前的IIS版本为7.5

【IIS】   => 【请求筛选】 => 【URL】中添加 【拒绝序列】 符号  ~ 

记录一次网站漏洞修复过程(二):第一轮处理(IIS目录枚举、应用程序错误)..._第1张图片

  • 应用程序错误

 

在Global.asax 中添加异常处理代码,当程序出现异常后,记录异常,跳转到预先设置的页面,避免暴漏太多的细节

    void Application_Error(object sender, EventArgs e) 
    {  
        string errorMsg = String.Empty;
        Exception currentError = Server.GetLastError();
        errorMsg += "来自页面的异常处理
"; errorMsg += "系统发生错误:
"; errorMsg += "错误地址:" + Request.Url + "
"; errorMsg += "错误信息:" + currentError.Message + "
"; Log.WriteLog(errorMsg); Server.ClearError(); Response.Redirect("~/err.html"); }

 

转载于:https://www.cnblogs.com/lilunjia/p/7735451.html

你可能感兴趣的:(记录一次网站漏洞修复过程(二):第一轮处理(IIS目录枚举、应用程序错误)...)