<dd id="sga4y"><optgroup id="sga4y"></optgroup></dd>
<nav id="sga4y"><code id="sga4y"></code></nav>
  • <optgroup id="sga4y"></optgroup>

    J2EE Misconfiguration: Direct JSP Access

    ABSTRACT

    直接訪問 Java Server Pages 可能導致 System Information Leak、暴露源代碼,甚至執行任意代碼。

    EXPLANATION

    在使用 Web 框架(例如,使用 action 或 servlet 將請求轉發給 JSP 的 Struts 和 Spring 框架)構建的應用程序中直接訪問 Java Server Pages (JSP),可能導致出現未處理的異常和系統信息泄露。使用經特殊技術處理的請求(例如 http://host/page.jsp%00http://host/page.js%2570),會導致執行不力或配置不佳的應用程序服務器泄露源代碼詳細信息。更糟的是,如果應用程序允許用戶上傳任意文件,攻擊者可能利用此機制通過 JSP 的形式上傳惡意代碼并要求上傳的頁面在服務器上執行惡意代碼。



    例 1:以下示例顯示了構造不佳的安全限制,其中明確允許使用帶有“*”的角色名稱來直接訪問 JSP,這表明所有用戶均可以訪問相應的 Web 資源。


    <security-constraint>
    <web-resource-collection>
    <web-resource-name>JSP Access for Everyone!</web-resource-name>
    <description>Allow any user/role access to JSP</description>
    <url-pattern>*.jsp</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>*</role-name>
    </auth-constraint>
    </security-constraint>

    REFERENCES

    [1] Standards Mapping - OWASP Top 10 2004 - (OWASP 2004) A10 Insecure Configuration Management

    [2] Standards Mapping - OWASP Top 10 2007 - (OWASP 2007) A6 Information Leakage and Improper Error Handling

    [3] Standards Mapping - OWASP Top 10 2010 - (OWASP 2010) A6 Security Misconfiguration

    [4] Standards Mapping - Security Technical Implementation Guide Version 3 - (STIG 3) APP3620 CAT II

    [5] Standards Mapping - Security Technical Implementation Guide Version 3.4 - (STIG 3.4) APP3620 CAT II

    [6] Standards Mapping - FIPS200 - (FISMA) CM

    [7] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 497

    [8] Jordan Dimov JSP Security

    [9] Standards Mapping - Payment Card Industry Data Security Standard Version 2.0 - (PCI 2.0) Requirement 6.5.1, Requirement 6.5.5

    [10] Standards Mapping - Payment Card Industry Data Security Standard Version 1.1 - (PCI 1.1) Requirement 6.5.10

    [11] Standards Mapping - Payment Card Industry Data Security Standard Version 1.2 - (PCI 1.2) Requirement 6.5.6


    Copyright 2013 Fortify Software - All rights reserved.
    (Generated from version 2013.1.1.0008 of the Fortify Secure Coding Rulepacks)
    desc.config.java.j2ee_misconfiguration_direct_jsp_access

    97av