Using HTML+CSS to track mouse movement

Using HTML+CSS to track mouse movement

As users become more privacy-conscious and take more precautions against online tracking, they are turning to ad blockers and script blockers to block JavaScript tracking scripts. Now, researchers have discovered a new way to use HTML and CSS to track the mouse movements of website visitors and bypass tracking protection.

1 New attack techniques

Most online tracking is done through JavaScript scripts that are loaded into websites and ads, which allows advertisers and websites to track where you go online, how you use websites, or other online behaviors.

These scripts can be blocked using an ad blocker, browser tracking protection (like Firefox’s content blocking), or by blocking JavaScript altogether.

Content Blocking in Firefox

Researchers have discovered a new way to track website visitors' mouse movements on web pages without using any JavaScript, using only HTML and CSS, making this tracking very difficult to block.

Security researcher Davy Wybiral demonstrated on Twitter how a website can use HTML and CSS to observe mouse movements in one browser window in another browser window.

Wybiral achieved this by creating a grid of HTML DIVs that leveraged CSS: when the mouse moved over a box on the grid, the hover selector could request a new background image. Because the image requests are done in the background, the browser does not indicate that a connection is being made, so all requests are hidden from the user.

HTML source code

When a user hovers over a box and requests a new background image, the script records the mouse hover position. A user in another browser can then use the /watch URL to monitor in real time.

This technique can be used for a variety of things, including identifying hot spots on a website and studying user interfaces. In addition, the technology can be used to perform dynamic (gait) analysis and gain insights into other visitor behavioral characteristics.

The researchers also said that in addition to the hover selector, other selectors can be used to track browser behavior.

2 Other CSS tracking techniques

The method discovered by Wybiral isn't the only one showing how CSS and HTML can be used to track website users.

Last year, a project called CrookedStyleSheets was released that allows websites to collect user information such as screen resolution, the browser being used, information about when the user clicks on a link, and infer what operating system the user is using based on supported fonts.

As with Wybiral's approach, this is all done using HTML and CSS, with no JavaScript used.

Summarize

The above is what I introduced to you about using HTML+CSS to track mouse movement. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time!

<<:  We're driving IE6 to extinction on our own

>>:  jquery+springboot realizes file upload function

Recommend

Some common advanced SQL statements in MySQL

MySQL Advanced SQL Statements use kgc; create tab...

WeChat applet to save albums and pictures to albums

I am currently developing a video and tool app, s...

JavaScript object-oriented implementation of magnifying glass case

This article shares the specific code of JavaScri...

Process parsing of reserved word instructions in Dockerfile

Table of contents 1. What is Dockerfile? 2. Analy...

HTML+CSS to achieve simple navigation bar function

Without further ado, I'll go straight to the ...

A complete guide to Linux environment variable configuration

Linux environment variable configuration When cus...

MYSQL local installation and problem solving

Preface This article is quite detailed and even a...

CocosCreator Typescript makes Tetris game

Table of contents 1. Introduction 2. Several key ...

MySQL restores data through binlog

Table of contents mysql log files binlog Binlog l...

25 Ways and Tips to Increase Web Page Loading Speed

Introduction <br />Not everyone has access t...

Use of Linux dynamic link library

Compared with ordinary programs, dynamic link lib...

Using puppeteer to implement webpage screenshot function on linux (centos)

You may encounter the following problems when ins...

Docker image management common operation code examples

Mirroring is also one of the core components of D...

Comparison of mydumper and mysqldump in mysql

If you only want to back up a few tables or a sin...

MySQL 8.0.24 version installation and configuration method graphic tutorial

This article records the installation and configu...