fingerprinting screen coordinates
See original GitHub issueDescription
Most browsers leak information about the user’s display outside the content viewport, including screen width and height, the position of a browser window in the screen, and the difference between viewport and window dimensions. This information constitutes a fingerprinting vectors that is exposed to content JS and CSS. APIs that leak this information include:
window.screen
object leaks information about the screen size:
window.screen.width
window.screen.height
window.screen.availWidth
window.screen.availHeight
window.screen.availLeft
window.screen.availTop
window.screen.isExtended
(leaks whether the user has multiple monitors)
Media queries also leak screen dimensions:
device-width
device-height
window
properties leak absolute coordinates of the position and outer boundary of the browser window:
window.screenX
window.screenY
window.outerWidth
window.outerHeight
Pointing event screen coordinates (MouseEvent
, TouchEvent
, DragEvent
, PointerEvent
) can also be used to computed the window’s position on the screen:
event.screenX
event.screenY
We want to hide this information from visited websites. The plan is to farble all of these APIs, meaning we spoof the values and also add a domain/session-keyed pseudorandom component to each of them.
We plan to enable the protection under standard (default) and aggressive fingerprinting modes, so that the user can disable them by lowering shields or setting “allow fingerprinting”. In addition, we bind the protections to a flag so that they can be remotely disabled using griffin.
Steps to Reproduce
Visit https://arthuredelstein.github.io/tracking_demos/screen.html to see how screen size is revealed.
Actual result:
Example:
Also:
Desired result:
Content should not be given true information about screen dimensions or window position.
Reproduces how often:
Always
Brave version:
All versions
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:5 (2 by maintainers)
Top GitHub Comments
Verification
PASSED
usingCase 1: 1st launch, no Griffin -
PASSED
Steps:
1.45.85
brave://version
https://dev-pages.brave.software/fingerprinting/farbling.html
Generate fingerprints
This Page
,Local Frame
, andRemote Frame
values were the same for each of the following:Screen resolution
Screen resolution media query
Available screen resolution
https://arthuredelstein.github.io/tracking_demos/screen.html
Confirmed there was no farbling of the screen/window coordinates shown in the screenshot
step 3
step 5
step 8
Case 2: 2nd launch, Griffin-enabled study (50%) with Shields enabled-
PASSED
(Continued from
1st launch, no Griffin
test, above) 10. restarted Brave 11. openedbrave://version
12. confirmed in the 50%-chance case you getBraveScreenFingerprintingBlockerStudy:Enabled
13. loadedhttps://dev-pages.brave.software/fingerprinting/farbling.html
14. clicked onGenerate fingerprints
16. loadedhttps://arthuredelstein.github.io/tracking_demos/screen.html
17. moved the mouse around and examined the tracked coordinatesConfirmed the values for
This Page
were different fromLocal Frame
andRemote Frame
(which were both the same); the only four (4) trackable events were themouseEvent.client(X/Y) coordinates
step 13
step 16
Case 3: 2nd launch, Griffin-enabled study (50%) with Shields disabled-
PASSED
Generate fingerprints
brave://version
farbling.html
screen.html
Confirmed all values were the same; no farbling was applied
Case 4: 3rd launch, default/no study (50%) -
PASSED
(Continued from
1st launch, no Griffin
test, above) 10. restarted Brave 12. openedbrave://version
13. confirmed in the other 50%-chance case I gotBraveScreenFingerprintingBlockerStudy:Default
14. loadedhttps://dev-pages.brave.software/fingerprinting/farbling.html
15. clicked onGenerate fingerprints
16. loadedhttps://arthuredelstein.github.io/tracking_demos/screen.html
17. moved the mouse around and examined the tracked coordinatesConfirmed all values were the same; no farbling was applied
step 11
step 13
step 15
Verification passed on
Case 1: 1st launch, no Griffin -
PASSED
Steps:
1.45.x
brave://version
https://dev-pages.brave.software/fingerprinting/farbling.html
Generate fingerprints
This Page
,Local Frame
, andRemote Frame
values were the same for each of the following:Screen resolution
Screen resolution media query
Available screen resolution
https://arthuredelstein.github.io/tracking_demos/screen.html
Confirmed there was no farbling of the screen/window coordinates shown in the screenshot
Case 2: 2nd launch, Griffin-enabled study (50%) with Shields enabled-
PASSED
(Continued from
1st launch, no Griffin
test, above) 10. restarted Brave 11. openedbrave://version
12. confirmed in the 50%-chance case you getBraveScreenFingerprintingBlockerStudy:Enabled
13. loadedhttps://dev-pages.brave.software/fingerprinting/farbling.html
14. clicked onGenerate fingerprints
16. loadedhttps://arthuredelstein.github.io/tracking_demos/screen.html
17. moved the mouse around and examined the tracked coordinatesConfirmed the values for
This Page
were different fromLocal Frame
andRemote Frame
(which were both the same); the only four (4) trackable events were themouseEvent.client(X/Y) coordinates
Case 3: 2nd launch, Griffin-enabled study (50%) with Shields disabled-
PASSED
Generate fingerprints
Confirmed all values were the same; no farbling was applied
Case 4: 3rd launch, default/no study (50%) -
PASSED
(Continued from
1st launch, no Griffin
test, above) 10. restarted Brave 12. openedbrave://version
13. confirmed in the other 50%-chance case I gotBraveScreenFingerprintingBlockerStudy:Default
14. loadedhttps://dev-pages.brave.software/fingerprinting/farbling.html
15. clicked onGenerate fingerprints
16. loadedhttps://arthuredelstein.github.io/tracking_demos/screen.html
17. moved the mouse around and examined the tracked coordinatesConfirmed all values were the same; no farbling was applied
Because
BraveScreenFingerprintingBlockerStudy
hasn’t been rolled out via therelease
channel, verification onAndroid
was done by enablingbrave://flags#brave-block-screen-fingerprinting
to ensure the feature was working as expected.Verification PASSED on
Samsung S10+
runningAndroid 12
using the following build(s):Case 1: BraveBlockScreenFingerprinting disabled -
PASSED
1.45.111 Chromium: 107.0.5304.62
brave://version
https://dev-pages.brave.software/fingerprinting/farbling.html
Generate fingerprints
This Page
,Local Frame
, andRemote Frame
values were the same for each of the following:Screen resolution
Screen resolution media query
Available screen resolution
https://arthuredelstein.github.io/tracking_demos/screen.html
Initial values before restarting the browser
Example
Example
Confirmed there was no farbling of the screen/window coordinates shown after the browser was restarted
Example
Example
Case 2: BraveBlockScreenFingerprinting enabled - Shields Enabled -
PASSED
1.45.111 Chromium: 107.0.5304.62
brave://version
brave://flags#brave-block-screen-fingerprinting
viabrave://flags
https://dev-pages.brave.software/fingerprinting/farbling.html
Generate fingerprints
This Page
,Local Frame
, andRemote Frame
values for the following:Screen resolution
Screen resolution media query
Available screen resolution
https://arthuredelstein.github.io/tracking_demos/screen.html
and note the values being usedhttps://dev-pages.brave.software/fingerprinting/farbling.html
&https://arthuredelstein.github.io/tracking_demos/screen.html
Block Screen Fingerprinting
has been enabledInitial values before restarting the browser
Example
Example
Confirmed that the values are different due to FP farbling
Example
Example
Case 3: BraveBlockScreenFingerprinting enabled - Shields Disabled -
PASSED
1.45.111 Chromium: 107.0.5304.62
brave://version
brave://flags#brave-block-screen-fingerprinting
viabrave://flags
https://dev-pages.brave.software/fingerprinting/farbling.html
and disabled shieldsGenerate fingerprints
This Page
,Local Frame
, andRemote Frame
values for the following:Screen resolution
Screen resolution media query
Available screen resolution
https://arthuredelstein.github.io/tracking_demos/screen.html
and note the values being used (disabled shields)https://dev-pages.brave.software/fingerprinting/farbling.html
&https://arthuredelstein.github.io/tracking_demos/screen.html
Brave Shields
being disabled on both websitesBrave Shields
on both loadhttps://dev-pages.brave.software/fingerprinting/farbling.html
&https://arthuredelstein.github.io/tracking_demos/screen.html
Brave Shields
are enabled and FB farbling is occurringInitial values before restarting the browser (Shields Disabled)
Example
Example
Confirmed there was no farbling of the screen/window coordinates shown after the browser was restarted
Example
Example
Confirmed that the values are different due to FP farbling (Shields Enabled)
Example
Example
Because
BraveScreenFingerprintingBlockerStudy
hasn’t been rolled out via therelease
channel, verification onAndroid
was done by enablingbrave://flags#brave-block-screen-fingerprinting
to ensure the feature was working as expected.Verification PASSED on
Samsung Tab S8 Ultra
runningAndroid 12
using the following build(s):Case 1: BraveBlockScreenFingerprinting disabled -
PASSED
1.45.111 Chromium: 107.0.5304.62
brave://version
https://dev-pages.brave.software/fingerprinting/farbling.html
Generate fingerprints
This Page
,Local Frame
, andRemote Frame
values were the same for each of the following:Screen resolution
Screen resolution media query
Available screen resolution
https://arthuredelstein.github.io/tracking_demos/screen.html
Initial values before restarting the browser
Example
Example
Confirmed there was no farbling of the screen/window coordinates shown after the browser was restarted
Example
Example
Case 2: BraveBlockScreenFingerprinting enabled - Shields Enabled -
PASSED
1.45.111 Chromium: 107.0.5304.62
brave://version
brave://flags#brave-block-screen-fingerprinting
viabrave://flags
https://dev-pages.brave.software/fingerprinting/farbling.html
Generate fingerprints
This Page
,Local Frame
, andRemote Frame
values for the following:Screen resolution
Screen resolution media query
Available screen resolution
https://arthuredelstein.github.io/tracking_demos/screen.html
and note the values being usedhttps://dev-pages.brave.software/fingerprinting/farbling.html
&https://arthuredelstein.github.io/tracking_demos/screen.html
Block Screen Fingerprinting
has been enabledInitial values before restarting the browser
Example
Example
Confirmed that the values are different due to FP farbling
Example
Example
Case 3: BraveBlockScreenFingerprinting enabled - Shields Disabled -
PASSED
1.45.111 Chromium: 107.0.5304.62
brave://version
brave://flags#brave-block-screen-fingerprinting
viabrave://flags
https://dev-pages.brave.software/fingerprinting/farbling.html
and disabled shieldsGenerate fingerprints
This Page
,Local Frame
, andRemote Frame
values for the following:Screen resolution
Screen resolution media query
Available screen resolution
https://arthuredelstein.github.io/tracking_demos/screen.html
and note the values being used (disabled shields)https://dev-pages.brave.software/fingerprinting/farbling.html
&https://arthuredelstein.github.io/tracking_demos/screen.html
Brave Shields
being disabled on both websitesBrave Shields
on both loadhttps://dev-pages.brave.software/fingerprinting/farbling.html
&https://arthuredelstein.github.io/tracking_demos/screen.html
Brave Shields
are enabled and FB farbling is occurringInitial values before restarting the browser (Shields Disabled)
Example
Example
Confirmed there was no farbling of the screen/window coordinates shown after the browser was restarted
Example
Example
Confirmed that the values are different due to FP farbling (Shields Enabled)
Example
Example