ASP.NET Form Authentication安全漏洞及对策(转贴)[1]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 gxh973121 的 blog

nt-bugtraq的邮件列表上首先报告的security bug in .net forms authentication适用于asp.net 1.0 (rtm, sp1, sp2, sp3)asp.net 1.1 (rtm, sp1).

 

form authentication被使用时,匿名用户在试图访问被保护的页面如http://localhost/webapplication2/secret.aspx时会被redirect到登录网页如http://localhost/webapplication2/login.aspx?returnurl=%2fwebapplication2%2fsecret.aspx.

 

但是如果使用mozilla,匿名用户可以这样未经认证就访问被保护的页面:http://localhost/webapplication2\secret.aspx;对ie,可以使用%5c达到类似的效果:http://localhost/webapplication2%5csecret.aspx

 

微软在105日发布了what you should know about a reported vulnerability in microsoft asp.net网页以提供针对此安全漏洞的对策。当前的对策主要是如kb887459所描述的那样在global.asax或其code-behind中在application_beginrequest中增加检查

 

    if (request.path.indexof('\\') >= 0 ||
        system.io.path.getfullpath(request.physicalpath) != request.physicalpath)
{

本文关键:ASP.NET Form Authentication安全漏洞及对策(转贴)
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top