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

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

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

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

            Unsafe Reflection

            ABSTRACT

            攻擊者可以控制 performSelector 方法所使用的參數,通過此種方式創建一個意想不到且貫穿于整個應用程序的控制流路徑,從而逃避潛在的安全檢查。

            EXPLANATION

            若攻擊者可以為應用程序提供確定實例化哪個類或調用哪個方法的參數值,那么就有可能創建一個貫穿于整個應用程序的控制流路徑,而該路徑并非是應用程序開發者最初設計的。這種攻擊途徑可能使攻擊者避開 authentication 或 access control 檢測,或使應用程序以一種意想不到的方式運行。


            例 1:應用程序使用選擇器 API 的一個共同理由是實現自己的命令發送器。下面的例子顯示了一個 Objective-C 命令發送器,它使用反射來執行任意方法,該方法由讀取自自定義 URL 方案請求中的數值進行驗證。攻擊者可以利用這種實現方法調用與 UIApplicationDelegate 類中定義的方法簽名匹配的任何函數。


            ...
            - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
            sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {

            NSString *query = [url query];
            NSString *pathExt = [url pathExtension];
            [self performSelector:NSSelectorFromString(pathExt) withObject:query];
            ...

            REFERENCES

            [1] Standards Mapping - OWASP Top 10 2004 - (OWASP 2004) A1 Unvalidated Input

            [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 - Security Technical Implementation Guide Version 3 - (STIG 3) APP3510 CAT I, APP3570 CAT I

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

            [6] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 470

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

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

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

            [10] Standards Mapping - FIPS200 - (FISMA) SI


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

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

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

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

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

                      亚洲欧美在线