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

面向浏览器控制以保护 Cookie 免受恶意扩展侵害

Towards Browser Controls to Protect Cookies from Malicious Extensions

Liam Tyler, Ivan De Oliveira Nunes

AI总结:

本文针对恶意浏览器扩展窃取会话 Cookie 的问题,提出 BrowserOnly 和 Monitored 两种新 Cookie 属性,并实现修改版 Chromium 浏览器 CREAM,在低运行时开销下有效保护 Cookie 安全。

摘要:

Cookie 在相关的网络流量之间维持状态。因此,Cookie 常被用于身份认证,通过存储用户的会话 ID,并在后续流量中替代重新输入凭据的需求。这些所谓的“会话 Cookie”是旨在窃取它们以获取用户账户未授权访问权限的攻击的主要目标。为缓解这些攻击,Secure 和 HttpOnly Cookie 属性限制了 Cookie 来自恶意网络和网站的可访问性。然而,这些控制措施忽视了浏览器扩展:第三方 HTML/JavaScript 附加组件,它们可以访问特权浏览器 API,并具备跨多个网站操作的能力。因此,恶意或被攻陷的扩展可以提供对用户会话 Cookie 的无限制访问。\n\n在这项工作中,我们首先分析了能够访问“高风险”API(即那些允许 Cookie 修改和窃取的 API)的扩展的普遍性,发现它们拥有数亿用户。受此启发,我们提出了一种通过引入两个新的 Cookie 属性来保护 Cookie 免受恶意扩展侵害的机制:BrowserOnly 和 Monitored。BrowserOnly 属性完全阻止扩展访问 Cookie。尽管有效,但并非所有 Cookie 都能被设为不可访问。因此,具有 Monitored 属性的 Cookie 仍然可访问,但被绑定到单个浏览器,并且对 Cookie 所做的任何更改都会被记录。结果是,被盗的 Monitored Cookie 在其原始浏览器之外无法使用,并且服务器可以验证所执行的修改。为了展示所提出的功能,我们设计并实现了 CREAM(Cookie Restrictions for Extension Abuse Mitigation,面向扩展滥用缓解的 Cookie 限制),这是开源 Chromium 浏览器的一个修改版本,实现了这些控制措施。我们的评估表明,CREAM 能够有效保护 Cookie 免受恶意扩展的侵害,同时只产生很少的运行时开销。

英文摘要:

Cookies maintain state across related web traffic. As such, cookies are commonly used for authentication by storing a user's session ID and replacing the need to re-enter credentials in subsequent traffic. These so-called ``session cookies'' are prime targets for attacks that aim to steal them to gain unauthorized access to user accounts. To mitigate these attacks, the Secure and HttpOnly cookie attributes limit a cookie's accessibility from malicious networks and websites. However, these controls overlook browser extensions: third-party HTML/JavaScript add-ons with access to privileged browser APIs and the ability to operate across multiple websites. Thus malicious or compromised extensions can provide unrestricted access to a user's session cookies. In this work, we first analyze the prevalence of extensions with access to ``risky'' APIs (those that enable cookie modification and theft) and find that they have hundreds of millions of users. Motivated by this, we propose a mechanism to protect cookies from malicious extensions by introducing two new cookie attributes: BrowserOnly and Monitored. The BrowserOnly attribute prevents extension access to cookies altogether. While effective, not all cookies can be made inaccessible. Thus cookies with the Monitored attribute remain accessible but are tied to a single browser and any changes made to the cookie are logged. As a result, stolen Monitored cookies are unusable outside their original browser and servers can validate the modifications performed. To demonstrate the proposed functionalities, we design and implement CREAM (Cookie Restrictions for Extension Abuse Mitigation) a modified version of the open-source Chromium browser realizing these controls. Our evaluation indicates that CREAM effectively protects cookies from malicious extensions while incurring little run-time overheads.

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

↑