揭秘基于WebView的移动应用内生态系统中的Cookie共享风险
Demystifying Cookie Sharing Risks in WebView-based Mobile App-in-app Ecosystems
AI总结:
本文发现了小程序生态中因共享WebView导致的跨小程序Cookie共享(CMCS)漏洞,开发静态分析工具MiCoScan检测到大量受影响小程序,凸显了完善隔离机制的紧迫性。
摘要:
小程序是超级应用中新兴的移动应用范式,提供了无缝且免安装的使用体验。然而,WebView组件的采用破坏了其隔离机制,暴露出新的攻击面和漏洞。本文提出了一种名为跨小程序Cookie共享(CMCS)的新型漏洞,该漏洞源于不同小程序共享WebView环境。该漏洞允许一个小程序在同一WebView上下文中访问另一个小程序设置的Cookie,从而实现跨小程序的未授权数据交换,违反了隔离原则。\n作为初步研究,我们分析了微信、支付宝、抖音、百度四大主流平台的WebView机制,发现它们均受CMCS漏洞影响。此外,我们演示了由CMCS漏洞引发的共谋攻击:特权小程序可通过非特权小程序能访问的Cookie窃取用户敏感数据。\n为衡量现实中CMCS漏洞引发的共谋攻击的影响,我们开发了静态分析工具MiCoScan,用于检测受CMCS漏洞影响的小程序。MiCoScan采用WebView上下文建模来识别共享同一WebView域名的小程序集群,并通过跨WebView数据流分析检测进出WebView的敏感数据传输。我们使用MiCoScan对351483个小程序进行了大规模分析,识别出45448个共享WebView域名的集群、7965个特权数据传输实例,以及9877个易受共谋攻击的小程序。研究结果表明,CMCS漏洞普遍存在且带来重大安全风险,凸显了改进小程序生态系统隔离机制的紧迫性。
英文摘要:
Mini-programs, an emerging mobile application paradigm within super-apps, offer a seamless and installation-free experience. However, the adoption of the web-view component has disrupted their isolation mechanisms, exposing new attack surfaces and vulnerabilities. In this paper, we introduce a novel vulnerability called Cross Mini-program Cookie Sharing (CMCS), which arises from the shared web-view environment across mini-programs. This vulnerability allows unauthorized data exchange across mini-programs by enabling one mini-program to access cookies set by another within the same web-view context, violating isolation principles. As a preliminary step, we analyzed the web-view mechanisms of four major platforms, including WeChat, AliPay, TikTok, and Baidu, and found that all of them are affected by CMCS vulnerabilities. Furthermore, we demonstrate the collusion attack enabled by CMCS, where privileged mini-programs exfiltrate sensitive user data via cookies accessible to unprivileged mini-programs. To measure the impact of collusion attacks enabled by CMCS vulnerabilities in the wild, we developed MiCoScan, a static analysis tool that detects mini-programs affected by CMCS vulnerabilities. MiCoScan employs web-view context modeling to identify clusters of mini-programs sharing the same web-view domain and cross-webview data flow analysis to detect sensitive data transmissions to/from web-views. Using MiCoScan, we conducted a large-scale analysis of 351,483 mini-programs, identifying 45,448 clusters sharing web-view domains, 7,965 instances of privileged data transmission, and 9,877 mini-programs vulnerable to collusion attacks. Our findings highlight the widespread prevalence and significant security risks posed by CMCS vulnerabilities, underscoring the urgent need for improved isolation mechanisms in mini-program ecosystems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。