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

COOKIEGUARD:表征与隔离第一方Cookie罐

COOKIEGUARD: Characterizing and Isolating the First-Party Cookie Jar

University of California(加利福尼亚大学);CISPA Helmholtz Center for Information Security(CISPA赫尔姆霍兹信息安全中心)

Pouneh Nikkhah Bahrami, Aurore Fass, Zubair Shafiq

AI总结:

本研究针对第一方Cookie被第三方脚本滥用的安全问题,开展大规模测量揭示风险,提出按脚本来源隔离Cookie的CookieGuard机制,为浏览器Cookie安全加固提供可行方案。

摘要:

随着主流浏览器逐步淘汰或限制第三方Cookie,第一方Cookie正越来越多地被重新用于追踪。此前的研究表明,嵌入主框架的第三方脚本能够访问并窃取第一方Cookie,包括由其他第三方脚本设置的Cookie。然而,现有的浏览器安全机制,如同源策略(Same-Origin Policy)、内容安全策略(Content Security Policy)以及第三方存储分区机制,都无法阻止主框架内的这类跨域交互。尽管近期研究已开始关注这一问题,但目前仍缺乏全面的测量研究和实用的防御方案。\n在本研究中,我们首次针对20,000个网站开展了第一方Cookie跨域访问的大规模测量。我们发现,56%的网站中存在第三方脚本窃取非自身设置的Cookie的情况,32%的网站允许未授权的Cookie覆写或删除操作,暴露出严重的机密性与完整性风险。\n为缓解这一问题,我们提出了CookieGuard——一种基于浏览器的运行时强制机制,可按脚本来源对第一方Cookie进行隔离。CookieGuard能够阻止所有未授权的跨域Cookie操作,同时在大多数情况下保留网站功能,仅在11%的网站上观察到单点登录(Single Sign-On)功能受干扰的情况。\n我们的研究结果揭示了当前浏览器模型中的关键缺陷,并为实现更强的Cookie隔离提供了可部署的路径。

英文摘要:

As third-party cookies are being phased out or restricted by major browsers, first-party cookies are increasingly repurposed for tracking. Prior work has shown that third-party scripts embedded in the main frame can access and exfiltrate first-party cookies, including those set by other third-party scripts. However, existing browser security mechanisms, such as the Same-Origin Policy, Content Security Policy, and third-party storage partitioning, do not prevent this type of cross-domain interaction within the main frame. While recent studies have begun to highlight this issue, there remains a lack of comprehensive measurement and practical defenses. In this work, we conduct the first large-scale measurement of cross-domain access to first-party cookies across 20,000 websites. We find that 56 percent of websites include third-party scripts that exfiltrate cookies they did not set, and 32 percent allow unauthorized overwriting or deletion, revealing significant confidentiality and integrity risks. To mitigate this, we propose CookieGuard, a browser-based runtime enforcement mechanism that isolates first-party cookies on a per-script-origin basis. CookieGuard blocks all unauthorized cross-domain cookie operations while preserving site functionality in most cases, with Single Sign-On disruption observed on 11 percent of sites. Our results expose critical flaws in current browser models and offer a deployable path toward stronger cookie isolation.

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

↑