WebView 应用程序在移动应用中被广泛用于直接在应用内显示 Web 内容,通过消除打开外部浏览器的需求来增强用户参与度,并提供无缝体验。渐进式 Web 应用程序(Progressive Web Applications, PWAs)通过结合 Web 应用的可访问性与原生应用的速度、离线能力和响应性,进一步提升了可用性。然而,恶意开发者可以利用该技术,通过复制 PWA Web 链接来创建伪造的原生应用,通过用户导流进行变现。这种不道德的做法对用户和原始应用开发者构成了重大风险,凸显了采取稳健安全措施以防止未经授权复制的必要性。考虑到 Trusted Web Activity(一种将 Web 内容集成到 Android 应用程序中的方法)和 PWA 的单向通信,我们提出了一种基于查询参数的实用安全解决方案,以防御或缓解此类攻击。我们分析了所提出安全解决方案的漏洞以评估其有效性,并引入了高级措施来解决任何已识别的弱点,从而提出一个全面的防御框架。作为我们工作的一部分,我们开发了一个原型 Web 应用程序,通过将 Unix 时间戳和设备标识符的组合嵌入查询参数中,来保护 PWA 免受复制。我们通过模拟高级攻击场景来评估此防御策略的有效性。此外,我们还创建了一个反映移动应用用户行为的真实数据集,该数据集使用 Zipfian 分布进行建模,以验证我们的框架。
英文摘要:
WebView applications are widely used in mobile applications to display web content directly within the app, enhancing user engagement by eliminating the need to open an external browser and providing a seamless experience. Progressive Web Applications (PWAs) further improve usability by combining the accessibility of web apps with the speed, offline capabilities, and responsiveness of native applications. However, malicious developers can exploit this technology by duplicating PWA web links to create counterfeit native apps, monetizing through user diversion. This unethical practice poses significant risks to users and the original application developers, underscoring the need for robust security measures to prevent unauthorized replication. Considering the one-way communication of Trusted Web Activity (a method for integrating web content into Android applications) and PWAs, we propose a query parameter-based practical security solution to defend against or mitigate such attacks. We analyze the vulnerabilities of our proposed security solution to assess its effectiveness and introduce advanced measures to address any identified weaknesses, presenting a comprehensive defense framework. As part of our work, we developed a prototype web application that secures PWAs from replication by embedding a combination of Unix timestamps and device identifiers into the query parameters. We evaluate the effectiveness of this defense strategy by simulating an advanced attack scenario. Additionally, we created a realistic dataset reflecting mobile app user behavior, modeled using a Zipfian distribution, to validate our framework.