ASP.NET Form Authentication安全漏洞及对策
ASP.NET Form Authentication安全漏洞及對策
在NT-Bugtraq的郵件列表上首先報告的Security bug in .NET Forms Authentication適用于ASP.NET 1.0 (RTM, SP1, SP2, SP3)和ASP.NET 1.1 (RTM, SP1).
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
?
當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
?
微軟在10月5日發布了What You Should Know About a Reported Vulnerability in Microsoft ASP.NET網頁以提供針對此安全漏洞的對策。當前的對策主要是如KB887459所描述的那樣在Global.asax或其Code-Behind中在Application_BeginRequest中增加檢查
?
顯然每個Application都需要有這樣的檢查以應對此安全漏洞。微軟還會提供其他的對策,請關注What You Should Know About a Reported Vulnerability in Microsoft ASP.NET網頁更新。
?
對ASP.NET 2.0 Beta1,并沒有此漏洞而是得到404錯誤。
?
貼子以"現狀"提供且沒有任何擔保也沒有授予任何權利
發表于 Thursday, October 07, 2004 1:53 AM
評論
?re: ASP.NET Form Authentication安全漏洞及對策 10/7/2004 8:49 AM
試過了,不行。IE 版本問題?
?re: ASP.NET Form Authentication安全漏洞及對策 10/7/2004 9:40 AM
啊,好可怕!幸好我用Beta1
?re: ASP.NET Form Authentication安全漏洞及對策 10/7/2004 9:43 AM
難道微軟的這種Form認證這么脆弱??
?re: ASP.NET Form Authentication安全漏洞及對策 10/7/2004 10:09 AM
Windows 2003下不會出現這種錯誤: ?
?re: ASP.NET Form Authentication安全漏洞及對策 10/7/2004 10:12 AM
我是使用XPSP2的OS及其帶的IE6驗證的。
從What You Should Know About a Reported Vulnerability in Microsoft ASP.NET網頁,Windows 2003 Server也有這個問題。這是ASP.NET的Bug而不是OS的Bug.
?re: ASP.NET Form Authentication安全漏洞及對策 10/7/2004 10:44 AM
可怕的漏洞啊~~~
解決方法可以做個簡單的IHttpModule,把它注冊到GAC和machine.config中.
?re: ASP.NET Form Authentication安全漏洞及對策 10/7/2004 1:21 PM
我按方法試了.怎么沒有這個問題.
嚇的我半死!
?re: ASP.NET Form Authentication安全漏洞及對策 10/7/2004 6:19 PM
樓上的朋友,,我想到了。。
因為我們用的是IE,IE要用這個漏洞,得使用%5C來代替\符號。。。
我們兩個都是在根目錄的第一級子目錄加驗證的,比如你的,得用
顯然這里有一個問題,域名是什么?這里域名被表示成了“www.creva.org.cn%5Ccreva”,而不是實際域名“www.creva.org.cn”。
我想問題應該在這里,展波用的是,虛擬目錄下的子目錄,所以出現了那個漏洞。
你可以用Mozilla的\符號試試。
?re: ASP.NET Form Authentication安全漏洞及對策 10/7/2004 6:25 PM
確實有問題,趕快修正
?re: ASP.NET Form Authentication安全漏洞及對策 10/7/2004 6:38 PM
為什么我測試不出來呢? .net framework 1.1 sp1
?re: ASP.NET Form Authentication安全漏洞及對策 10/7/2004 8:28 PM
我也測試過了,沒有這個問題啊
大家可以測試一下這個網站
?re: ASP.NET Form Authentication安全漏洞及對策 10/7/2004 8:33 PM
我也沒測試出來,用IE6 和 FireFox1.0 都沒試出來.
不過還是改了代碼以防萬一
?re: ASP.NET Form Authentication安全漏洞及對策 10/8/2004 12:10 AM
測試了,沒發現問題!!!!
?re: ASP.NET Form Authentication安全漏洞及對策 10/8/2004 9:09 AM
可以在Global.asax里面加上這么一段解決:
void Application_BeginRequest(object source, EventArgs e) {
if (Request.Path.IndexOf('\\') >= 0 ||
System.IO.Path.GetFullPath(Request.PhysicalPath) != Request.PhysicalPath) {
throw new HttpException(404, "not found");
}
}
這里有MS的解釋:
?re: ASP.NET Form Authentication安全漏洞及對策 10/8/2004 1:14 PM
God ! 噩耗!!!
這種毛病都能出。還有前一陣的那個GDI+的bug,更是讓人匪夷所思。
轉載于:https://www.cnblogs.com/LCX/articles/49936.html
總結
以上是生活随笔為你收集整理的ASP.NET Form Authentication安全漏洞及对策的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 多段实例代码详解7大类Python运算符
- 下一篇: ASP.NET组件设计Step by S