<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: Database

            ABSTRACT

            如果沒有適當的 access control,就會執行一個包含用戶控制主鍵的 SQL 指令,從而允許攻擊者訪問未經授權的記錄。

            EXPLANATION

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

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


            2. 這個數據用來指定 SQL 查詢中主鍵的值。

            例 1:以下代碼使用依賴于整數的語句構建和執行 SQL 查詢,因此不易受到 SQL injection 漏洞攻擊。該 SQL 查詢指令可以搜索與指定標識符 [1] 相匹配的清單。您可以從與當前被授權用戶有關的所有清單中選擇這些標識符。


            DATA:id TYPE i.
            ...
            id = request->get_form_field( 'invoiceID' ).

            CONCATENATE `INVOICEID = '` id `'` INTO cl_where.
            SELECT *
            FROM invoices
            INTO CORRESPONDING FIELDS OF TABLE itab_invoices
            WHERE (cl_where).
            ENDSELECT.
            ...


            問題在于開發者沒有考慮到所有可能出現的 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 566

            [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

            [13] S. J. Friedl SQL Injection Attacks by Example


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

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

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

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

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

                      亚洲欧美在线