Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. WebEngine Nanobrowser not able to pass Antibot Validation

WebEngine Nanobrowser not able to pass Antibot Validation

Scheduled Pinned Locked Moved Unsolved QtWebEngine
webengineantibotturnstilecloudflarewhatasapp
8 Posts 2 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RicTa
    wrote on 5 Oct 2022, 18:37 last edited by
    #1

    While trying Nano Browser, the QT WebEngine demo project, I discovered that it does not pass any of the most used Antibot checks, for example the cloudflare or Akamai ones.
    This is an extremely worrying issue because just this week Cloudflare released to public the new Antibot called Turnstile and it has great advantages compared to Google captcha. Hence people will migrate soon.
    Now, below an example of failure while attempting the login at the same Cloudflare main website.
    CF-pass.png
    Also https://web.whatsapp.com/ , Digital Ocean and others are not working neither.
    I have correlated some behaviour from multiple browsers (using https://browserleaks.com/client-hints as way to check the browser transmitted headers) to try to understand why Nano is triggering the antibot response, although webengine and Nano browser are not at all bot neither scraping tools.
    nanobrowser.png
    as we can see from the values in RED, Nano QT Web Engine browser reply with some very weird values, while all the other browsers (still based on chromium), they transmit legitimate or undefined values and they can pass the antibot checks without any problem.
    My question is, how can we change these values? or even better, by when QT will fix this problem that if now is relatively small, will become huge once the website starts migrating to Cloudflare Turnstile.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JKSH
      Moderators
      wrote on 6 Oct 2022, 05:43 last edited by JKSH 10 Jun 2022, 05:44
      #2

      Hi @RicTa, and welcome!

      If you set a custom user-agent string (see https://doc.qt.io/qt-6/qwebengineprofile.html#setHttpUserAgent ) are you able to get it to pass?

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      R 2 Replies Last reply 6 Oct 2022, 05:58
      0
      • J JKSH
        6 Oct 2022, 05:43

        Hi @RicTa, and welcome!

        If you set a custom user-agent string (see https://doc.qt.io/qt-6/qwebengineprofile.html#setHttpUserAgent ) are you able to get it to pass?

        R Offline
        R Offline
        RicTa
        wrote on 6 Oct 2022, 05:58 last edited by
        #3

        Hi @JKSH thanks for the prompt reply.
        unfortunately the UA seems not to be the core issue for this problem.

        I have tested dozen of UA in the recent months and the results are the following:
        Original QT UA: test failed
        Chromium UA: test failed or passed but after few hours/days the test fails again
        Completely fake UA: initially passed but after few hours/days the test fails again
        Firefox UA: initially passed but after few hours/days the test fails again

        The antibot system is testing hundreds of Browser information and compared with the baseline of other most used browsers.

        I have adapted all the HTTP Request Headers to be equal to chromium and other browser but this was not enough neither.

        The core issue I feel it's in the Browser details that are queried using the Chromium generic API, because Webengine is returning completely empty either unrealistic values. (see red fields in the attached picture in my post).

        R 1 Reply Last reply 6 Oct 2022, 06:14
        0
        • R RicTa
          6 Oct 2022, 05:58

          Hi @JKSH thanks for the prompt reply.
          unfortunately the UA seems not to be the core issue for this problem.

          I have tested dozen of UA in the recent months and the results are the following:
          Original QT UA: test failed
          Chromium UA: test failed or passed but after few hours/days the test fails again
          Completely fake UA: initially passed but after few hours/days the test fails again
          Firefox UA: initially passed but after few hours/days the test fails again

          The antibot system is testing hundreds of Browser information and compared with the baseline of other most used browsers.

          I have adapted all the HTTP Request Headers to be equal to chromium and other browser but this was not enough neither.

          The core issue I feel it's in the Browser details that are queried using the Chromium generic API, because Webengine is returning completely empty either unrealistic values. (see red fields in the attached picture in my post).

          R Offline
          R Offline
          RicTa
          wrote on 6 Oct 2022, 06:14 last edited by
          #4

          An example of HTTP Request header i also had to add is the "Accept-Language" one that was not filled by Webengine but largely needed for the user experience and to pass some antibot checks.
          Below the comparison of some of the HTTP Request headers in different Browsers as per the website:
          https://httpbin.org/headers
          https://browserspy.dk/headers.php

          d8573a13-f8a1-4098-8436-885291474ce0-image.png

          1 Reply Last reply
          0
          • J JKSH
            6 Oct 2022, 05:43

            Hi @RicTa, and welcome!

            If you set a custom user-agent string (see https://doc.qt.io/qt-6/qwebengineprofile.html#setHttpUserAgent ) are you able to get it to pass?

            R Offline
            R Offline
            RicTa
            wrote on 6 Oct 2022, 07:02 last edited by
            #5

            @JKSH
            I might have found something interesting.

            Visiting the page https://51degrees.com/client-hints it's clear how webegine does not make any UA-CH headers visible to the server, hence these "empty" values.

            So the problem could be relatively easy solved if we find a way to let webengine pass the UA-CH values as a normal browser does.

            Any idea?

            1 Reply Last reply
            0
            • J Offline
              J Offline
              JKSH
              Moderators
              wrote on 7 Oct 2022, 06:37 last edited by
              #6

              @RicTa Good detective work! Would you be willing to submit a bug report for this? https://bugreports.qt.io/

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              R 1 Reply Last reply 15 Oct 2022, 10:24
              0
              • J JKSH
                7 Oct 2022, 06:37

                @RicTa Good detective work! Would you be willing to submit a bug report for this? https://bugreports.qt.io/

                R Offline
                R Offline
                RicTa
                wrote on 15 Oct 2022, 10:24 last edited by
                #7

                Hi @JKSH ,
                indeed in the meantime I have open this bug here:
                https://bugreports.qt.io/browse/QTBUG-107451
                please let me know in case I made some mistakes in creating it.
                thanks a lot for you support

                J 1 Reply Last reply 15 Oct 2022, 13:51
                1
                • R RicTa
                  15 Oct 2022, 10:24

                  Hi @JKSH ,
                  indeed in the meantime I have open this bug here:
                  https://bugreports.qt.io/browse/QTBUG-107451
                  please let me know in case I made some mistakes in creating it.
                  thanks a lot for you support

                  J Offline
                  J Offline
                  JKSH
                  Moderators
                  wrote on 15 Oct 2022, 13:51 last edited by
                  #8

                  @RicTa said in WebEngine Nanobrowser not able to pass Antibot Validation:

                  indeed in the meantime I have open this bug here:
                  https://bugreports.qt.io/browse/QTBUG-107451
                  please let me know in case I made some mistakes in creating it.
                  thanks a lot for you support

                  Thanks! Your bug report looks fine to me, and I see that you are having a productive discussion with an engineer who is working on Qt WebEngine.

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved