What Are Media Devices?
Media device fingerprinting is a technique that generates a unique identifier by detecting and analyzing the attributes of media devices on a user’s device. These media devices include input and output devices such as cameras, microphones, and speakers. This technology leverages subtle differences between devices to identify and track users, and is commonly used in scenarios such as user identification and targeted advertising.
The process by which a website obtains information about a user’s audio and video devices and generates a browser fingerprint typically includes the following steps:
Step 1: Request User Authorization
Before using audio and video devices, a website needs to obtain explicit authorization from the user. This is usually done by calling the browser’s JavaScript API.
Step 2: Obtain Media Device Information
After the user grants authorization, the website can access device information through the WebRTC API. For privacy protection reasons, media device information can only be obtained when the user grants the webpage access permission. If the user denies authorization, the device information will return an empty value.
Device information mainly includes the following categories:
Device type: Such as audio input devices (microphones), audio output devices (speakers or headphones), and video input devices (cameras).
Device label: The human-readable name of the device. For example, the label of a camera may be “Logitech HD Webcam C270”, and the label of a microphone may be “Built-in Microphone”.
Device ID: The unique identifier of the device, which is a string used to uniquely identify the device.
Step 3: Generate a Browser Fingerprint
A browser fingerprint is generated by processing the collected device information. There are many ways to process it, such as converting the device information string into a hash value using a hashing algorithm.
It should be noted that media device fingerprints may change due to user behavior——replacing devices, updating device drivers, or modifying system settings may all cause the fingerprint to change, so it is not permanently fixed.
What Is an Audio Fingerprint?
Audio fingerprinting is a relatively new fingerprint tracking technology. Its basic principle is that, due to subtle differences in hardware and software configurations, different devices produce slight variations when playing the same piece of audio. These variations can be captured and used to generate a unique identifier for the device, known as an “audio fingerprint”.
The technical principles involved in audio fingerprinting mainly include audio processing and signal analysis. In practice, it usually requires the use of browser Web APIs, such as the AudioContext interface.
When a user visits a website, the website can obtain the audio fingerprint of the user’s device through the following steps:
Step 1: Create a Virtual Audio Environment
The website first needs to set up a browser audio environment for playing and analyzing audio. Technically, this is achieved by creating an AudioContext object. AudioContext is part of the Web Audio API and provides a series of interfaces for audio processing.
Step 2: Generate and Play Audio
In this virtual audio environment, the website creates an OscillatorNode——a virtual audio signal source. This signal source can play audio signals with specific frequencies and waveforms (such as sine waves, square waves, etc.), but the user cannot hear these sounds. The purpose of playing audio is to create subtle differences in the device’s audio hardware, which can be used to distinguish different devices.
Step 3: Capture Audio Data
When the audio is played, the website needs to capture the audio data. This is done by creating an AnalyserNode object. AnalyserNode is a virtual audio analyzer that can capture and analyze audio signals.
Step 4: Analyze Audio Data
The website analyzes the captured audio data and extracts information that reflects the characteristics of the device. This step may involve complex signal processing and statistical calculations, such as calculating the mean, variance, peak value, and other metrics of the audio data.
Step 5: Generate an Audio Fingerprint
Finally, the website converts the extracted information into a unique identifier. This identifier reflects the characteristics of how the user’s device processes audio and can be regarded as the device’s audio fingerprint. This process is usually implemented through a hash function, which can map data of any length to a fixed-length output.
Step 6: Use the Audio Fingerprint
Through the steps above, a website can obtain the audio fingerprint of a user’s device while the user is visiting the webpage, without the user being aware of the process. The website can then use the audio fingerprint to track the user, such as associating the audio fingerprint with other user behavior data for purposes including personalized advertising and preventing online fraud.
How to Prevent Media Device and Audio Fingerprint Tracking?
Media device fingerprinting generates fingerprints by capturing attributes on the device, such as type, label, and ID. Audio fingerprinting generates fingerprints based on the characteristics of the device when it plays audio.
To defend against this type of fingerprint tracking, the best solution is to use a “substitution method”——using specialized tools to generate a new fingerprint to replace the original fingerprint of the real device. If you are using an anti-detect browser, be sure to check whether the tool provides configuration options for this type of fingerprint.
