<span id="7ztzv"></span>
<sub id="7ztzv"></sub>

<span id="7ztzv"></span><form id="7ztzv"></form>

<span id="7ztzv"></span>

        <address id="7ztzv"></address>

            Access Control: LDAP

            ABSTRACT

            如果沒有適當的 access control,就會執行一個包含用戶控制值的 LDAP 聲明,從而允許攻擊者訪問未經授權的目錄條目。

            EXPLANATION

            Database access control 錯誤在以下情況下發生:

            1. 數據從一個不可信賴的數據源進入程序。

            2. 數據用于在 LDAP 查詢中指定一個數據值。

            例 1:當前已驗證用戶的雇員 ID 會隨著各個請求一起,通過客戶端界面自動提交。以下代碼在使用雇員 ID 構建 LDAP 查詢之前,將檢查該雇員 ID 是否為整數。該驗證避免了 LDAP injection 漏洞,但仍可能留下代碼漏洞。


            ...
            env.put(Context.SECURITY_AUTHENTICATION, "none");
            DirContext ctx = new InitialDirContext(env);

            String empID = request.getParameter("empID");

            try
            {
            int id = Integer.parseInt(empID);

            BasicAttribute attr = new BasicAttribute("empID", empID);

            NamingEnumeration employee =
            ctx.search("ou=People,dc=example,dc=com",attr);
            ...



            問題在于開發人員未能考慮到若攻擊者提供可供選擇的 empID 值,會發生什么情況。盡管該界面會自動提交當前用戶的雇員 ID,但是攻擊者也可能在惡意請求中提交其他值替換當前的 ID。因為本例子中的代碼是在匿名綁定情況下執行查詢,不管當前已驗證用戶的身份如何,它都會將有效的雇員 ID 返回至目錄入口。

            REFERENCES

            [1] Standards Mapping - OWASP Top 10 2004 - (OWASP 2004) A2 Broken Access Control

            [2] Standards Mapping - OWASP Top 10 2007 - (OWASP 2007) A4 Insecure Direct Object Reference

            [3] Standards Mapping - OWASP Top 10 2010 - (OWASP 2010) A4 Insecure Direct Object References

            [4] Standards Mapping - FIPS200 - (FISMA) AC

            [5] Standards Mapping - Security Technical Implementation Guide Version 3 - (STIG 3) APP3510 CAT I

            [6] Standards Mapping - Security Technical Implementation Guide Version 3.4 - (STIG 3.4) APP3510 CAT I

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

            [8] Standards Mapping - Web Application Security Consortium 24 + 2 - (WASC 24 + 2) Insufficient Authorization

            [9] Standards Mapping - SANS Top 25 2011 - (SANS Top 25 2011) Porous Defenses - CWE ID 863

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

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

            [12] Standards Mapping - Payment Card Industry Data Security Standard Version 2.0 - (PCI 2.0) Requirement 6.5.8


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

            <span id="7ztzv"></span>
            <sub id="7ztzv"></sub>

            <span id="7ztzv"></span><form id="7ztzv"></form>

            <span id="7ztzv"></span>

                  <address id="7ztzv"></address>

                      亚洲欧美在线