Firefox takes a bite out of the canvas ‘super cookie’
nakedsecurity.sophos.com
nakedsecurity.sophos.com
I spent a long time integrating libpango/cairo (http://www.pango.org/ and https://www.cairographics.org/) into a semi-toy opengl game engine I wrote which had a Windows target, and was baffled at the level of complexity/interdependency required to build it. Gecko (firefox's rendering engine) maintains a fork of cairo https://github.com/mozilla/gecko/blob/0ea4c5812c2adecbed1d84... , which is as far as I can tell the only way to statically link it. Both these libraries require Glib.
There isn't an alternate minimalist open-source font rendering library as far as I'm aware, simply because the task of handling all font-rendering edge cases in all languages is so gargantuan. So we're stuck with a huge intertwined set of poorly understood C libraries, tightly integrated into the system and every application and ever-exploitable.
On Windows, at least, fonts can also differ between monitors (even on the same computer.) The built-in ClearType tuner tool lets the user adjust the font rendering gamma for each monitor individually. It would be a shame if this didn't have an effect in the browser, where users probably do most of their reading these days.
If you made your own simple from-scratch font rendering library that rasterized glyphs to the same array of pixels on every operating system, regardless of user settings, I guarantee your users would be upset. When you render a lowercase 'e' to a 6x6 pixel grid, any slight difference in rendering makes a huge difference to the character of the letter, and it's the sort of thing that contributes to the "uncanny-valley" feeling that non-native apps have. This is why Pango and Firefox go through so much effort to use the native renderers on each platform and why they may seem complicated to an outsider.
Windows actually has two font rasterizers: GDI, which lived in the kernel prior to Windows 10, and DirectWrite. GDI does no vertical antialiasing, but DirectWrite does. Both do vertical hinting, but only GDI does horizontal hinting. (With ClearType on, GDI applies a hacky subset of horizontal hints--Beat Stamm has documentation on it on his Web site.)
FreeType, naturally, can do all of the above (except the GDI hacks), depending on how you configure it.
edit:
The emphasis here is on "most". In a world where an OS will have many millions of users, at least more than a few are going to care a lot about things like the differences between font renderers; programmers and graphic designers are no doubt among them. But the typical user? Without real data to back it up, count me as skeptical.
If anecdotal evidence counts, I've heard lots complaints about font rendering, even from people in real life and non-technical people. (I like the fonts on X. Why does Y look so bad? Why can't it just look like it does in Word on Windows?)
It turns out that if people spend most of their lives/jobs looking at text that appears a certain way, they will get accustomed to it. If these people are using LoDPI monitors where they can perceive each individual pixel, you'd better hope your custom font renderer replicates your users' favourite renderer down to the exact pixel layout of each glyph.
I heard of this because a friend switched from Windows to GNOME 3 a little while ago and told me about the Infinality preset. He seemed to be very happy with it.
After most shows, 90% of the audience couldn't tell you anything about the lighting, but good lighting absolutely lends to the overall experience. The right use of colours and angles in a scene can really add to both the immersion (in the sense that you believe in the setting) and the mood (in the sense that it adds to the tone of the scene).
We have data on fast page load times - we know that it makes people more likely to use certain kinds of site. They won't know why though. I am pretty sure that the same is true with font rendering, kerning etc.. Done right it makes for a pleasant reading experience, done wrong (or inconsistently) an unpleasant one, and most people wouldn't be able to say why.
Nobody cares about how things are done as long as they're consistent, but once it changes in a way that's visibly perceptible to most mainstream users (and it actually is, you might be surprised), then they do care, and they tend not to like change.
Obviously some people care about it. But most? Show me the data.
Since graphics rendering is tied so tightly to the hardware, I can't really imagine a scenario where all fingerprinting leaks from WebGL can ever be plugged.
You can use Freetype in conjunction with libagg. It will lack the more sophisticated multi-lingual layout features Pango provides but is doable for portable font rendering.
It would be interesting to make a fork of Pango that is independent of Glib or, more realistically, uses a stripped down Glib with minimal dependencies.
I would love a replacement for Pango/Cairo, because they are utter dependency hell, but don't get my hopes up prematurely.
As for Cairo, there are lighter-weight alternatives available: AGG, nanovg, etc.
This could also be used by ads or stuff like background monero miners to prevent killing the user's battery...
> There probably is not much of a difference for a website if user is low in power than if it is low in memory. There should be then just one flag/event really: low resources (catch-all for: battery, memory, CPU time, storage etc.). But browser could just emit please-save event and give a second or so to complete. Then decrease timer intervals significantly.
Or is the idea that you want to get as many timer calls in as possible before the device finally dies?
I meant increase intervals or decrease the number of them in a period of time.
It's definitely not cool with me, an insane waste of electricity.
Still, I prefer giving a "mining" contribution to a website operator (who actually needs some kind of revenue to live) over watching obnoxious ads and having my every move end up in dozens of tracker databases, in addition to hackers distributing malware over ad networks.
I am not indebted to anyone to allow them to use my machine's resources for their monetary goals.
If they want to make money off of me, make it clear -- I can respect that if I value your content. But exploiting browsers that are not caught up with latest security practices is being a scum and I will not tolerate it, ever.
Most will use it to try to push you harder "before your battery runs out"
An example of this would be an app like Uber charging you more if your battery level is low. They already know that people with low battery are willing to pay more: https://www.forbes.com/sites/amitchowdhry/2016/05/25/uber-lo...
The moral of the story is that Web API development is now driven at least partially by "How will advertisers abuse this new API?", and probably will be moreso over time, and that has, ahhh, interesting interactions with the forces pushing the browser into being the universal VM platform.
Though a battery percentage is not really useful for this as it could mean many things. My current main phone at 25% could last until tomorrow quite easily, my previous main device had at most a couple of hours left at that point. A simple "warning level" API would be more useful, allowing the app to register for events like "less than one hour of power left", "power loss likely in the next ten minutes", "entering super-power-saver mode" & "manual shut-down starting" and/or poll for the same flags. That way the device, which is much better placed to monitor such properties, can manage the warning levels perhaps with an off switch in case users don't want apps to know. Of course, you might have to enforce limited resource use in response to low power events, and you shouldn't allow much time between emitting "entering super power saver" events and actually entering the mode (which will shut off browser tasks until the mode is left).
So while there is a valid use case, that doesn't rely on trusting advertisers or other hogs to do something nice, the API as wasn't fit for that purpose and making something that is might be more complicated than you'd first think (so perhaps not worth the effort for the few apps that would actually make use of it).
The system can crash, hang, forcefully reboot or otherwise die at any moment, without warning. All it takes is one "oopsy", for the phone to hit the ground and the battery to fly off.
If there is important data that needs to be preserved, applications should already be committing it to non-volatile locations periodically.
App developers should be already working on these conditions by default. You should already have a game save system that can expect client shutdown or disconnection at any time.
That said, I could see a 15% or less warning but your mobile OS is doing that anyway, so why bother.
Why risk it?
Your unscrupulous ad broker or other actor intending on tracking you will be using a combination of these.
Each extra one adds another circle to the Venn diagram narrowing you down.
I'm pretty sure that almost everyone (private browsing or not) is identifiable through their browsing to at most 2-5 different users.
The EFF has a site that tests your browser for some fingerprints and tells you how unique you are: https://panopticlick.eff.org/
Another thing I noticed was that Chrome on Android, sends your phone model and software build number as part of the user agent.
If you don't have a popular phone, on a carrier customised rom, and with the other advertising info. You're likely unique.
Both Safari and Chrome failed even when using "Private/Incognito" mode.
Also, try this one for Chrome, it should help with the fingerprinting issues: https://chrome.google.com/webstore/detail/random-user-agent/...
Your fingerprint won't conform to the features that are expected. I won't go into too much detail here, on purpose. But e.g. if you claim to be Firefox while using chrome, that's completely detectable, server side, even without javascript.
If you have javascript it's of course even easier to just check if your browser supports the features it should according to its user agent.
Edit: Btw. I have actually reversed some fingerprinting JS code in the wild, and yes, they do check if you lie about your useragent.
Also, there's the thing where you can conform to a spec but it's still possible to tell a difference in implementation by observing certain things.
For example the non cryptographically secure random number generators in chrome and firefox used to be different algorithms. So if you seed the RNG with a number and call it, you used to get different results for firefox and chrome and you could tell if their user agent is lieing. (actually it was a bit more complicated than that, you can't seed Math.random in JS, but you get the point)
This isn't about sites needing that info to work correctly. This is what sites do for fingerprinting.
However, fingerprinting doesn't require any kind of single magic API, but almost certainly will use a collection of techniques to narrow down users. If they know your browser version, default language, screen resolution, etc those three alone can narrow you down by many orders of magnitude.
And they are adding more APIs like Device Memory which, while not as precise as a canvas fingerprint by itself, could probably whittle it down an order of magnitude further.
Apparently turning on "Do Not Track" has long been known as a way to single you out on the web. You'll help them narrow you down by about three orders of magnitude. It was a silly idea to begin with.
Wouldn't that be solved if FF turned DNT on by default?
https://en.wikipedia.org/wiki/Do_Not_Track#Internet_Explorer...
It was never really likely to happen, especially when even advocacy groups like the EFF opposed legislative approaches to enforcing DNT.
Unfortunately, Google, Facebook and Microsoft managed to kill that effort off.
Microsoft by doing exactly that, they default-enabled it in Internet Explorer, taking away any legal bearing. And Google+Facebook came out saying they don't give a fuck, they'll track users anyways, and then with something around 2/3 of all bigger webpages having Google Analytics deployed and some other ridiculous percentage having a Facebook Like-Button, there were essentially no webpages left that could have come out and said that they want to respect it in some fashion.
I'd expect it to narrow you down to hardware/OS, perhaps driver (though most users use whatever Windows or the OEM throws at them). How can it do more?
100 users buy the same hardware but some decided to install some custom font they need. Bravo there’s a difference now.
GP is very clear that there’s no single magical API used for fingerprinting. It’s anything and everything.
I do not believe it is unique at all. It will be unique for a hardware-OS-driver-browser combo. And if you are not doing anything strange, those numbers will be pretty common (most users just use whatever OS/driver package ships, and the browser gets upgraded like everyone else).
>I think it's a bad idea to advertise this to the general public, because you have to enable the "privacy.resistFingerprinting" pref for this to work.
It is developed by multiloginapp.com a privacy first browser suite.
Security and privacy is just a marketing gig for Firefox in my personal opinion. Not truly reflecting the reality.
Additionally you can use ungoogled-chromium to take it to the next level.
https://github.com/Eloston/ungoogled-chromium
[1] Some chrome flags worth knowing...
--incognito
--disable-sync
--disable-reading-from-canvas
--disable-voice-input
--disable-system-timezone-automatic-detection [When VPN from different timezone]
--connectivity-check-url= [set 204 from your trusted location]
--disable-remote-fonts
--no-referrers
--disable-physical-keyboard-autocorrect
--no-pings
Plus Decentral Eyes plugin...
Why any of this information, apart from the screen resolution and the language (assuming it's the Accept-Language header's contents), is accessible to the web pages anyways?
Remember when HTML first came about? The whole idea was that the browser would re-flow everything to fit on whatever resolution you had. Lots of sites hired writers, editors, and design people from the print world and tags were abused and added so those people could control the layout like they were used to doing instead of adapting to a better way. SVG scales and doesn't require the site to know your resolution.
We've really screwed up by allowing the browser developers to pander to site developers and give them access to the kingdom. Now that we can all see the folly in that, it's time to reverse the trend for the next 20 years.
Perhaps the sites could figure it out anyway with more effort, but at least force them to make the effort.
Basically everyone who ships a browser wants to shout: “Look at me! I have market share!”
Many sites vary native-code downloads by platform, so removing OS/CPU would cause unhappiness there.
The version and OS are part of the User-Agent, and the idea was also to allow the server to send the most appropriate/compatible version of the page.
Yes, agents change relatively rapidly, so unless trackers have a model predicting User Agent change, a tracking profile is only good for only so long.
Still, I suppose that one could either try to find the most common User Agent string, and set your browser to that, or have it change somewhat stochastically (but only enough so we don't compromise legitimate uses)
I don't see many other situations where that applies.
I think the "correct" solution would be for canvas text rendering to be better specified in the standard such that it couldn't be used for fingerprinting.
We'd all benefit from standardized canvas text rendering in the long run.
I ask because it's useful to be able to draw an image to canvas to then extract image data without having to parse the file format in javascript. Having to pop up a permission dialog each time would simply annoy the user.
I think if Gecko had an easy to use C API and prebuilt binaries to download to link with your app, you could see an uptick in FF usage. I'm familiar w/ past attempts/work at doing this, but it needs to be real, supported effort. Until then, I remain a Chrome (...er...Chromium) user (of course, I am not representative and maybe the ROI on embedding isn't worth it).
I aggressively avoid anything using Electron. Nothing says "please hurt me" like running a full web browser instance for every "application."
That's my excuse, not great but switching is on my TODO :-)
1. Download the tar.bz2 off of Mozilla's webpage.
2. Unpack it into a directory where you want to keep it. Make sure your user has write permissions to that directory, otherwise the auto-updater won't work.
3) In your PATH, place a file with name "firefox" and content: #!/bin/bash /path/to/where/you/unpacked/firefox/firefox "$@"
4) Make that file that you just put into your PATH executable (chmod +x /path/on/your/PATH/firefox).
(I'm actually not on Debian, for me it's rather that I replace Firefox Stable with Firefox Nightly, but I don't think this makes a difference.)
But there definitely is a hope for the future!
In any case I am convinced are aware and will fix it, so only a matter of time really.
Whether you give a fuck about me being angry at you for that is of course a different story, but there's no question about people being allowed to be angry at you for it.
I also once used this as a fun way to arrange the repeated string "FILE NOT FOUND" in the shape of the characters "404", using the system's native font.
> Subtle differences in the video card, font packs, and even font and graphics library versions allow the adversary to produce a stable, simple, high-entropy fingerprint of a computer. In fact, the hash of the rendered image can be used almost identically to a tracking cookie by the web server.[1]
[1] : https://www.torproject.org/projects/torbrowser/design/
I applaud Firefox and Mozilla. More can be done though.
firefox only shows the major revision (ie. the one that changes every 6 weeks) https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Us...