arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2510.04078cs.SE
收藏

Bamboo:大语言模型驱动的Android框架中API-权限映射发现

Bamboo: LLM-Driven Discovery of API-Permission Mappings in the Android Framework

Monash University(莫纳什大学);Singapore Management University(新加坡管理大学)

Han Hu, Wei Minn, Yonghui Liu, Jiakun Liu, Ferdian Thung, Terry Yue Zhuo, Lwin Khin Shar, Debin Gao, David Lo

AI总结:

针对Android官方API权限文档不完善、现有映射发现方法适应性差等问题,本文提出基于大语言模型、结合双角色提示与API驱动代码生成的Bamboo工具,能高效发现API-权限映射,性能远超现有基线。

摘要:

Android框架中的权限机制通过管理用户及进程对敏感资源和操作的访问,是保障用户隐私不可或缺的组成部分。因此,开发者需要深入理解API权限才能构建健壮的Android应用。遗憾的是,Android官方API文档长期存在不精确和不完整的问题,导致开发者需要花费大量精力才能准确识别所需权限,这可能引发Android应用开发中权限声明错误,进而导致安全违规和应用故障。\n近期改进权限规范的工作主要利用静态和动态代码分析来挖掘Android框架内的API-权限映射,但这些方法存在显著缺陷,包括对Android SDK和框架更新的适应性差、代码覆盖范围有限,且容易在复杂代码库中遗漏关键的API-权限映射。\n本文提出了一种利用大语言模型(LLM)系统梳理API-权限映射的开创性方法。除了使用LLM,我们还在映射发现流程中集成了双角色提示策略和API驱动的代码生成方法,据此开发了相应工具Bamboo。我们设定了三个研究问题,分别用于评估Bamboo相较于现有最优基线的性能、验证官方SDK文档的完整性,以及分析需权限的API在不同SDK版本中的演变情况。实验结果显示,Bamboo在Android 6、7、10版本中分别识别出2234、3552和4576条API-权限映射,大幅优于现有基线方法。

英文摘要:

The permission mechanism in the Android Framework is integral to safeguarding the privacy of users by managing users' and processes' access to sensitive resources and operations. As such, developers need to be equipped with an in-depth understanding of API permissions to build robust Android apps. Unfortunately, the official API documentation by Android chronically suffers from imprecision and incompleteness, causing developers to spend significant effort to accurately discern necessary permissions. This potentially leads to incorrect permission declarations in Android app development, potentially resulting in security violations and app failures. Recent efforts in improving permission specification primarily leverage static and dynamic code analyses to uncover API-permission mappings within the Android framework. Yet, these methodologies encounter substantial shortcomings, including poor adaptability to Android SDK and Framework updates, restricted code coverage, and a propensity to overlook essential API-permission mappings in intricate codebases. This paper introduces a pioneering approach utilizing large language models (LLMs) for a systematic examination of API-permission mappings. In addition to employing LLMs, we integrate a dual-role prompting strategy and an API-driven code generation approach into our mapping discovery pipeline, resulting in the development of the corresponding tool, \tool{}. We formulate three research questions to evaluate the efficacy of \tool{} against state-of-the-art baselines, assess the completeness of official SDK documentation, and analyze the evolution of permission-required APIs across different SDK releases. Our experimental results reveal that \tool{} identifies 2,234, 3,552, and 4,576 API-permission mappings in Android versions 6, 7, and 10 respectively, substantially outprforming existing baselines.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑