Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webworkers can be used to fingerprint #10

Open
raszpl opened this issue Oct 30, 2020 · 0 comments
Open

webworkers can be used to fingerprint #10

raszpl opened this issue Oct 30, 2020 · 0 comments

Comments

@raszpl
Copy link

raszpl commented Oct 30, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant