ABSTRACT

Contents Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 6.1 General Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 6.2 Security Challenges on Android. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

6.2.1 Android Architecture Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 6.2.1.1 Linux Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 6.2.1.2 Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 6.2.1.3 Android Runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 6.2.1.4 Application Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 6.2.1.5 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

6.2.2 Long Security Fix Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 6.2.3 Problematic Permission Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 6.2.4 Easy Reverse Engineering and Repackaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 6.2.5 Easy User Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.3 Security Challenges on iOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 6.3.1 iOS Platform Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

6.3.1.1 Application Vetting Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 6.3.1.2 Application Sandbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 6.3.1.3 iOS Frameworks and APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

6.3.2 Generic iOS Attack Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 6.3.2.1 Attacks via Dynamically Loaded Frameworks . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 6.3.2.2 Attacks via Private C Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 6.3.2.3 Other Attacks Implemented with the Generic Attack Vector . . . . . . . . . . . 135

6.3.3 Attack Mitigation for the Generic Attack Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 6.3.3.1 Improving Application Vetting Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 6.3.3.2 Enhancement on iOS Sandbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

6.3.4 More Security Challenges on iOS Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

6.4 Systematic Security Comparison Framework for Mobile Platforms . . . . . . . . . . . . . . . . . . . . . . 139 6.4.1 Overview of Android and iOS Security Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 6.4.2 Comparing Application Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

6.4.2.1 Privileges Reserved for Android System Applications . . . . . . . . . . . . . . . . . . . 143 6.4.2.2 Privileges Not Supported on iOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 6.4.2.3 Privileges Supported by Both Android and iOS . . . . . . . . . . . . . . . . . . . . . . . . . 143

6.4.3 Systematic Security Comparison Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 6.4.4 Comparison Results and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

6.4.4.1 Comparisons on SS-API Types in Cross-Platform Apps . . . . . . . . . . . . . . . . 145 6.4.4.2 SS-API Usage of Third-Party Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 6.4.4.3 SS-API Differences Inside Application Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

6.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

Abstract Android and iOS, as the top twomobile operating systems in terms of user base, both have their own security weaknesses. In this chapter, by analyzing the security architectures of Android and iOS, distinct security challenges on both platforms will be revealed and discussed. Furthermore, a systematic comparison framework is presented that is used to compare the security and privacy protection on Android and iOS. With detailed proof-of-concept attacking code and malicious application examples, it is shown that security mechanisms utilized on Android and iOS are still far from perfect and should be further improved to mitigate existing vulnerabilities.