News for hackers. Stuff that matters.
Re:Are top websites using WebGL for fingerprinting? by rasz on Saturday April 17, 2021 @01:03PM (#26845741)
incidentally part of my anti fingerprinting script looks like this

    let UNMASKED_RENDERER_WEBGL = ["ANGLE (AMD Radeon HD 7900 Series Direct3D11 vs_5_0 ps_5_0)",
                               "ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)",
                               "ANGLE (Intel(R) HD Graphics 4600 Direct3D11 vs_5_0 ps_5_0)",
                               "ANGLE (Intel(R) HD Graphics 520 Direct3D11 vs_5_0 ps_5_0)",
                               "ANGLE (Intel(R) HD Graphics 530 Direct3D11 vs_5_0 ps_5_0)",
                               "ANGLE (Intel(R) HD Graphics Family Direct3D11 vs_5_0 ps_5_0)",
                               "ANGLE (NVIDIA GeForce GTX 960 Direct3D11 vs_5_0 ps_5_0)",
                               "ANGLE (NVIDIA GeForce GTX 1070 Direct3D11 vs_5_0 ps_5_0)",
                               "ANGLE (NVIDIA GeForce GTX 760 Direct3D11 vs_5_0 ps_5_0)"]

those were the most popular desktop GPUs according to Steam a year or two ago.
Re:Are top websites using WebGL for fingerprinting? by nine_k on Saturday April 17, 2021 @01:41PM (#26845992)
Won't a custom script make you special and thus very easy to precisely fingerprint?

I can imagine that having several typical configs and switching between them at random would help blend in.

Re:Are top websites using WebGL for fingerprinting? by gruez on Saturday April 17, 2021 @01:45PM (#26846022)
>I can imagine that having several typical configs and switching between them at random would help blend in.

You have to be careful with that too. An anti-anti-fingerprinting implementation can record the values and compare them across visits to see whether they stay the same. If they change every few months that's reasonable (eg. changing hardware), but if they change every day or every week there's most certainly spoofing involved.

Re:Are top websites using WebGL for fingerprinting? by nine_k on Saturday April 17, 2021 @03:44PM (#26846890)
It should change every few requests. The point is not to conceal spoofing, but to foil attempts to fingerprint.

Maybe an explicit sign of spoofing is even better, it sends a message in a gentle way.

Unspoofing on the server side, if at all possible, would likely be too expensive for whatever gain it might bring.

Re:Are top websites using WebGL for fingerprinting? by cmeacham98 on Saturday April 17, 2021 @05:27PM (#26847594)
Unless a major anti fingerprinting solution uses the same list of GPUs as you doing this puts you in a tiny bucket and provides massive entropy to trackers, possibly even enough to exactly identify you given many webGL calls.
Re:Are top websites using WebGL for fingerprinting? by strken on Saturday April 17, 2021 @10:41PM (#26849365)
You could seed your random number generator with a hash of the hostname, guaranteeing consistency across all the random values you return to the one host.
Re:Are top websites using WebGL for fingerprinting? by therouwboat on Saturday April 17, 2021 @02:26PM (#26846329)
Anti-anti-fingerprinting? :/

I feel like going there and telling them to stop following me around.

Re:Are top websites using WebGL for fingerprinting? by Gravyness on Sunday April 18, 2021 @01:36AM (#26850053)
You can't do that because of the anti-anti-anti-fingerprinting, I know this because of reasons
Re:Are top websites using WebGL for fingerprinting? by xsmasher on Saturday April 17, 2021 @03:31PM (#26846793)
Does it matter if they know you're spoofing, as long as it prevents them from linking two separate sessions together?
Re:Are top websites using WebGL for fingerprinting? by gruez on Saturday April 17, 2021 @04:13PM (#26847078)
you'll run into this problem: https://xkcd.com/1105/
Re:Are top websites using WebGL for fingerprinting? by x775 on Saturday April 17, 2021 @01:11PM (#26845788)
Would you be willing to share this script?
Re:Are top websites using WebGL for fingerprinting? by gruez on Saturday April 17, 2021 @02:31PM (#26846361)
Don't bother. It's hard to do it correctly. If you look through the snippets (or the MDN docs[1]), the value is retrieved using the getParameter() function. You might be tempted to override the function by doing something like

    gl.getParameter = () => "test"
but that's easily detectable. If you run

    gl.getParameter.toString()
You get back

    "() => "test""
whereas the original function you get back

    "function getParameter() { [native code] }"
In general, don't try to fix fingerprinting via content scripts[2]. It's very much detectable. Your best bet is a browser that handles it natively.

[1] https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug...

[2] https://palant.info/2020/12/10/how-anti-fingerprinting-exten...

Re:Are top websites using WebGL for fingerprinting? by Matheus28 on Saturday April 17, 2021 @07:38PM (#26848415)
You can easily hide it by hijacking Function.prototype.toString to see if `this == fake gl.getParemeter or this == fake toString`. Then the js code needs to find a real Function.prototype.toString by creating an iframe, but then you can detect that. Then I'm out of ideas on how to rescue the original toString
Re:Are top websites using WebGL for fingerprinting? by HWR_14 on Saturday April 17, 2021 @06:54PM (#26848167)
So the issue is that the fingerprinting code can detect the anti-fingerprinting code? Doesn't that mean the best solution is for everyone to override the same functions with the same dummy information?
Re:Are top websites using WebGL for fingerprinting? by cookiengineer on Saturday April 17, 2021 @11:57PM (#26849693)
This can be fixed by overriding valueOf() and toString() on the prototype. Just return another native function, like JSON.stringify ;)
Re:Are top websites using WebGL for fingerprinting? by rasz on Sunday April 18, 2021 @04:24AM (#26850767)
Sadly there are still things you cant programmatically override/proxy, like storagemanager

    await navigator.storage.estimate()
Re:Are top websites using WebGL for fingerprinting? by rasz on Saturday April 17, 2021 @02:45PM (#26846450)
gl.getParameter.toString() = () => 'function getParameter() { [native code] }'
Re:Are top websites using WebGL for fingerprinting? by gruez on Saturday April 17, 2021 @02:54PM (#26846515)

    -> gl.getParameter.toString.toString()
    <- "() => 'function getParameter() { [native code] }'"
Not to mention the iframe trick mentioned in palant's article.
Re:Are top websites using WebGL for fingerprinting? by rasz on Saturday April 17, 2021 @03:00PM (#26846558)
is that Firefox? in Chrome I get

    gl.getParameter.toString() = () => 'function getParameter() { [native code] }'
    gl.getParameter.toString()
    "function getParameter() { [native code] }"
    gl.getParameter.toString().toString()
    "function getParameter() { [native code] }"
    gl.getParameter.toString().toString().toString()
    "function getParameter() { [native code] }"
iframes, worker, sharedworker, serviceWorker are all covered. Good luck timing the difference.
Re:Are top websites using WebGL for fingerprinting? by deathanatos on Saturday April 17, 2021 @03:06PM (#26846613)
You're running

  gl.getParameter.toString().toString()
what the comment you're replying to is trying to tell you to run is:

  gl.getParameter.toString.toString()
Call toString on the toString fuction, not on its result.
Re:Are top websites using WebGL for fingerprinting? by rasz on Saturday April 17, 2021 @04:20PM (#26847120)
Re:Are top websites using WebGL for fingerprinting? by stevehawk on Saturday April 17, 2021 @02:06PM (#26846189)
nice try NSA
Re:Are top websites using WebGL for fingerprinting? by novok on Saturday April 17, 2021 @01:12PM (#26845792)
Do you present a set of 9 GPUs or pick one at random?
Re:Are top websites using WebGL for fingerprinting? by rasz on Saturday April 17, 2021 @01:46PM (#26846034)
UNMASKED_RENDERER_WEBGL[Math.floor(Math.random()*UNMASKED_RENDERER_WEBGL.length)]