[论文解读] Measuring the Declared SDK Versions and Their Consistency with API Calls in Android Apps
本文提出一种三维分析方法,用于测量24,000款Android应用中的声明SDK版本(DSDK)及其与实际API调用的一致性。研究发现,约1,800个应用因minSdkVersion设置过低,导致在旧版Android系统上崩溃;另有400多个应用因targetSdkVersion过时,仍易受远程代码执行攻击,凸显SDK声明实践中存在的严重兼容性与安全风险。
Android has been the most popular smartphone system, with multiple platform versions (e.g., KITKAT and Lollipop) active in the market. To manage the application's compatibility with one or more platform versions, Android allows apps to declare the supported platform SDK versions in their manifest files. In this paper, we make a first effort to study this modern software mechanism. Our objective is to measure the current practice of the declared SDK versions (which we term as DSDK versions afterwards) in real apps, and the consistency between the DSDK versions and their app API calls. To this end, we perform a three-dimensional analysis. First, we parse Android documents to obtain a mapping between each API and their corresponding platform versions. We then analyze the DSDK-API consistency for over 24K apps, among which we pre-exclude 1.3K apps that provide different app binaries for different Android versions through Google Play analysis. Besides shedding light on the current DSDK practice, our study quantitatively measures the two side effects of inappropriate DSDK versions: (i) around 1.8K apps have API calls that do not exist in some declared SDK versions, which causes runtime crash bugs on those platform versions; (ii) over 400 apps, due to claiming the outdated targeted DSDK versions, are potentially exploitable by remote code execution. These results indicate the importance and difficulty of declaring correct DSDK, and our work can help developers fulfill this goal.
研究动机与目标
- 系统研究真实世界Android应用中声明SDK版本(DSDK)的实践。
- 分析DSDK版本与应用实际调用的API之间的一致性。
- 量化错误DSDK声明在现实世界中的影响,包括运行时崩溃和安全漏洞。
- 为Android开发中不正确SDK版本管理所涉及的挑战与风险提供洞见。
提出的方法
- 本研究在Google Play、Android文档和单个应用二进制文件之间进行三维分析,以提取SDK与API的映射关系。
- 通过解析Android文档,构建每个API与其对应平台API等级之间的完整映射。
- 分析来自Google Play的超过24,000个应用,排除1,300个多APK应用以避免冗余。
- 采用基于阈值的过滤技术,以减少代码中依赖版本的if-else分支带来的噪声。
- 分析中识别出API调用超出声明minSdkVersion的应用,以及targetSdkVersion过时的应用,特别关注addJavascriptInterface()等安全敏感API。
- 研究考虑了控制流分析的局限性作为潜在威胁,但排除了库代码,并应用启发式方法以最小化误报。
实验结果
研究问题
- RQ1在真实Android应用中,minSdkVersion、targetSdkVersion和maxSdkVersion的正确声明有多普遍?
- RQ2有多少应用调用了超出其声明minSdkVersion的API,从而导致运行时崩溃?
- RQ3有多少应用因targetSdkVersion声明过时,而仍易受已知安全漏洞的影响?
- RQ4错误的DSDK声明对应用兼容性和安全性有何影响?
主要发现
- 约17%的分析应用未声明targetSdkVersion,或错误地声明了该值。
- 约1,800个应用的API调用所使用的API等级高于其声明的minSdkVersion,导致在旧版Android系统上运行时崩溃。
- 超过400个应用的targetSdkVersion值过时,使其易受通过addJavascriptInterface() API发起的远程代码执行攻击。
- 在使用addJavascriptInterface()的应用中,有413个因targetSdkVersion < 17而存在漏洞,其中238个根本未定义targetSdkVersion。
- 研究发现,1,750个应用有超过五个API调用超出其minSdkVersion,692个应用有十个以上的此类调用,表明存在广泛不一致。
- 研究结果表明,错误的DSDK声明是Android应用功能不稳定与安全风险的重要来源。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。