Skip to content

webworkers can be used to fingerprint #10

Description

@raszpl

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions