面向Android第三方库检测的上下文感知功能建模
Context-Aware Functional Modeling for Android Third-Party Library Detection
浏览论文内容
中文总结 AI 辅助
本文提出LibFan,一种基于上下文感知功能建模的Android第三方库检测方法,通过方法级对比学习和库级功能划分,在R8完整模式下F1分数显著优于现有方法。
中文摘要 AI 辅助
第三方库(TPLs)在Android应用中被广泛使用,但其复用可能引入安全风险并干扰下游程序分析。现有的Android TPL检测方法面临两个关键限制:其手工设计的特征在激进代码变换下脆弱,且其整库匹配策略在应用仅保留TPL部分代码时无效。在本文中,我们提出LibFan,一种基于上下文感知功能建模的、基于学习的Android TPL检测方法。它通过两个互补组件实现这种建模:方法级上下文感知对比学习和库级功能划分。在方法级,它通过对比训练学习语义表示,同时纳入出站调用关系和类级上下文,提高了对混淆、精简和优化的鲁棒性。在库级,它将每个TPL划分为功能连贯的单元,并使用最佳匹配单元来确定库的存在性,从而适应部分库复用。为评估LibFan,我们构建了一个包含200个应用和46个易受攻击TPL的新基准,每个应用在四种变换配置下编译。在最具挑战性的R8完整模式下,LibFan在库级达到81.3%的F1分数,在版本级达到47.6%的F1分数,分别比现有最优方法相对提高了64.9%和35.6%。
英文摘要
Third-party libraries (TPLs) are widely used in Android apps, but their reuse can introduce security risks and interfere with downstream program analyses. Existing Android TPL detection approaches face two key limitations: their hand-crafted features are fragile under aggressive code transformations, and their whole-library matching strategies are ineffective when apps retain only part of a TPL. In this paper, we propose LibFan, a learning-based Android TPL detection approach based on context-aware functional modeling. It realizes this modeling through two complementary components: context-aware contrastive learning at the method level and functional partitioning at the library level. At the method level, it learns semantic representations through contrastive training while incorporating outgoing call relationships and class-level context, improving robustness to obfuscation, shrinking, and optimization. At the library level, it partitions each TPL into functionally coherent units and determines library presence using the best-matching partition, thereby accommodating partial library reuse. To evaluate LibFan, we construct a new benchmark comprising 200 apps and 46 vulnerable TPLs, with each app compiled under four transformation configurations. Under the most challenging R8 full mode, LibFan achieves F1 scores of 81.3% at the library level and 47.6% at the version level, representing relative improvements of 64.9% and 35.6% over the state of the art, respectively.
发表机构
- Beihang University(北京航空航天大学)
- Nanyang Technological University(南洋理工大学)
机构由 AI 辅助整理,请以论文原文为准。