arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.15416cs.CR
收藏

Web浏览器中持久存储机制的最小权限访问

Least Privilege Access for Persistent Storage Mechanisms in Web Browsers

Gayatri Priyadarsini Kancherla, Dishank Goel, Abhishek Bichhawat

AI总结:

本文针对浏览器持久存储中第三方脚本权限过大的问题,提出基于标签的最小权限访问机制,并在Firefox上实现,能有效阻止未授权域的脚本访问cookie、localStorage和IndexedDB。

摘要:

Web应用程序通常包含第三方内容和脚本,以个性化用户的在线体验。这些脚本对存储在浏览器持久存储(如cookie、localStorage和IndexedDB)中、与宿主页面相关联的用户私有数据拥有不受限制的访问权限。目前已实现了多种机制来限制对这些存储对象的访问,例如内容安全策略、cookie的HttpOnly属性等。然而,现有机制提供的是全有或全无的访问控制,在Web应用程序需要允许第三方脚本对cookie和localStorage对象进行受控访问的场景中并不适用。如果其中一些脚本行为恶意,它们可以轻易访问并修改存储在浏览器对象中的私有用户信息。我们工作的目标是设计一种机制,以实施对持久存储对象的细粒度控制。我们对Tranco排名前10,000的网站中第三方脚本对持久存储的访问进行了实证研究,发现所有cookie访问中的89.84%、所有localStorage访问中的90.98%以及IndexedDB访问中的72.49%是由第三方脚本完成的。我们的方法通过为存储对象附加标签来指定哪些域被允许读取和写入这些对象,从而对第三方脚本在这些对象上实施最小权限访问以确保其安全性。我们在Firefox浏览器上实现了该方法,并表明它能够有效阻止来自其他域的脚本访问存储对象,因为这些域根据标签不被允许访问。我们表明,在默认设置下,我们的强制实施会导致网站中某些功能损坏,但可以通过正确标记第三方脚本所使用的存储对象来修复。

英文摘要:

Web applications often include third-party content and scripts to personalize a user's online experience. These scripts have unrestricted access to a user's private data stored in the browser's persistent storage like cookies, localstorage and IndexedDB, associated with the host page. Various mechanisms have been implemented to restrict access to these storage objects, e.g., content security policy, the HttpOnly attribute with cookies, etc. However, the existing mechanisms provide an all-or-none access and do not work in scenarios where web applications need to allow controlled access to cookies and localstorage objects by third-party scripts. If some of these scripts behave maliciously, they can easily access and modify private user information that are stored in the browser objects. The goal of our work is to design a mechanism to enforce fine-grained control of persistent storage objects. We perform an empirical study of persistent storage access by third-party scripts on Tranco's top 10,000 websites and find that 89.84% of all cookie accesses, 90.98% of all localstorage accesses and 72.49% of IndexedDB accesses are done by third-party scripts. Our approach enforces least privilege access for third-party scripts on these objects to ensure their security by attaching labels to the storage objects that specify which domains are allowed to read from and write to these objects. We implement our approach on the Firefox browser and show that it effectively blocks scripts from other domains, which are not allowed access based on these labels, from accessing the storage objects. We show that our enforcement results in some functionality breakage in websites with the default settings, which can be fixed by correctly labeling the storage objects used by the third-party scripts.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑