Protect Your Privacy with MouseVader

Thwart Behavioral Tracking Through Fake Mouse Movements


The Problem: Silent Tracking of Your Every Move
Modern websites track far more than your clicks—every hover, scroll, and mouse movement is logged to build a profile of your behavior. This data fuels invasive ad targeting and algorithmic categorization. MouseVader fights back by flooding trackers with fake interactions, rendering your real data indistinguishable from noise.


How MouseVader Works: A Technical Deep Dive

Let’s break down the code powering MouseVader. The extension uses two core files: mousevader.js (the logic) and manifest.json (the configuration).

1. Synthetic Mouse Events

The core of MouseVader lies in programmatically generating mouseover and mouseout events. These mimic real user hovers but are dispatched randomly:

// Create reusable mouse events  
var overevent = new MouseEvent("mouseover", {  
  view: window,  
  bubbles: true,  // Ensures the event propagates through the DOM  
  cancelable: true  
});  

var outevent = new MouseEvent("mouseout", {  
  view: window,  
  bubbles: true,  
  cancelable: true  
});  
  • bubbles: true allows the event to trigger handlers up the DOM tree, mimicking natural behavior.
  • cancelable: true lets scripts intercept and cancel the event—though trackers rarely do this, as they want to collect data.

2. The Fake Hover Algorithm

The fakeHovers function randomly targets div elements on the page:

function fakeHovers() {  
  let elements = document.getElementsByTagName("div"); // Target all divs  
  let counter = 0;  

  // Iterate bottom-up for dynamic content (e.g., infinite scroll)  
  for (var i = elements.length - 1; i > 0; i--) {  
    if (Math.random() > 0.95) { // 5% chance per element  
      elements[i].dispatchEvent(overevent);  
      elements[i].dispatchEvent(outevent);  
      counter += 2;  

      // Cap events to avoid overloading the browser  
      if (counter >= 500) break;  
    }  
  }  

  // Adaptive backoff timeout  
  let timeout = 5000 + elements.length; // More elements = longer delay  
  setTimeout(fakeHovers, timeout);  
}  

Key Features:

  • Bottom-Up Iteration: Targets newer elements first (critical for React/Vue apps with dynamic content).
  • Randomization: A 5% chance per element ensures unpredictability.
  • Performance Safeguards: Capping events at 500 per cycle and scaling timeouts prevents browser lag.

3. Manifest Configuration

The manifest.json defines how the extension behaves:

{  
  "manifest_version": 2,  
  "name": "MouseVader",  
  "version": "1.2",  
  "description": "A privacy tool that misleads trackers...",  
  "icons": { "860": "darth.png" },  
  "content_scripts": [  
    {  
      "matches": ["<all_urls>"],  
      "js": ["mousevader.js"]  
    }  
  ]  
}  
  • <all_urls> injects the script into every page you visit.
  • No Permissions Required: Unlike extensions that access personal data, MouseVader runs entirely in the page context.

Why This Approach Matters
Trackers rely on patterns in your behavior. By dispatching 500+ fake events every 5–10 seconds, MouseVader:

  • Dilutes Real Data: Your genuine hovers drown in a sea of noise.
  • Confuses Machine Learning Models: Trackers can’t tell if you’re a human or a bot.
  • Works Everywhere: The <all_urls> match ensures coverage on all sites.

How to Install & Contribute
For Users:

For Developers:

  1. Clone the GitHub repo.
  2. Build with web-ext:
web-ext build -s MouseVader/Firefox -a artifacts/  

Call for Contributions
Help improve MouseVader by:

  • Optimizing Selectors: Target interactive elements (buttons, links) for more realistic noise.
  • Adding Stealth Features: Avoid detection by anti-bot systems.
  • Porting to Chrome: Adapt the manifest v2 to v3 for cross-browser support.

The Bigger Picture: Privacy as a Rebellion
Much like Darth Vader choking his foes with the Force, MouseVader disrupts the invisible grip of surveillance capitalism.

Install MouseVader today, and join the fight for a private web.

“The Force is strong with this one.” 🖱️⚡


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *