JavaScript Restrictor
Browser extension that improves privacy and security
|
Wrappers for Generic Sensor API. More...
Functions | |
if (doNoise===true) | |
Variables | |
var | doNoise = args[1] |
var | pastValues = {} |
$ | |
var | offsetCompStartPageStart = undefined |
var | wrappers |
Wrappers for Generic Sensor API.
MOTIVATION The risk of using Generic Sensor API calls for device fingerprinting is mentioned within the W3C Candidate Recommendation Draft, 29 July 2021 (https://www.w3.org/TR/2021/CRD-generic-sensor-20210729/#device-fingerprinting) Documented threats include manufacturing imperfections and differences that are unique to the concrete model of the device and can be used for fingerprinting.
We discovered another loophole in the Sensor.timestamp
attribute. The value describes when the last Sensor.onreading
event occurred, in millisecond precision. We observed the time origin is not the time of browsing context creation but the last boot time of the device. Exposing such information is dangerous as it allows to fingerprint the user easily. It is unlikely that two different devices will boot at exactly the same time.
Tested with the Magnetometer sensor on the following devices:
WRAPPING
The wrapper thus protects device by changing the time origin to the browsing context creation time, whereas the timestamp should still uniquely identify the reading. This is achieved in the following way:
POSSIBLE IMPROVEMENTS in protection level 2, the timestamp origin may be set to a random value based on the session hash. This can serve as a "fake boot time."
if | ( | doNoise = == true | ) |
$ |
var doNoise = args[1] |
var offsetCompStartPageStart = undefined |
var pastValues = {} |
var wrappers |