-
Notifications
You must be signed in to change notification settings - Fork 10
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
Viewport Protection patches on Linux #193
Comments
eh, I am aware of that... especially those that work on settings pages and content settings.
I've actually been thinking about this for some time already, but I tried inserting comments, as gn does, e.g:
but I can't get it to work properly.
no, it is not, it is just a problem as indicated above. So how do you want to go on? can I give you some help in some way? |
I had also thought about the alternative of generating files via an action in the gns, exposing a specific folder and letting patches insert files with the necessary informations into it, so that the various patches can point to different files for the changes, but it is rather complex to do and not recommended by the chromium team and in fact there are no examples to copy from. and it is not applicable to typescript because the content is static :( every idea is welcome |
I know I didn't express it clearly.
I thought about applying patches manually, but given the number of changes I'd rather not, since that would be too tedious especially in the light of future updates. So, I honestly don't know how to proceed. |
help me to find a way to use this way:
is it clear what they do? i can't use it though. EDIT: in any case I will try to apply only that patch to the chromium code base, so I can understand the reasons why it doesn't apply and maybe find a solution. |
@PF4Public have patience, I am reviewing all the content settings patches to align them and if I can simplify them, it will take me a while. |
@uazo I'll investigate how they apply those patches and keep you informed if I find anything interesting.
It is so nice of you! Thanks! But what if I want to take some of your other patches into my local build as well? :) There might be alternative solution. Have you ever considered instead of making everything in a form of patches, split things in parts and apply some of more regular parts via PS: @uazo I'm sorry for such delayed reply, but I had to disconnect and take a break for some time. |
The idea is to develop a tool that allows me to track overlaps between patches.
I don't really like this idea, I would prefer the code change to be static and not dynamic during compilation, also because it would complicate (I think) the extraction of the '.patch' file from git.
Of course, when you come back I may already have something to show you, I am already doing it :) |
@PF4Public I haven't finished but I'm well on my way, and I'm asking if you can spare some time for a follow-up. I try to explain, what is needed is (all names are temporary):
which is obviously not a standard compiler feature.
all the source are in uazo/cromite#59 |
Of-course I do!
Do I need to do anything special for Linux then? |
Um, great question, I hope not, technically there is no reason why it shouldn't work.... |
@uazo Thanks for keeping me informed, I'll try rebuilding ungoogled-chromium with your patches and let you know how it goes and works. By the way, how do I actually test if viewport protection actually works? Is "Cover Your Tracks - Electronic Frontier Foundation" a good tool for that? |
you can use:
you have to disable |
I have rebuilt ungoogled-chromium with your patches (on Linux) and did some testing. Hope the results are interesting for you. This time patches applied without issues (I've applied only 4 mentioned above to begin with). Before running with your patches applied I glanced through the links you listed with my usual ungoogled-chromium browser and I have to admit that creepjs is very good at fingerprinting. It even assigns the same "lies" for all my ungoogled-chromium browsers (1xAndroid, 2xLinux). That's impressive! Then I proceeded to starting the browser with your patches and disabling all deceiving settings that come with ungoogled-chromium as you suggested. Then I tested DOMRect and Screen from creepjs. This time creepjs cannot detect any lies. Reloading tabs shows the same fingerprint (I suppose this is how it is expected to be), but closing the tab, opening another one and navigating to the tests again shows another fingerprint. Similarly a test on eff org always shows different screen resolution. That's a great job, @uazo! With all that said, creepjs still assigns the same fingerprint overall. Probably other measures needed to deceive it completely. Also the test at eff assigns persistent webgl hash. creepjs probably too, but I haven't yet completely understood how it assigns lies and hashes. I'll try some more of your patches and report back if you're interested. The next I think, I'd like to try hiding timezone :) |
absolutely!
yes, I agree, it is a really interesting project and also well written.
In fact, I am reflecting on this to modify the patch Canvas fingerprinting mitigations (tracked by #38).
Yes, correct
yes, if you have windows and try this browser you will notice that it is always different. and now my question: do you think you should show different screen sizes each time? @macchrome @romain-hunault @chirayudesai I make no secret of it, is an open secret, I hope that other browsers will also use my patches also to increase the number of devices that behave like this browser... and there are also other things that I only do at present... that is, I am afraid that this browser is easily traceable. |
Given that creepjs detects same lies for different ungoogled-chromium browsers, I would think that having persistent lies would be favouring the fingerprinting instead of hardening it. I wonder how does canvas fingerprint protection relates to viewport protection? After applying your viewport protection patches I seem to also have canvas protection, do I?
I need to try applying other patches from your changes ;)
Sorry, but I don't understand what you mean. :(
Would you mind if I make your patches available to Gentoo users of ungoogled-chromium as a build-time configurable opportunity (disabled by default)? I'm unsure if it would be OK to distribute the resulting binary from the licensing perspective (so, I won't do this just in case), but allowing end-user to conditionally apply your patches seems to be absolutely legal (in contrast to merging your patches to ungoogled-chromium project, which might give rise to licensing concerns and this is probably not going to happen in immediate future). I will of-course mention that this is solely your work and unrelated to ungoogled-chromium. |
I apologise for my poor English. I try to explain myself better. according to what the author says, creepjs is not a tool for identifying fingerprinting methodologies but rather a 'library' for identifying bots. now, this is (more or less) what he does, but it is not certain that it does not also really happen from other libraries.
it's not easy to lie well, that's what I wanted to say.
nothing, but currently that patch is not able to lie correctly, that's what I meant.
go ahead but be careful not to use Carl's without his consent
Suppose we want to track a browser, how many in the crowd change screen size (EDIT: without lying)? None.
I tend not to have problems because I think the most complex part is maintaining a patch, not so much developing it. |
please wait, I found an error with a full build I probably forgot some deps |
so it was, fixed in uazo/cromite@4c5f4ee |
I am closing the issue as completed, feel free to continue writing. |
Oh, now I see what you mean! But unfortunately I'm by far not an expert in this field, so cannot give a definite answer :)
But I got changing rects fingerprint, with only viewport protection. Am I misinterpreting something?
That's true, unless more people use browsers which do change screen sizes :)
I could encourage them doing so of-course, but I can speak only for myself.
Are you asking me or "them"? In case it is me myself — it goes without saying. But I think that one should start documenting only after all things are more-or-less in order and no renames/changes in view. But if you have something on your mind — I'm all ears.
Psst, me too! Me too! But I have to do it as part of my daytime job from time to time, so I have to live with it :)
Looks like it only affected Android. I've been building for Linux, so this didn't affect me fortunately. |
neither do I...
viewport protection, by changing the aspect ratio of the window, also changes all the co-ordinates of each individual element, thus including the canvas. canvas can be (definitively? :) protected by modifying the list of commands sent to skia by randomly inserting elements that dirty the image, which leads to the advantage that the same canvas will always produce the same hash each time it is read,
precisely
:) I will prepare a plan in which I will set out my ideas about this project.
fixed: the bug was only for version is_official_build=1. but I also noticed that I broke the component build. |
Thanks for explaining! Then I have a question: why did you suggest to disable rects-fingerprinting deception? In order to obtain clean results or are they both incompatible to each other?
That would be an interesting approach :)
I'm watching activity in your repositories, but feel free to mention me with a @ if you want to point my attention to something.
Unfortunately I would be unable to help you with translation from your language because I do not speak your language at all. :( |
because if you leave that option active, creepjs identifies the change of co-ordinates as a lie.
Of course, I will. |
I have applied timezone randomization, WebGL and font fingerprinting prevention patches. Now creepjs issues unique Id each test. Although I'm not sure whether font fingerprinting prevention works for me on Linux… |
no, linux code is not covered because they are not able to test it :( . for now only android and windows are supported, do you want to try to implement it? |
I did a quick glance through the sources and found no function in Linux part that was calling |
certainly. |
@uazo Guess what? I had one instance of ungoogled-chromium without your patches and I decided to test font fingerprinting today. So, without your patches:
After changing the binary to the one that has your patches applied:
So it seems that there is nothing extra needed to make it work on Linux. Yay! |
@uazo What is the difference between:
? |
carl asked me not to add the site settings but to leave just the flag, in fact there are two patches, one for the flag (theoretically to be merged with bromite, but then the process stopped) and another just for me. |
But you didn't answer my question :( If it does nothing, why do I see different behaviour changing the flag value between options as I mentioned in another issue? Do I need both patches or just one? |
maybe I'd better double-check, maybe I told you nonsense.
if you also want site setting, yes, both are required |
I do not detect any problems: But I will try to disable chrome-extension:// urls by default as well.
I try to disable it automatically for pdf.
let me better understand what you mean, from the image I do not understand
is normal and is the fault of rounding. but I think I can fix it.
I did not know that switch, I will try |
Sorry, I should have hidden screenshots to shorten the message.
But why there is no rounding in other cases?
Could be a Linux only issue?
The dropdown and extensions popup could be in fact the same issue Here are screen capturessimplescreenrecorder.mp4simplescreenrecorder-.2.mp4 |
no, I think it's because of some of your other patches. |
I've replaced both ungoogled fingerprinting patches with yours and it solved the checkbox issue, but noscript popup is still sliding and violentmonkey popup is still too small. Disabling chrome://flags/#viewport-protection brings everything back to order. What else do I miss? PS: ublock popup does not slide, but is oversize on right side and bottom :) PPS: Now crepjs does not detect lies with domrects test and even assigns new |
I think you have some other patch that is not completely correct... or maybe me having another one that fixes that problem, who knows!
From https://github.com/abrahamjuliot/creepjs#fingerprint-hashing
in this browser, creepjs never detects a subsequent visit (for me visits is always 1, at each refresh). and refreshing: |
I got totally confused. I see that all --fingerprinting-* switches are added to commandline. I open https://browserleaks.com/canvas, notice "Signature" and "PNG Hash". I open https://abrahamjuliot.github.io/creepjs/, notice "FP ID" and "Fuzzy". I open https://privacycheck.sec.lrz.de/active/fp_gcr/fp_getclientrects.html#fpGetClientRects, notice "Fingerprint". I open https://abrahamjuliot.github.io/creepjs/tests/domrect.html, notice "rect" and "lie pattern". I see that all --fingerprinting-* switches are absent from commandline. I open https://browserleaks.com/canvas, notice "Signature" and "PNG Hash". I open https://abrahamjuliot.github.io/creepjs/, notice "FP ID" and "Fuzzy". I open https://privacycheck.sec.lrz.de/active/fp_gcr/fp_getclientrects.html#fpGetClientRects, notice "Fingerprint". I open https://abrahamjuliot.github.io/creepjs/tests/domrect.html, notice "rect" and "lie pattern". So should I enable all fingerprinting settings that read "Disable" for fingerprinting deception to work? I'm very confused.
I managed to fix this issue by setting viewport protection flag to "Default". I remember I put it to "Enabled" because UI was blurry with "Default". |
I apologise if I have not answered you yet, but your question takes time and I have been busy with other things. |
OK, sorry for the wait. I think you are getting confused about the different features. viewport protection patch changes the screen size and aspect ratio of the page, so when a site requires 100% of the available space, it is not really 100% of the screen but always something less (and different). canvas protection, on the other hand, adds causal pixels each time javascript calls for image bytes to be read, note, the get*ClientRect() and measureText() patches behave like canvas protection, and so they lie. I hope I've been a little clearer.
My advice is to disable only get*ClientRect(), because viewport protection has the same effect but does not lie.
I am sorry, but you will have to fend for yourself here because I have no way to build and test a Linux platform |
And with viewport protection enabled by default it changes the screen size and aspect ratio for the UI and extensions since those are effectively webpages! This is what I'm trying to convey. This is what makes UI and PDF reader blurry.
That is not true. You can open several BTW, do you have hidpi screen at your disposal? I suspect that you may not notice a difference if you use a usual screen, but the effect could be greatly amplified (for some reason) on a hidpi screen. |
Your patches depend heavily on each other and therefore I couldn't apply only Viewport Protection patches while building ungoogled-chromium on Linux.
I'm not expecting you to rethink how you create and apply patches, just an FYI for @uazo
Given the number of failures (except for java, which I could easily exclude), I guess there would be no easy solution to this.
I did analyze
chrome/browser/resources/settings/icons.html
failure and it turns out that one needs to applyautoplay
,jit
,timezone
,webgl
,webrtc
patches first.The text was updated successfully, but these errors were encountered: