Towards Browser Controls to Protect Cookies from Malicious Extensions (2405.06830v2)
Abstract: 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.
- [n. d.]. Express Cookie-Parser. http://expressjs.com/en/resources/middleware/cookie-parser.html
- 2024a. CREAM source code. https://github.com/Anonymous642/Cookies_and_CREAM.
- 2024b. CREAM’s fork of the Node.js cookie library. https://github.com/Anonymous642/CREAM_node_fork.
- Spook. js: Attacking Chrome strict site isolation via speculative execution. In 2022 IEEE Symposium on Security and Privacy (SP). IEEE, 699–715.
- Shubham Agarwal. 2022. Helping or Hindering? How Browser Extensions Undermine Security. In Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security. 23–37.
- I spy with my little eye: Analysis and detection of spying browser extensions. In 2018 IEEE European Symposium on Security and Privacy (EuroS&P). IEEE, 47–61.
- V Anupam and A Popov. [n. d.]. The token binding protocol. https://www.ietf.org/proceedings/91/slides/slides-91-uta-2.pdf
- awillia. 2021. Cookie size limits. https://chromestatus.com/feature/4946713618939904
- Adam Barth. 2011. HTTP State Management Mechanism. RFC 6265. https://doi.org/10.17487/RFC6265
- Protecting browsers from extension vulnerabilities. (2010).
- The security architecture of the chromium browser. In Technical report. Stanford University.
- Nick Berry. 2012. Domain Name Analysis. https://datagenetics.com/blog/march22012/
- Origin cookies: Session integrity for web applications. Web 2.0 Security and Privacy (W2SP) (2011).
- CookiExt: Patching the browser against session hijacking attacks. Journal of Computer Security 23, 4 (2015), 509–537.
- Provably sound browser-based enforcement of web session integrity. In 2014 IEEE 27th Computer Security Foundations Symposium. IEEE, 366–380.
- Detection of inconsistencies in privacy practices of browser extensions. In 2023 IEEE Symposium on Security and Privacy (SP). IEEE, 2780–2798.
- An empirical study of web cookies. In Proceedings of the 25th international conference on world wide web. 891–901.
- Paul Calvano. 2020. An analysis of cookie sizes on the web. https://paulcalvano.com/2020-07-13-an-analysis-of-cookie-sizes-on-the-web/
- Surviving the web: A journey into web session security. ACM Computing Surveys (CSUR) 50, 1 (2017), 1–34.
- An Evaluation of the Google Chrome Extension Security Architecture.. In USENIX Security Symposium. 97–111.
- We Still Don’t Have Secure Cross-Domain Requests: an Empirical Study of CORS.. In USENIX Security Symposium. 1079–1093.
- Quan Chen and Alexandros Kapravelos. 2018. Mystique: Uncovering information leakage from browser extensions. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security. 1687–1700.
- MDN Contributors. 2023. Browser extensions. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions
- MDN Contributors. 2024a. Cookie Store API. https://developer.mozilla.org/en-US/docs/Web/API/Cookie_Store_API
- MDN Contributors. 2024b. DeclarativeNetRequest.modifyheaderinfo. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest/ModifyHeaderInfo
- MDN Contributors. 2024c. Document: cookie property. https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie
- MDN Contributors. 2024d. Set-Cookie. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
- MDN Contributors. 2024e. Using HTTP cookies. https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#security
- One-time cookies: Preventing session hijacking attacks with stateless authentication tokens. ACM Transactions on Internet Technology (TOIT) 12, 1 (2012), 1–24.
- Serene: Self-reliant client-side protection against session fixation. In Distributed Applications and Interoperable Systems: 12th IFIP WG 6.1 International Conference, DAIS 2012, Stockholm, Sweden, June 13-16, 2012. Proceedings 12. Springer, 59–72.
- Malicious browser extensions at scale: Bridging the observability gap between web site and browser. In 10th USENIX Workshop on Cyber Security Experimentation and Test (CSET 17).
- Chromium Developers. 2011. Chromium. https://www.chromium.org/Home/
- Chromium Developers. 2012a. Cookies. https://source.chromium.org/chromium/chromium/src/+/main:net/cookies/
- Chromium Developers. 2012b. Cross-origin network requests. https://developer.chrome.com/docs/extensions/develop/concepts/network-requests
- Chrome Developers. 2012c. Match patterns. https://developer.chrome.com/docs/extensions/develop/concepts/match-patterns
- Chrome Developers. 2012d. What are Chrome Apps? https://developer.chrome.com/docs/apps/overview
- Chrome Developers. 2012e. What are themes? https://developer.chrome.com/docs/extensions/develop/ui/themes
- Chromium Developers. 2017a. Network Service. https://chromium.googlesource.com/chromium/src/+/HEAD/services/network/README.md
- Chromium Developers. 2017b. Sandbox. https://chromium.googlesource.com/chromium/src/+/HEAD/docs/design/sandbox.md
- Chromium Developers. 2020. Cookies. https://chromium.googlesource.com/chromium/src/+/HEAD/net/cookies/README.md#Main-interfaces-for-finding_setting_deleting_and-observing-cookies
- Chromium Developers. 2021a. https://www.chromium.org/servicification/
- Chrome Developers. 2021b. Chrome Web Store Review process. https://developer.chrome.com/docs/webstore/review-process
- Chromium Developers. 2021c. CookieMonster. https://www.chromium.org/developers/design-documents/network-stack/cookiemonster/
- Chromium Developers. 2021d. Multi-process Architecture. https://www.chromium.org/developers/design-documents/multi-process-architecture/
- Chrome Developers. 2022a. Hello world extension. https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world
- Chromium Developers. 2022b. Process Model and Site Isolation. https://chromium.googlesource.com/chromium/src/+/main/docs/process_model_and_site_isolation.md
- Chrome Developers. 2023. Cookies having independent partitioned state (chips). https://developers.google.com/privacy-sandbox/3pcd/chips
- Chrome Developers. 2024a. Apps. https://developer.chrome.com/docs/apps
- Chrome Developers. 2024b. Chrome Sitemap. https://chrome.google.com/webstore/sitemap
- Chrome Developers. 2024c. Chrome Web Store. https://chromewebstore.google.com/
- Chromium Developers. 2024d. chrome.cookies. https://developer.chrome.com/docs/extensions/reference/api/cookies
- Chrome Developers. 2024e. Chrome.declarativeNetRequest. https://developer.chrome.com/docs/extensions/reference/api/declarativeNetRequest#description
- Chrome Developers. 2024f. Chrome.webRequest. https://developer.chrome.com/docs/extensions/reference/api/webRequest
- Chrome Developers. 2024g. Get started. https://developer.chrome.com/docs/extensions/get-started
- Chrome Developers. 2024h. Permission warning guidelines. https://developer.chrome.com/docs/extensions/develop/concepts/permission-warnings
- Chrome Developers. 2024i. Using Signed Cookies. https://cloud.google.com/cdn/docs/using-signed-cookies
- Firefox Developers. 2021e. Process Model. https://firefox-source-docs.mozilla.org/dom/ipc/process_model.html
- Firefox Developers. 2022c. Gecko Processes. https://firefox-source-docs.mozilla.org/ipc/processes.html
- Firefox Developers. 2024j. https://addons.mozilla.org/en-US/firefox/
- Firefox Developers. 2024k. Firefox Sitemap. https://addons.mozilla.org/sitemap.xml
- The cookie hunter: Automated black-box auditing for web authentication and authorization flaws. In Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security. 1953–1970.
- Doublex: Statically detecting vulnerable data flows in browser extensions at scale. In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security. 1789–1804.
- Grammarly. 2024. Grammarly: Ai writing and grammar checker app. https://chromewebstore.google.com/detail/grammarly-ai-writing-and/kbfnbcaeplbcioakkpcpgfkobkghlhen
- Trends and lessons from three years fighting malicious extensions. In 24th USENIX Security Symposium (USENIX Security 15). 579–593.
- Randell Jesup. 2017. https://mozilla.github.io/firefox-browser-architecture/text/0012-process-isolation-in-firefox.html
- Reliable protection against session fixation attacks. In Proceedings of the 2011 ACM Symposium on Applied Computing. 1531–1537.
- Hulk: Eliciting malicious behavior in browser extensions. In 23rd USENIX Security Symposium (USENIX Security 14). 641–654.
- Carnus: Exploring the Privacy Threats of Browser Extension Fingerprinting.. In In Proceedings of the 27th Network and Distributed System Security Symposium (NDSS).
- Unleash the simulacrum: shifting browser realities for robust {{\{{Extension-Fingerprinting}}\}} prevention. In 31st USENIX Security Symposium (USENIX Security 22). 735–752.
- Understanding users’ knowledge about the privacy and security of browser extensions. In seventeenth symposium on usable privacy and security (SOUPS 2021). 99–118.
- Jamila Kaya and Jacob Rickerd. 2020. Security researchers partner with chrome to take down browser extension fraud network affecting millions of users. https://duo.com/labs/research/crxcavator-malvertising-2020
- Philipp Kewisch et al. 2024. Add-on policies. https://extensionworkshop.com/documentation/publish/add-on-policies/
- Soheil Khodayari and Giancarlo Pellegrino. 2022. The State of the SameSite: Studying the Usage, Effectiveness, and Adequacy of SameSite Cookies. In 2022 IEEE Symposium on Security and Privacy (SP). IEEE, 1590–1607.
- Young Min Kim and Byoungyoung Lee. 2023. Extending a hand to attackers: browser privilege escalation attacks via extensions. In 32nd USENIX Security Symposium (USENIX Security 23). 7055–7071.
- Noxes: a client-side solution for mitigating cross-site scripting attacks. In Proceedings of the 2006 ACM symposium on Applied computing. 330–337.
- David Li. 2023. Resuming the transition to manifest V3. https://developer.chrome.com/blog/resuming-the-transition-to-mv3
- SOK: On the Analysis of Web Browser Security. arXiv preprint arXiv:2112.15561 (2021).
- Matt M. 2011. ec_private_key.h. https://source.chromium.org/chromium/chromium/src/+/main:crypto/ec_private_key.h
- Kristian Monsen and Arnar Brigisson. 2024. WICG/dbsc. https://github.com/WICG/dbsc/tree/main
- Kev Needham. 2015. The future of developing firefox add-ons. https://blog.mozilla.org/addons/2015/08/21/the-future-of-developing-firefox-add-ons/
- SessionShield: Lightweight protection against session hijacking. In Engineering Secure Software and Systems: Third International Symposium, ESSoS 2011, Madrid, Spain, February 9-10, 2011. Proceedings 3. Springer, 87–100.
- You’ve changed: Detecting malicious browser extensions through their update deltas. In Proceedings of the 2020 ACM SIGSAC conference on computer and communications security. 477–491.
- Are chrome extensions compliant with the spirit of least privilege? International Journal of Information Security 21, 6 (2022), 1283–1297.
- After you, please: browser extensions order attacks and countermeasures. International Journal of Information Security 19 (2020), 623–638.
- The Token Binding Protocol Version 1.0. RFC 8471. https://doi.org/10.17487/RFC8471
- Charlie Reis and Alex Moshchuk. 2021. Protecting more with site isolation. https://security.googleblog.com/2021/07/protecting-more-with-site-isolation.html
- Site isolation: Process separation for web sites within the browser. (2019).
- The Security Lottery: Measuring {{\{{Client-Side}}\}} Web Security Inconsistencies. In 31st USENIX Security Symposium (USENIX Security 22). 2047–2064.
- Journey to the center of the cookie ecosystem: Unraveling actors’ roles and relationships. In 2021 IEEE Symposium on Security and Privacy (SP). IEEE, 1990–2004.
- Juha-Matti Santala. 2022. Extensions button and how to handle permissions in Manifest V3. https://blog.mozilla.org/addons/2022/11/17/unified-extensions-button-and-how-to-handle-permissions-in-manifest-v3/
- The cracked cookie jar: HTTP cookie hijacking and the exposure of private information. In 2016 IEEE Symposium on Security and Privacy (SP). IEEE, 724–742.
- Latex Gloves: Protecting Browser Extensions from Probing and Revelation Attacks.. In NDSS.
- The dangers of human touch: fingerprinting browser extensions through user actions. In 31st USENIX Security Symposium (USENIX Security 22). 717–733.
- Escaping the confines of time: Continuous browser extension fingerprinting through ephemeral modifications. In Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security. 2675–2688.
- Dolière Francis Somé. 2019. EmPoWeb: empowering web applications with browser extensions. In 2019 IEEE Symposium on Security and Privacy (SP). IEEE, 227–245.
- Cookie crumbles: breaking and fixing web session integrity. In 32nd USENIX Security Symposium (USENIX Security 23). 5539–5556.
- Can I Take Your Subdomain? Exploring Same-Site Attacks in the Modern Web.. In USENIX Security Symposium. 2917–2934.
- Brandon Stewart. 2022. Introduction to WebKit. https://docs.webkit.org/Getting%20Started/Introduction.html
- Edward Sullivan. 2024. Manifest V3 & Manifest V2 (March 2024 update). https://blog.mozilla.org/addons/2024/03/13/manifest-v3-manifest-v2-march-2024-update/
- Fortifying web-based applications automatically. In Proceedings of the 18th ACM conference on Computer and communications security. 615–626.
- Bill Toulas. 2023. Fake VPN chrome extensions force-installed 1.5 million times. https://www.bleepingcomputer.com/news/security/fake-vpn-chrome-extensions-force-installed-15-million-times/
- WRIT: Web Request Integrity and Attestation against Malicious Browser Extensions. IEEE Transactions on Dependable and Secure Computing (2023).
- James Wagner. 2018. Trustworthy chrome extensions, by default. https://blog.chromium.org/2018/10/trustworthy-chrome-extensions-by-default.html
- Webenclave: protect web secrets from browser extensions with software enclave. IEEE Transactions on Dependable and Secure Computing 19, 5 (2021), 3055–3070.
- Rob Wu. 2022. Manifest V3 in Firefox: Recap & next steps. https://blog.mozilla.org/addons/2022/05/18/manifest-v3-in-firefox-recap-next-steps/
- Rob Wu. 2023. https://robwu.nl/crxviewer/
- Wulf et al. 2024. Updating your extension. https://extensionworkshop.com/documentation/manage/updating-your-extension/
- Understanding malvertising through ad-injecting browser extensions. In Proceedings of the 24th international conference on world wide web. 1286–1295.
- CoCo: Efficient Browser Extension Vulnerability Detection via Coverage-guided, Concurrent Abstract Interpretation. In Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security. 2441–2455.
- Matt Zeunert. 2021. chrome-extension-list. https://github.com/DebugBear/chrome-extension-list/tree/master
- Liam Tyler (3 papers)
- Ivan De Oliveira Nunes (23 papers)