Cloudflare Turnstile requiring fingerprintable WebGL

(hacktivis.me)

162 points | by HypnoticOcelot 2 hours ago

17 comments

  • denysvitali 1 hour ago
    Cloudflare is known to use fingerprinting to detect scrapers For example, they use JA3 fingerprints and match them against the UA to block stuff like cURL while allowing OkHttp (Android clients) - but this can be easily be spoofed with packages such as CycleTLS [1].

    I don't want to defend them, because they gate away a good chunk of the internet with their "bot protection", but unless you do PoW (which is also ecologically a nightmare), probably fingerprinting is the way to go - completely destroying the privacy of everyone involved.

    Cromite, a privacy conscious fork of Chromium for Android, has constantly issues with CloudFlare Turnstile [2] because they (Cloudflare) try to fingerprint it in multiple ways in order to pass the challenge. The only way to get it to work would be to join the CloudFlare Browser Developer program - which requires signing an NDA. Rightfully so, the project maintainer didn't want to do it.

    If you want to see the extent of what CloudFlare does to fingerprint the browsers, just have a look in the issue [2] and see which flags need to be disabled in order to allow CloudFlare to pass the challenge.

    I understand both sides, but at least CloudFlare could be flexible enough to fall back to PoW instead of just blocking people from sending forms or accessing websites...

    [1]: https://github.com/Danny-Dasilva/CycleTLS

    [2]: https://github.com/uazo/cromite/issues/2365

    • petu 8 minutes ago
      > but unless you do PoW (which is also ecologically a nightmare)

      Can you expand? I don't see a problem with some napkin math. 5W load for 2 seconds is 0.002Wh (we have to let smartphones pass and not by doing PoW for 10s of seconds). 8 billion checks a day for a year = 8GWh.

    • b65e8bee43c2ed0 46 minutes ago
      it's all for nothing, because Cloudflare's scraping protection works about as well as a $5 padlock - good enough to dissuade bored teens, not good enough to dissuade even an amateur burglar. if someone wants to scrap your publicly visible data, they will. there's nothing you can do.
      • ACCount37 44 minutes ago
        At the same time: it sure works well enough to annoy anyone with a "bad ASN" IP with 80 captchas a day.
        • shideneyu 15 minutes ago
          exactly that's what I was thinking... like the day they provided a solution to the issue they posed
    • PearlRiver 1 hour ago
      This is why I have two separate browsers. If you want to do official stuff like paying for things you need to get through cloudflare.
      • notafox 17 minutes ago
        You can use Firefox with different profiles and configure it to launch particular profile directly, without launching default profile and using about:profiles.

        Firefox with a non-default profile can be created like that:

          ./firefox -CreateProfile "profile-name /home/user/.mozilla/firefox/profile-dir/"
          # For, say, cloudflare that would be:
          ./firefox -CreateProfile "cloudflare /home/user/.mozilla/firefox/cloudflare/"
        
        And you can launch it like that:

          ./firefox -profile "/home/user/.mozilla/firefox/profile-dir/"
          # For cloudflare that would be:
          ./firefox -profile "/home/user/.mozilla/firefox/cloudflare/"
        
        So, given that /usr/bin/firefox is just a shell script, you can

            - create a copy of it, say, /usr/bin/firefox-cloudflare
            - adjust the relevant line, adding the -profile argument
        
        If you use an icon to run firefox (say, /usr/share/applications/firefox.desktop), you'll need to do copy/adjust line for the icon.

        Of course, "./firefox" from examples above should be replaced with the actual path to executable. For default installation of Firefox the path would be in /usr/bin/firefox script.

        So, you can have a separate profiles for something sensitive/invasive (linkedin, cloudflare, shops, banks, etc.) and then you can have a separate profile for everything else.

        And each profile can have its own set of extensions.

      • helterskelter 53 minutes ago
        Firefox added profile switching recently. Works good.

        (That said, I still keep separate machines. One for doing "official" things, the other for everything else)

        • notafox 15 minutes ago
          > Firefox added profile switching recently.

          I think this was as recent as 25 years ago?

          Recently they added some new UI. There was and still is (I think) classic Profile Manager UI, which you can launch with

            ./firefox -ProfileManager
          
          or access UI in about:profiles.

          But you don't have to use any of those anyway - see my comment above (a response to parent).

        • ajb 36 minutes ago
          Odd - they've had that for years, but only on the command line. Wonder if it's different under the hood? They also have firefox containers which also never quite became a first-class feature (you have to install a plugin).
        • b65e8bee43c2ed0 40 minutes ago
          >Works good.

          does it? same binary, same machine, same display, same 781 other heuristics.

  • JoshTriplett 1 hour ago
    "This makes your browser appear suspicious because it looks like you're trying to hide your identity."

    Yeah, this needs to be burned to the ground.

  • 4oo4 34 minutes ago
    I tested this extension that I've been using for a long time on the turnstile page and it got through, fwiw. I think it's a bit more subtle than how resistfingerprinting works but not sure what the privacy tradeoff is.

    https://github.com/kkapsner/CanvasBlocker

  • Dwedit 12 minutes ago
    Adding noise to a canvas element is a mistake anyway. It means you can't develop a proper paint program using web technologies because your browser will mess with the image.
  • malka1986 1 hour ago
    Thanks, i did not know about `privacy.resistfingerprinting`

    I'll make sure to fail all cloudflare turnshit in the future.

    • gruez 1 hour ago
      I have it enabled and turnstile works fine.
  • avallach 1 hour ago
    Doesn't this mean we just need to make the webgl fingerprint resistance implementation smarter? Instead of explicitly rejecting webgl access or responding with dummy data, respond with data that is random within space of N common and reproducible patterns. E.g. emulate webgl implementation of some low spec but actually popular devices.
    • bflesch 39 minutes ago
      All of those advanced features should be enabled on a per-website basis but unfortunately even browsers whose marketing focuses on privacy don't allow you to do that. Same with TLS root CA certificates, there is no way to configure that a certain CA can only create certificates for certain domains.
  • adamtaylor_13 1 hour ago
    So if you need to prevent bot abuse, but also don't want an ugly captcha every time someone goes to sign up, is there a better option?
    • ribtoks 1 hour ago
      Use proof-of-work captchas, many are private by default. Look into Private Captcha or Cap captcha.
      • phoronixrly 50 minutes ago
        How does proof of work stop bots?
        • stephantul 47 minutes ago
          Because it destroys the economics of scraping. It’s too expensive with proof of work, or at least not as economically viable
          • gruez 41 minutes ago
            Depends on what type of scraping you're trying to stop. For the dumb scrapers that would try to scrape every page on a git forge (for which there are a bazillion pages for a modest project, because of how the site works), yeah it might deter them enough to stop. For anything high value (eg. reddit comments or retail prices), 10s of cpu time isn't going to stop them.
            • pmontra 34 minutes ago
              It will not scare away bots but 10 seconds of wait (CPU or only a sleep) will turn away many real users. "This site is so slow, I'll use something else." A kind of reverse captcha.
              • Hnrobert42 0 minutes ago
                Maybe, the proof of work can run in the background.
        • ray_v 43 minutes ago
          If it gets too expensive/time-consuming to scrape then it won't happen at scale (as much)?
    • ImPostingOnHN 1 hour ago
      The tool "Anubis" uses proof of work instead
      • BetterThanSober 43 minutes ago
        With a tuned cool down period this isn't a problem, especially if you frequent the sites. OpenWRT uses Anubis and usually when I need to peruse their site I'm on a very low-end device. I prefer waiting much more over finding Waldos

        But in principle I agree that there's no good answer to this, scraping _is_ useful and I bet most of us here had scraped something, it is AI company and their use of human's material for training without consent and return that led us to this (I know botting exists in forum since forum is a thing but it is easily solved by human moderators and keyword filter)

      • timpera 1 hour ago
        Anubis often takes more than 60 seconds to complete on low-end devices (especially old smartphones). It seems like there's no good solution.
        • QuantumNomad_ 15 minutes ago
          But after you’ve completed the Anubis PoW challenge for a site, it remains valid for some amount of time.

          So it’s not quite as horrible as it sounds.

          I have setting up Anubis for my own sites on my todo list. And I wish more people did it too. I don’t really mind waiting a little bit extra every now and then before the page loads. What I do mind is ReCaptcha asking me to click all the pictures with buses in them etc. And especially when I have to do it several times over before it’s happy. I’d rather wait a minute for a page to load than to ever solve a ReCaptcha again, if given the choice.

        • dangus 53 minutes ago
          That must be really low end then. I’ve never seen it complete in a timeframe that was slower than “I can’t even read the page before it redirects”
        • ImPostingOnHN 57 minutes ago
          There's not an easy, perfect solution, for sure. Newer phones get faster, but spammer compute gets cheaper.

          Some sort of decentralized trust web seems like another option, though less viable.

          • WesolyKubeczek 39 minutes ago
            One of unexpected outcomes from AI-induced hardware shortage may be that, in fact, compute won’t be getting cheaper and may in fact get more expensive…
      • phoronixrly 49 minutes ago
        How does Anubis stop bots?
        • xena 39 minutes ago
          Bots don't execute JavaScript or follow complicated redirects.
          • pwg 25 minutes ago
            Bots don't [currently] execute JavaScript or follow complicated redirects.

            They don't now, but enough "high value to the bots" pages turning on JS or complicated redirects will simply result in the bot authors adding JS execution or redirect following so they can continue "botting" the sites they want to scrape.

            It's a hole with no bottom. Each one-up on the anti-bot side will eventually be handled on the bot side.

  • kordlessagain 37 minutes ago
    I did warmups in Grub Crawler to fight this: https://deepbluedynamics.com/grub
  • gruez 1 hour ago
    This blog post is filled with false assumptions.

    >Turns out it's because Cloudflare wants to have a fingerprint of your device via WebGL, the only reason for doing this would be tracking.

    > So Cloudflare just banned all WebKitGTK browsers as I guess they put an exception for Safari.

    This is false. I ran firefox with:

    * hardware acceleration disabled (so software renderer, nothing to fingerprint)

    * resistfingerprinting enabled, including letterboxing with default window size

    * webgl disabled

    * VPN enabled

    * In a Windows VM

    By all accounts this should be the most suspicious fingerprint ever, but turnstile happily lets me through. If they want to track people, they're doing a pretty bad job. My guess is that OP's browser is getting banned because his WebKitGTK has a weird fingerprint, not because of webgl or whatever.

    > Such things are blocked in WebKit, and have been for years. Meaning it's tracking so awful that even Apple would block it, and as far as I can tell it's not the kind of privacy protection you can easily disable in it.

    This is also false. Webgl fingerprinting works just fine on Safari. They might try to mitigate it by adding some noise, but that's not so different than what firefox does, and is certainly not "blocked".

    • shiomiru 1 hour ago
      > My guess is that OP's browser is getting banned because his WebKitGTK has a weird fingerprint, not because of webgl or whatever.

      So why is Cloudflare saying the author got blocked because of WebGL?

      > > Such things are blocked in WebKit, and have been for years. Meaning it's tracking so awful that even Apple would block it, and as far as I can tell it's not the kind of privacy protection you can easily disable in it.

      > This is also false. Webgl fingerprinting works just fine on Safari. They might try to mitigate it by adding some noise, but that's not so different than what firefox does, and is certainly not "blocked".

      While I don't have an iDevice to try, the assumption that they are special cased is fair... because they are: https://blog.cloudflare.com/eliminating-captchas-on-iphones-...

      (Yes, this is basically WEI in a shinier package.)

    • superkuh 1 hour ago
      Yep. Cloudflare and cloudflare's customers don't care about blocking people that use non-standard browsers (or accessible browsers, or feed readers, or whatever). Using cloudflare defaults is basically saying, "Only major corporate browsers released in the last year or two can access this site."
  • Wowfunhappy 1 hour ago
    ...in the age of AI, does anyone have an actual solution for keeping out bots while preserving the privacy of humans?

    Obviously this is terrible, but I think there's a possibility it's the least terrible option? Another option is IP reputation, which I think is worse. Or scanning a code with a non-rooted phone, which I think is even worse than that!

    • fidotron 1 hour ago
      > ...in the age of AI, does anyone have an actual solution for keeping out bots while preserving the privacy of humans?

      There isn't one, and pretending otherwise is nonsense because humans will always provide their credentials to something to act on their behalf.

      In the limit you end up with Chinese phone farms.

      • tardedmeme 1 hour ago
        Right. Botnet operators love cloudflare because they make so much money renting out compromised machines to pass their tests.
    • thisislife2 1 hour ago
      The only solution is regulation. If all content created by anyone has a copyright, how does an implicit opt-in (which is what happens if you don't create a robots.txt file for your website) for scraping make any sense? Moreover, even if you have a robots.txt, AI (or whatever) bots often don't respect it (or use workarounds - they outsource scraping of such "restricted" sites to unethical third-parties to get the data; Meta has even resorted to piracy, openly!). So clearly, the logic and the "honour system" has failed.

      Cloudflare, Google Captcha, HCaptcha etc. are all shitty technical solutions because, as we are all discovering, it comes at the cost of our privacy (i.e. our personal data may monetise these services) and / or our computing resource and time. If current copyright laws aren't sufficient to prevent this, we have to acknowledge the system is broken. The answer could be enhancing it with some kind of Digital Millennium Copyright Act (DMCA) -like laws, but in favour of the creators against BigTech or rogue actors.

      - Web-scraping and copyright law - https://www.neudata.co/blog/web-scraping-and-copyright-law

      - Why DMCA Claims Against Web Scrapers Face Long Odds - https://capstonedc.com/insights/why-dmca-claims-against-web-...

      • oceanplexian 45 minutes ago
        Or you could let information be free, at least the stuff that’s on the public net.

        As for issues like bots overloading websites or using too many resources scaling laws will take care of it quickly, it’s not like you can’t serve thousands of RPS from a Raspberry Pi these days.

      • ImPostingOnHN 1 hour ago
        I don't think regulation will stop web scraping, not least of which because it can be done from locations outside the jurisdiction of the regulations.

        > we have to acknowledge the system is broken

        The system is broken. It probably takes, what, 10 seconds or less to use a residential or foreign proxy, 6+ months to internationally track and prosecute a single offender? So like a million times more effort going the regulatory route.

        • thisislife2 57 minutes ago
          Just as criminal laws don't end all crimes, copyright laws and anti-scraping regulation won't end all scraping. But it will greatly reduce it and limit it to rogue actors. Two examples I can cite here are the laws against email spams and laws against unsolicited marketing calls - they had a definite impact in reducing both (even in India, from where I am, where implementation of laws are often lax).
          • JoshTriplett 53 minutes ago
            Exactly. Bot activity is a problem of volume, not all-or-nothing. Solving 95% of it would be a win.
    • cr125rider 1 hour ago
      And identifying a bot that is acting on my behalf. Claude go search this topic is basically the same as Googling something and clicking on the results. Human driven AI searching needs to be in a different box than AI scraping for training data.

      Which sounds extremely difficult to differentiate

      • JoshTriplett 1 hour ago
        Hopefully it stays that way; "a bot acting on my behalf" is still a bot. At least it's often a well-behaved bot and uses a user-agent that can be detected and blocked.
    • Gander5739 1 hour ago
      You don't need a non-rooted phone to pass captcha checks, I have a rooted phone and can pass the captchas that ask you to scan a qr code. But I doubt phones without google services would manage.
    • spacedoutman 1 hour ago
      Private invite only internets
    • csomar 1 hour ago
      They are not a problem unless you "believe" it is a problem. I estimate around 20-25K hits to my website from bots per day and I have all cloudflare protections disabled. Any decently optimized server should be able to easily handle that. (it's roughly 1 request every 3 seconds).
      • specialp 1 hour ago
        Yes and that is just the bot background radiation of the internet. I run a primary source of information site and these botnets are aggressive to a DDOS level. All to do some sort of scraping. Because they have sophisticated enough tactics to DDOS us if they wanted to. However I am not sure their objective as they have wasted enough of our resources to have scraped all our content 1000s of times over. That 25k traffic is a couple of minutes for us. And that adds up. 80-90pct of our traffic is this
      • thisislife2 1 hour ago
        True. But it still wastes your server resources, right? And it's sad that you have to accept that as part of the "cost" of hosting a site ...
        • ndriscoll 47 minutes ago
          What resources are you concerned about? An n100 minipc should be capable of serving something like a blog at 20k+ requests/second (or saturating its network).
    • doctorpangloss 1 hour ago
      web environment integrity
    • malka1986 1 hour ago
      > keeping out bot

      You can forget about it. It is not possible. Simple as that.

      • Wowfunhappy 1 hour ago
        Let's say I'm selling concert tickets. How do I prevent bots from buying up all the tickets and scalping them?
        • ranguna 15 minutes ago
          Do it like plane tickets do, tie a ticket to an identity + buyback up to a week or so before the concert in case someone wants to cancel (or authorize the transfer and capture only a week before). Ask for ID and ticket at the entrance.
        • ndriscoll 41 minutes ago
          Sell them via a Dutch auction. Eliminate the arbitrage opportunity for scalpers and make more money in the process.
        • MyMemoryfails 1 hour ago
          I'd simply check filling speed, even with browser's autocomplete humans are slow due needing click submit.

          Then when it's "processing", do them in bulk and prioritize slower users. There's huge opportunity do bot checks after checkout without affecting user experience.

          Also on product launches you could add unique field which requires user to input, for example that way bots can't prepare for launches.

          • fragmede 54 minutes ago
            huh. no wonder my password manager's auto submit triggers bot detection (it's a fairly popular one).
        • luckylion 1 hour ago
          Tie them to the buyer's identity, offer at-value buy-backs until X weeks before event, disallow resale.
  • nulledy 2 hours ago
    As turnstile users on several of our sites, I think we need to revisit that decision.
    • sammy2255 1 hour ago
      Out of curiosity, why did you have it on in the first place?
      • nulledy 22 minutes ago
        Bot rejection for contact forms. Better UX than reCaptcha.
  • bflesch 42 minutes ago
    Firefox has so much built-in tracking it seems they want to push me to build my own browser. For example every time you open the settings there are several ways they are sending out pings to certain extensions.

    Also by default addons.mozilla.org is a privileged site so of course they include google tracking in it and they get the proper fingerprint no matter what you have configured.

  • Fokamul 1 hour ago
    Please, anyone from EU (US is doomed rofl) create a petition to ban browser-fingerprinting in EU, across all existing browsers.

    I'm not good at creating petitions but can happily sign it. Also with stop killing games and anti-chat control.

    I can imagine this can get a traction, if it's explained in youtube video to "normal" people.

    • fidotron 1 hour ago
      A better solution would be to make webgl, webgpu and (especially) webrtc have some sort of prompt before they can be in any way used in that fashion, but this will absolutely destroy web ux Windows Vista style.
      • JoshTriplett 55 minutes ago
        And then the gatekeepers like Cloudflare will say "please hit accept in order to verify your browser and access this site".
      • richwater 1 hour ago
        You mean the "Accept Cookies" banner that has become a complete joke? Pass
        • MyMemoryfails 1 hour ago
          I think he means browser permissions, for example when browsers want notify or record your mic theres a permission check something similar for webgl.
          • J-Kuhn 51 minutes ago
            Fun Fact: When Cookies were introduced into Netscape, you got a browser permission prompt. Then browser vendors set it to allow by default.

            And then legislation required those consent boxes back, so everyone built their own, instead of demanding that the default should be changed back.

        • bflesch 36 minutes ago
          It's about explicitly deciding to allow certain capabilities on a per-website basis. No major browser allows defense-in-depth via fine-grained website permissions.

          Even simply changing the user agent was sabotaged at Firefox, and choosing one user agent per domain is wishful thinking.

    • koolala 1 hour ago
      a. Accept All

      b. Accept Only Necessary Fingerprinting

  • anonym29 1 hour ago
    Say no to malware - say no to Cloudflare
  • shevy-java 50 minutes ago
    I wondered about that too. So they allege that bots require that everyone now has to ID to the big service providers. Very dystopian situation. Skynet is currently winning the war.
  • 348752389 1 hour ago
    [dead]
  • kykat 1 hour ago
    What? Big tech company is evil? No way! I thought cloudflare were good guys...
    • aleksandrm 1 hour ago
      What gave you the impression that Cloudflare were the good guys?
      • tardedmeme 1 hour ago
        Probably everyone on HN singing their praises for the past 10 years.
        • kykat 1 hour ago
          And my og comment getting downvoted on this very intellectual forum that definitely isn't an echo chamber
          • Petersipoi 46 minutes ago
            Your very sarcastic, uninteresting comment getting downvoted is not an indication that forum isn't intellectual. It's an indication that you aren't behaving intellectually.
          • bflesch 35 minutes ago
            Cognitive dissonance in tech millionaires is quite strong, still worth it to trigger them from time to time on a factual basis.
    • aboardRat4 1 hour ago
      Big tech companies are always visited first by the G-men who need something done.