Vetting security impacts introduced by third-party libraries in iOS apps requires a reliable library detection technique. Especially when a new vulnerability (or a privacy-invasive behavior) was discovered in a third-party library, there is a practical need to precisely identify the existence of libraries and their versions for iOS apps. However, few studies have been proposed to tackle this problem, and they all suffer from the code duplication problem in different libraries. In this paper, we focus on third-party library detection in iOS apps. Given an app, we aim to identify the integrated libraries and pinpoint their versions (or the version range).To this end, we first conduct an in-depth study on iOS third-party libraries to demystify the code duplication challenge. By doing so, we have two key observations: 1) even though two libraries can share classes, the shared classes cannot be integrated into an app simultaneously without causing a class name conflict; and 2) code duplication between multiple versions of two libraries can vary. Based on these findings, we propose a novel profile-based similarity comparison approach to perform the detection. Specifically, we build a library database consists of original library binaries with distinct versions. After extracting profiles for each library version and the target app, we conduct a similarity comparison to find the best matches. We implemented this approach in iLibScope. We built a benchmark consists of 5,807 apps with 10,495 library integrations and applied our tool to it. Our evaluation shows that iLibScope achieves a recall exceeds 99% and a precision exceeds 97% for library detection. We also applied iLibScope to detect the presence of well-known vulnerable third-party libraries in real-world iOS mobile apps to show the promising usage of our tool. It successfully identified 405 vulnerable library usage from 4,249 apps.
翻译:iOS 应用程序中第三方图书馆引入的安全冲击正在消除。 iOS 应用程序中第三方图书馆引入的安全影响需要可靠的图书馆检测技术。 特别是当第三方图书馆发现新的弱点( 隐私侵犯行为 ) 时, 实际需要精确地识别图书馆及其版本的存在和iOS 应用程序。 然而, 很少有研究建议解决这个问题, 并且它们都受到不同图书馆的代码重复问题的影响。 在本文中, 我们侧重于iOS 应用程序中第三方图书馆的检测。 根据一个应用程序, 我们的目标是识别综合图书馆, 并定位其版本( 或版本范围 ) 。 为此, 我们首先对iOS 第三方图书馆进行深入的研究, 以解析代码重复挑战。 我们这样做, 有两个关键观察:1 尽管两个图书馆可以共享课程, 共享课程无法同时纳入应用程序, 而不会引起阶级名称冲突; 2) 两个图书馆的多个版本的代码重复可以不同。 基于这些发现, 我们提出基于新版本的配置的相似性比较方法来进行检测。 具体地说, 我们应用了一个图书馆数据库数据库数据库数据库数据库, 也显示原始的ib binal binal 版本。