Scrapeless Wiki

What Is USB Fingerprinting? – Definition and How It Works

Informational P3 what is usb fingerprinting

Learn what WebUSB exposes, why permission gating makes it a weak signal, and what its availability still reveals.

USB fingerprinting concerns the WebUSB API, which lets a page communicate with USB devices. Because it is tightly permission-gated, its fingerprinting value comes from availability rather than from device data.

1. WebUSB Is Deliberately Restricted

Unlike most fingerprinting surfaces, WebUSB gives away almost nothing without explicit consent:

navigator.usb.getDevices()      // only devices the user already granted
navigator.usb.requestDevice()   // requires a user gesture and a picker dialog

getDevices() returns only previously authorised devices β€” normally an empty array. requestDevice() opens a browser-controlled chooser that requires a real click.

So a page cannot enumerate your USB devices. That was a deliberate design decision after the privacy implications of silent enumeration were understood.

2. What Availability Still Reveals

Observation Suggests
navigator.usb present Chromium-family, secure context
navigator.usb absent Firefox or Safari, which do not implement it
Present but throwing unexpectedly Patched or unusual environment
Non-empty getDevices() without interaction Pre-authorised β€” unusual

The browser-family discrimination is the practical value: WebUSB's presence narrows the engine, and its presence on a browser claiming to be Firefox is a contradiction.

3. Part of the API Availability Signature

WebUSB belongs to a family of hardware APIs whose combined presence forms a signature:

const surface = {
  usb:       'usb' in navigator,
  bluetooth: 'bluetooth' in navigator,
  serial:    'serial' in navigator,
  hid:       'hid' in navigator,
  nfc:       'NDEFReader' in window,
  midi:      'requestMIDIAccess' in navigator,
};

Each is implemented by different engines at different times, and some only on some platforms. The combination brackets both browser and operating system reasonably tightly.

Notably, several are unavailable on mobile or on particular platforms β€” so a claimed mobile profile exposing a desktop-only API is inconsistent.

4. Where It Actually Matters

Almost never, for collection work. Practically no data-bearing website interacts with USB devices.

Its relevance is confined to:

  • Version and engine bracketing as one input among many.
  • Consistency checking against the claimed browser and platform.
  • Completeness of a stealth profile β€” an environment that patches obvious surfaces but leaves an anomalous hardware-API set is inconsistent.

5. Do Not Fabricate Devices

The same reasoning as gamepads, more strongly. Reporting authorised USB devices would be:

  • Highly unusual, since almost no real session has any.
  • Dependent on plausible vendor and product identifiers.
  • Reliant on overriding native methods, which hook detection catches.

An empty list is the normal case and the correct one. There is no upside.

6. The Security Angle Is the Real Story

WebUSB's more interesting aspect is not fingerprinting but capability: a page granted access to a USB device can communicate with it directly, which for some device classes is a serious privilege.

That is why the permission model is strict β€” a gesture, a chooser, per-device authorisation, secure contexts only, and blocked for many sensitive device classes.

For anyone running automated browsers, the practical rule follows: never pre-authorise USB devices in an automated profile, and be cautious with any automation profile that has been granted device access, because that authorisation persists in the profile.

7. Practical Guidance

  1. Leave navigator.usb as the real browser presents it.
  2. Ensure engine consistency β€” do not expose it while claiming Firefox or Safari.
  3. Never pre-authorise devices, and treat a profile that has as sensitive.
  4. Keep the wider hardware-API set coherent with the claimed browser and platform.
  5. Treat it as negligible in priority against address reputation and rendering signals.

8. Summary

USB fingerprinting is limited by design: WebUSB reveals no devices without an explicit user gesture and per-device authorisation, so its fingerprinting value lies in whether the API exists at all.

That still brackets the browser engine and platform β€” it is Chromium-only β€” making it a consistency check against a spoofed user agent, and the correct handling is to leave it exactly as the real browser presents it and never pre-authorise devices in an automated profile.