DFPM icon indicating copy to clipboard operation
DFPM copied to clipboard

webworkers can be used to fingerprint

Open raszpl opened this issue 4 years ago • 0 comments

webworkers can be used to fingerprint, running https://www.measurethat.net/Benchmarks/Show/6873/0/drawimage-and-getimagedata-on-canvas-vs-offscreencanvas or this code in https://jsfiddle.net

 new Worker(URL.createObjectURL(new Blob(["c = new OffscreenCanvas(100, 1); d = c.getContext('2d'); console.log(d.getImageData)"], {type: 'application/javascript'})))
 new Worker(URL.createObjectURL(new Blob(["console.log('hardwareConcurrency: ', self.navigator.hardwareConcurrency);"], {type: 'application/javascript'})))

only manages to catch

worker construct self.Worker

meanwhile worker has access to navigator and canvas. I tried to figure out how to proxy

self.CanvasRenderingContext2D.prototype.toDataURL
self.CanvasRenderingContext2D.prototype.toBlob
self.CanvasRenderingContext2D.prototype.getImageData

inside the worker, but I have trouble with scopes. Obviously window doesnt exist, but neither self nor WorkerGlobalScope contain CanvasRenderingContext2D :( Do you have any ideas?

raszpl avatar Oct 30 '20 18:10 raszpl