[论文解读] Uncovering and Exploiting Hidden APIs in Mobile Super Apps
本文提出 APIScope,一种结合静态分析与动态分析的工具,可发现微信、抖音等移动超级应用中未记录的特权API。该工具通过逆向分析二进制文件中的不变量来识别隐藏API,并在受控运行时环境中执行以验证其可利用性,结果表明,所有五个测试的超级应用均包含未经检查的隐藏API,可被用于实施任意URL加载和恶意软件安装等严重攻击。
Mobile applications, particularly those from social media platforms such as WeChat and TikTok, are evolving into "super apps" that offer a wide range of services such as instant messaging and media sharing, e-commerce, e-learning, and e-government. These super apps often provide APIs for developers to create "miniapps" that run within the super app. These APIs should have been thoroughly scrutinized for security. Unfortunately, we find that many of them are undocumented and unsecured, potentially allowing miniapps to bypass restrictions and gain higher privileged access. To systematically identify these hidden APIs before they are exploited by attackers, we developed a tool APIScope with both static analysis and dynamic analysis, where static analysis is used to recognize hidden undocumented APIs, and dynamic analysis is used to confirm whether the identified APIs can be invoked by an unprivileged 3rdparty miniapps. We have applied APIScope to five popular super apps (i.e., WeChat, WeCom, Baidu, QQ, and Tiktok) and found that all of them contain hidden APIs, many of which can be exploited due to missing security checks. We have also quantified the hidden APIs that may have security implications by verifying if they have access to resources protected by Android permissions. Furthermore, we demonstrate the potential security hazards by presenting various attack scenarios, including unauthorized access to any web pages, downloading and installing malicious software, and stealing sensitive information. We have reported our findings to the relevant vendors, some of whom have patched the vulnerabilities and rewarded us with bug bounties.
研究动机与目标
- 系统性地识别移动超级应用中未记录且未受保护的特权API,这些API可能被第三方小程序利用。
- 解决在复杂、多层架构的超级应用中,通过人工分析检测隐藏API时存在的可扩展性与完整性局限。
- 开发一种工具,能够区分仅限于第一方应用使用的API与可被第三方小程序访问的API。
- 通过验证隐藏API对Android受保护资源和权限的访问能力,量化其带来的安全风险。
- 负责任地披露研究发现,并通过演示真实世界攻击场景,推动厂商修补漏洞,提升平台安全性。
提出的方法
- 对超级应用二进制文件应用静态分析,利用从公开文档API中提取的函数与接口不变量,检测未记录的隐藏API。
- 基于超级应用的类名和公开方法模式构建稳健的API签名,以提高在混合语言代码库(如Java、C++、JavaScript)中的检测准确率。
- 通过在受控运行时环境中执行已识别的API,进行动态分析,以确认其存在性与调用可行性。
- 根据未授权的第三方小程序是否可调用,将检测到的API分类为“已检查”或“未检查”。
- 生成自动化测试用例,在动态执行过程中触发并验证API行为。
- 将发现的API与Android权限边界相关联,评估其在权限提升和敏感数据访问方面的潜在风险。
实验结果
研究问题
- RQ1在流行的移动超级应用中,存在哪些隐藏的未记录API?它们与已记录的公共API有何不同?
- RQ2由于缺少访问控制,这些隐藏API在多大程度上对第三方小程序暴露?
- RQ3哪些隐藏API可被利用以执行高权限操作,如任意网页导航或APK安装?
- RQ4在微信、抖音、百度等不同超级应用平台中,隐藏API的安全属性有何差异?
- RQ5是否能够通过系统化、自动化的手段,以高精度检测并分类隐藏API,同时验证其可利用性?
主要发现
- 在测试的五个超级应用——微信、企业微信、百度、QQ和抖音中,全部存在隐藏且未记录的API,其中部分应用的隐藏API数量甚至超过已记录的API。
- 在微信的支付API类别中,发现了28个隐藏API,远超仅有的一个已记录API。
- 动态分析证实,许多隐藏API可被未授权的第三方小程序调用,表明缺乏适当的访问控制机制。
- 本研究演示了多种真实世界攻击场景,包括未经授权访问任意网页、下载并安装恶意APK,以及窃取敏感用户数据。
- 漏洞已负责任地披露给相关厂商;腾讯修复了四个漏洞(1个低危,2个中危,1个高危),并授予漏洞赏金;抖音也发布了补丁。
- 研究结果表明,超级应用中特权隐藏API因权限过高且缺乏安全检查,构成严重的安全风险。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。