2013-04-11 270 views
1

我想獲得一個網站pci兼容。aspxerrorpath = /在URL導致自定義錯誤頁面不能正常工作

如果你訪問(虛擬IP): HTTP:someipaddress/ZNYTMHXO.ashx

然後用戶正確地看到從頁面我在網絡配置都表示在html:

然而如果您在查詢字符串中使用相同的url,但使用了?aspxerrorpath = /: http:someipaddress/ZNYTMHXO.ashx?aspxerrorpath =/

然後頁面在'/'應用程序中顯示服務器錯誤。運行時錯誤。

這是失敗的pci掃描。

爲什麼這個變量會引起問題?

對不起,我應該說ZNYTMHXO.ashx不存在。當asperrorpath不在查詢字符串中時,404重定向工作。

----- UPDATE ----- 只是爲了幫助,這是顯示頁面的html,非常有限。

<!DOCTYPE html> 
<html> 
    <head> 
     <title>Runtime Error</title> 
     <meta name="viewport" content="width=device-width" /> 
     <style> 
     body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
     p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} 
     b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} 
     H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } 
     H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } 
     pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt} 
     .marker {font-weight: bold; color: black;text-decoration: none;} 
     .version {color: gray;} 
     .error {margin-bottom: 10px;} 
     .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } 
     @media screen and (max-width: 639px) { 
      pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; } 
     } 
     @media screen and (max-width: 479px) { 
      pre { width: 280px; } 
     } 
     </style> 
    </head> 

    <body bgcolor="white"> 

      <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1> 

      <h2> <i>Runtime Error</i> </h2></span> 

      <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> 

      <b> Description: </b>An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated. 
      <br><br> 

    </body> 
</html> 
+1

應該有'/'Application'消息中的服務器錯誤 - 可能是'Description'和/或'Compiler Error Message'或'Source Error'? – 2013-04-11 21:55:06

+0

剛剛添加了html到上面... – Simon 2013-04-11 22:04:48

+0

理解錯誤頁面輸出的關鍵在於'Description'中。它說:「處理您的請求時發生異常。**此外,執行第一個異常的自定義錯誤頁面時發生另一個異常。**請求已終止。」這是當你的錯誤處理在處理另一個錯誤時本身發生錯誤時發生的不太有趣的情況。不過,請檢查我發佈的答案 - 我認爲這是您需要更正以通過PCI合規性測試的地方。 – 2013-04-11 22:11:13

回答

1

ScottGuthrie http://weblogs.asp.net/scottgu/archive/2010/09/24/update-on-asp-net-vulnerability.aspx的以下博文應該會對您有所幫助。

他介紹瞭如何使用IIS URL掃描模塊:

不允許有一個「aspxerrorpath =」從做他們的ASP.NET應用程序的方式查詢字符串屬性 的URL,而會導致 的web-server返回一個HTTP錯誤。添加此規則可防止 攻擊者區分服務器上發生的不同類型的錯誤 - 這有助於利用此漏洞阻止攻擊。

他在寫關於報告要修補的漏洞。但是有些人報告說,這種情況在.NET 4.0(此處提及:Why does the ASP.NET error page return 404 as soon as the aspxerrorpath querystring is present?

之後仍然存在問題。您的PCI掃描可能試圖利用此相同的漏洞。消除漏洞,你應該通過。

希望有所幫助。

相關問題