[论文解读] DPerm: Assisting the Migration of Android Apps to Runtime Permissions
本文提出DPSpec,一种基于官方SDK文档和源码分析的全面且精确的Android权限规范,以及DPerm,一种上下文敏感的静态分析工具,可推荐准确的运行时权限请求位置。DPerm在识别权限请求插入点方面实现了96%的精确率和89%的召回率,显著提升了Android应用迁移到运行时权限模型的支持效果。
Android apps require permissions when accessing resources related to privacy or system integrity. Starting from Android 6, these permissions have to be asked at runtime. However, migrating to the new permission model poses multiple challenges for developers. First, developers have to discover where the app uses permissions, which requires a permission specification. To date several such specifications have been built, yet these are either imprecise, incomplete or don't support all types of protected resources. We first present DPSpec, a novel permission specification built from several documentation formats supplied with the Android SDK. Compared with the state the art specification, it contains 2.5x as many entries for protected methods and detects dangerous permission usages in more than twice as many apps. A second challenge for developers is where to insert permission requests, with possible locations restricted by the request mechanism. We also present DPerm, a static analysis for Android apps that recommends locations for permission requests in code. It achieves high precision through context sensitivity and improves recall through a general call graph augmentation algorithm for incomplete code. Our empirical evaluation on 32 apps shows a precision of 96% and recall of 89%.
研究动机与目标
- 解决Android缺乏完整、精确且及时更新的权限规范的问题,特别是针对受保护字段和方法。
- 克服在复杂调用图中识别运行时权限请求正确插入点的挑战,尤其是在无法获取SDK源码的情况下。
- 通过实现自动化、高精度的Android应用向Android 6+运行时权限模型的迁移,提升开发人员生产力和安全性。
- 为未来支持长期维护运行时权限处理的工具提供基础。
提出的方法
- 通过整合来自多种Android SDK文档格式(包括Java注解、XML注解和Javadoc注释)的权限信息,构建DPSpec,并通过人工验证和对模糊之处的保守解释进行校准。
- 通过分析F-Droid上22个开源应用的静态分析结果,推断出映射关系,将受保护字段纳入DPSpec,以提升其完整性。
- 设计DPerm为一种上下文敏感的静态分析工具,通过从权限检查点执行反向可达性分析,识别有效的请求插入位置。
- 利用通用的调用图增强算法,基于启发式方法和API行为添加安全边,以补偿SDK源码访问不完整的问题,提升调用图的召回率。
- 将DPerm与Android Studio风格的检查功能集成,推荐权限请求位置,同时保持跨过程分析的正确性。
- 在32个真实世界的Android应用上评估DPerm,通过DPSpec作为权限映射的基准,测量其精确率和召回率。
实验结果
研究问题
- RQ1与现有自动化方法相比,基于官方Android SDK文档推导出的权限规范在完整性和精确性方面如何?
- RQ2在缺乏SDK源码的情况下,上下文敏感的静态分析与调用图增强技术能在多大程度上提升权限请求位置推荐的召回率?
- RQ3与现有工具(如Android Studio内置检查)相比,所提出的DPerm工具在识别正确运行时权限请求位置方面的精确率和召回率表现如何?
- RQ4像DPSpec这样的规范能否作为评估和改进未来权限规范挖掘工具的可靠基准?
- RQ5不完整或不精确的权限规范在现实世界中对Android应用迁移到运行时权限模型会产生何种影响?
主要发现
- DPSpec包含120个受保护方法的映射——是当前最先进工具Axplorer规范的2.5倍,且在超过两倍数量的应用中检测到危险权限的使用。
- DPSpec是首个包含受保护字段的权限规范,显著提升了对现有工具的覆盖范围。
- DPerm在32个真实世界的Android应用中,推荐运行时权限请求位置的精确率达到96%,召回率达到89%。
- DPerm中的调用图增强算法通过添加安全边,有效提升了召回率,补偿了SDK源码访问不完整的问题。
- 评估结果表明,即使SDK源码访问有限,DPerm仍能以高精度识别正确的请求位置,优于现有工具(如Android Studio的检查功能)。
- 作者已成功将DPSpec交付给Google工程师,表明其具有现实世界的应用潜力,并具备未来集成到Android工具链和文档中的前景。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。