ASP .NET 應用程序必須啟用自定義錯誤頁面,以避免攻擊者通過框架的內置錯誤響應來挖掘信息。
ASP .NET 應用程序應當配置為使用自定義的錯誤頁面,而不是框架默認的頁面。默認錯誤頁面針對出現的錯誤提供了非常詳細的信息,因此不應當用在生產環境中。<customErrors> 標簽的 mode 屬性定義了應用程序是使用自定義的錯誤頁面還是默認的錯誤頁面。
攻擊者能夠利用默認錯誤頁面提供的更多信息來發動針對應用程序所用的框架、數據庫或其他資源的攻擊。
[1] Standards Mapping - OWASP Top 10 2007 - (OWASP 2007) A6 Information Leakage and Improper Error Handling
[2] Standards Mapping - OWASP Top 10 2010 - (OWASP 2010) A6 Security Misconfiguration
[3] Standards Mapping - OWASP Top 10 2004 - (OWASP 2004) A7 Improper Error Handling
[4] Standards Mapping - Security Technical Implementation Guide Version 3 - (STIG 3) APP3120 CAT II
[5] Standards Mapping - Security Technical Implementation Guide Version 3.4 - (STIG 3.4) APP3120 CAT II
[6] ASP.Net Settings Schema:
[7] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 12
[8] Standards Mapping - Web Application Security Consortium 24 + 2 - (WASC 24 + 2) Information Leakage
[9] Standards Mapping - Payment Card Industry Data Security Standard Version 1.2 - (PCI 1.2) Requirement 6.3.1.2, Requirement 6.5.6
[10] Standards Mapping - Payment Card Industry Data Security Standard Version 2.0 - (PCI 2.0) Requirement 6.5.5
[11] Standards Mapping - Payment Card Industry Data Security Standard Version 1.1 - (PCI 1.1) Requirement 6.5.7