CookieEnforcer: Automated Cookie Notice Analysis and Enforcement

Rishabh Khandelwal, Asmit Nayak, Hamza Harkous, Kassem FawazarXiv 2022 · DOI · arXiv

Introduction

Since the implementation of privacy regulations like the GDPR and CCPA, cookie notices have become a ubiquitous feature of the modern web. However, many websites employ "dark patterns"—user interface designs intended to manipulate users into accepting privacy-invasive tracking. Navigating these notices to opt out of non-essential cookies often requires significant effort, involving multiple menus and dozens of individual toggles.

Research indicates a significant gap between user intent and action. In a user study, participants required an average of 12 clicks to manually reject cookies. This "consent fatigue" often leads users to accept default settings despite a stated preference for privacy.

Analysis of user behavior: despite a preference for privacy, many users accept cookies due to forced interaction and misconceptions.

System Design

CookieEnforcer is an end-to-end system designed to automate the detection and configuration of cookie notices. The system utilizes a three-stage pipeline distributed between a robust backend and a lightweight browser extension.

The CookieEnforcer system architecture, illustrating the pipeline from raw HTML detection to automated enforcement.

The system identifies cookie banners by analyzing rendering signals, such as a high "z-index" (indicating elements rendered on top of others). A BERT-based text classifier then distinguishes these notices from other common web pop-ups.

This module simulates human interaction by using HTML "tabbing" to discover all interactive elements. It assigns specific "Execution Roles" to elements, identifying toggles, submission buttons, and elements that reveal hidden settings or sub-menus.

3. Decision Model

The core of CookieEnforcer treats cookie enforcement as a sequence-to-sequence translation task. By fine-tuning a T5-Large (Text-to-Text Transfer Transformer) model, the system takes a machine-readable representation of the notice and generates the precise sequence of clicks required to reach a "disable all" state.

Evaluation and Results

The researchers evaluated CookieEnforcer using several datasets, including the Tranco Top-50k websites. The system was tested on an end-to-end evaluation set of 500 previously unseen domains.

  • High Accuracy: CookieEnforcer successfully generated the correct click sequences for 91% of the websites in the evaluation set.
  • Efficiency Gains: In a user study with 180 participants, the system reduced the time required to adjust cookie settings by 58%.
  • Prevalence of Tracking: A large-scale measurement revealed that 16.7% of UK websites and 22% of US websites enable at least one non-essential cookie by default, emphasizing the need for automated privacy tools.

Conclusion and Limitations

CookieEnforcer demonstrates that machine learning can effectively navigate the diverse and dynamic landscape of web consent banners. While highly effective, the system faces challenges with "Accept Only" banners that offer no opt-out mechanism and websites with non-standard, custom UI components that do not support standard accessibility features like tabbing. Future work may extend this semantic understanding of user interfaces to other privacy-related tasks, such as automating "Right to be Forgotten" requests.

Summary updated

Abstract

Online websites use cookie notices to elicit consent from the users, as required by recent privacy regulations like the GDPR and the CCPA. Prior work has shown that these notices use dark patterns to manipulate users into making website-friendly choices which put users' privacy at risk. In this work, we develop CookieEnforcer, a new system for automatically discovering cookie notices and deciding on the options that result in disabling all non-essential cookies. In order to achieve this, we first build an automatic cookie notice detector that utilizes the rendering pattern of the HTML elements to identify the cookie notices. Next, CookieEnforcer analyzes the cookie notices and predicts the set of actions required to disable all unnecessary cookies. This is done by modeling the problem as a sequence-to-sequence task, where the input is a machine-readable cookie notice and the output is the set of clicks to make. We demonstrate the efficacy of CookieEnforcer via an end-to-end accuracy evaluation, showing that it can generate the required steps in 91% of the cases. Via a user study, we show that CookieEnforcer can significantly reduce the user effort. Finally, we use our system to perform several measurements on the top 5k websites from the Tranco list (as accessed from the US and the UK), drawing comparisons and observations at scale.
BibTeX
@misc{khandelwal2022cookieenforcer,
  author = {Rishabh Khandelwal and Asmit Nayak and Hamza Harkous and Kassem Fawaz},
  title = {{CookieEnforcer: Automated Cookie Notice Analysis and Enforcement}},
  year = {2022},
  eprint = {2204.04221},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.04221},
}

Loading related content...

Figure