BotD icon indicating copy to clipboard operation
BotD copied to clipboard

False positive when browser internal pdf is enabled

Open TLeiter opened this issue 2 years ago • 12 comments
trafficstars

In Edge and Chrome if the setting "Open PDF in Chrome/Edge" is enabled (Settings > Privacy and security > Site settings > Additional content settings > PDF documents.), then the value navigator.plugins is empty which evalute the bot test to true.

TLeiter avatar Aug 02 '23 09:08 TLeiter

Tested and not currently fixed.

TLeiter avatar Oct 02 '23 06:10 TLeiter

Tested and not currently fixed.

Can you make sure you are on the latest version? Also please, send me botd snapshot from playgrond https://fingerprintjs.github.io/BotD/main/

xnerhu avatar Oct 02 '23 09:10 xnerhu

Hello,

Hre is the snapshot from the playground:

{"isError":false,"collectionTime":20.199999928474426,"detectionTime":21.299999952316284,"detectionResult":{"bot":true,"botKind":"headless_chrome"},"detectedBot":"headless_chrome","collectedData":{"process":{"state":-1,"error":"BotdError: window.process is undefined"},"userAgent":{"value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","state":0},"appVersion":{"value":"5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","state":0},"rtt":{"value":0,"state":0},"windowSize":{"value":{"outerWidth":2048,"outerHeight":1152,"innerWidth":2048,"innerHeight":1043},"state":0},"pluginsLength":{"value":0,"state":0},"pluginsArray":{"value":true,"state":0},"errorTrace":{"value":"TypeError: Cannot read properties of null (reading '0')\n at errorTrace (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:27921)\n/n) at n. (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:33455)\n/n) at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:21466\n at Object.next (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:21571)\n/n) at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:20487\n at new Promise ()\n at e (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:20232)\n/n) at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:33292\n at Array.map ()\n at n. ([https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:33268)","state":0},"productSub":{"value":"20030107","state":0},"windowExternal":{"value":"object%22,%22state%22:0%7d,%22productSub%22:%7b%22value%22:%2220030107%22,%22state%22:0%7d,%22windowExternal%22:%7b%22value%22:%22%5bobject) External]","state":0},"mimeTypesConsistent":{"value":true,"state":0},"evalLength":{"value":33,"state":0},"webGL":{"value":{"vendor":"WebKit","renderer":"WebKit WebGL"},"state":0},"webDriver":{"value":false,"state":0},"languages":{"value":[["en-US"]],"state":0},"documentElementKeys":{"value":["lang"],"state":0},"functionBind":{"value":"function bind() { [native code] }","state":0},"distinctiveProps":{"value":{"awesomium":false,"cef":false,"cefsharp":false,"coachjs":false,"fminer":false,"geb":false,"nightmarejs":false,"phantomas":false,"phantomjs":false,"rhino":false,"selenium":false,"webdriverio":false,"webdriver":false,"headless_chrome":false},"state":0},"notificationPermissions":{"value":false,"state":0}},"detectorsResults":{"detectAppVersion":{"bot":false},"detectDocumentAttributes":{"bot":false},"detectErrorTrace":{"bot":false},"detectEvalLengthInconsistency":{"bot":false},"detectFunctionBind":{"bot":false},"detectLanguagesLengthInconsistency":{"bot":false},"detectNotificationPermissions":{"bot":false},"detectPluginsArray":{"bot":false},"detectPluginsLengthInconsistency":{"bot":true,"botKind":"headless_chrome"},"detectProcess":{"bot":false},"detectUserAgent":{"bot":false},"detectWebDriver":{"bot":false},"detectWebGL":{"bot":false},"detectWindowExternal":{"bot":false},"detectWindowSize":{"bot":false},"detectMimeTypesConsistent":{"bot":false},"detectProductSub":{"bot":false},"detectDistinctiveProperties":{"bot":false}},"debugData":{"browserEngineKind":"chromium","browserKind":"chrome","documentFocus":true,"mozAppearanceSupport":false,"isAndroid":false,"isDesktopWebKit":false}}

TLeiter avatar Oct 02 '23 09:10 TLeiter

@TLeiter I added support for detecting edge as BrowserKind, so it should fix the issue

xnerhu avatar Nov 05 '23 12:11 xnerhu

We are encountering the same problem using the playground on latest Chrome, Chrome 119, Chrome 116. Steps are the same as the issue author described.

Would you look into it again?

{
  "isError": false,
  "collectionTime": 45.8000000002794,
  "detectionTime": 47.3000000002794,
  "detectionResult": { "bot": true, "botKind": "headless_chrome" },
  "detectedBot": "headless_chrome",
  "collectedData": {
    "process": {
      "state": -1,
      "error": "BotdError: window.process is undefined"
    },
    "android": { "value": false, "state": 0 },
    "browserKind": { "value": "chrome", "state": 0 },
    "browserEngineKind": { "value": "chromium", "state": 0 },
    "documentFocus": { "value": true, "state": 0 },
    "userAgent": {
      "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
      "state": 0
    },
    "appVersion": {
      "value": "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
      "state": 0
    },
    "rtt": { "value": 100, "state": 0 },
    "windowSize": {
      "value": {
        "outerWidth": 1920,
        "outerHeight": 1040,
        "innerWidth": 1920,
        "innerHeight": 953
      },
      "state": 0
    },
    "pluginsLength": { "value": 0, "state": 0 },
    "pluginsArray": { "value": true, "state": 0 },
    "errorTrace": {
      "value": "TypeError: Cannot read properties of null (reading '0')\n    at errorTrace (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:45891)\n    at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:39573\n    at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:38227\n    at Object.next (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:38332)\n    at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:37248\n    at new Promise (<anonymous>)\n    at e (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:36993)\n    at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:39410\n    at Array.map (<anonymous>)\n    at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:39386",
      "state": 0
    },
    "productSub": { "value": "20030107", "state": 0 },
    "windowExternal": { "value": "[object External]", "state": 0 },
    "mimeTypesConsistent": { "value": true, "state": 0 },
    "evalLength": { "value": 33, "state": 0 },
    "webGL": {
      "value": { "vendor": "WebKit", "renderer": "WebKit WebGL" },
      "state": 0
    },
    "webDriver": { "value": false, "state": 0 },
    "languages": { "value": [["ru-RU"]], "state": 0 },
    "documentElementKeys": { "value": ["lang"], "state": 0 },
    "functionBind": {
      "value": "function bind() { [native code] }",
      "state": 0
    },
    "distinctiveProps": {
      "value": {
        "awesomium": false,
        "cef": false,
        "cefsharp": false,
        "coachjs": false,
        "fminer": false,
        "geb": false,
        "nightmarejs": false,
        "phantomas": false,
        "phantomjs": false,
        "rhino": false,
        "selenium": false,
        "webdriverio": false,
        "webdriver": false,
        "headless_chrome": false
      },
      "state": 0
    },
    "notificationPermissions": { "value": false, "state": 0 }
  },
  "detectorsResults": {
    "detectAppVersion": { "bot": false },
    "detectDocumentAttributes": { "bot": false },
    "detectErrorTrace": { "bot": false },
    "detectEvalLengthInconsistency": { "bot": false },
    "detectFunctionBind": { "bot": false },
    "detectLanguagesLengthInconsistency": { "bot": false },
    "detectNotificationPermissions": { "bot": false },
    "detectPluginsArray": { "bot": false },
    "detectPluginsLengthInconsistency": {
      "bot": true,
      "botKind": "headless_chrome"
    },
    "detectProcess": { "bot": false },
    "detectUserAgent": { "bot": false },
    "detectWebDriver": { "bot": false },
    "detectWebGL": { "bot": false },
    "detectWindowExternal": { "bot": false },
    "detectWindowSize": { "bot": false },
    "detectMimeTypesConsistent": { "bot": false },
    "detectProductSub": { "bot": false },
    "detectDistinctiveProperties": { "bot": false }
  },
  "debugData": {
    "browserEngineKind": "chromium",
    "browserKind": "chrome",
    "browserVersion": { "major": 120, "minor": 0 },
    "documentFocus": true,
    "mozAppearanceSupport": false,
    "isAndroid": false,
    "isDesktopWebKit": false,
    "isIPad": true
  }
}

AnastasiaPlague avatar Jan 16 '24 13:01 AnastasiaPlague

AnastasiaPlague

Of course.

xnerhu avatar Jan 16 '24 16:01 xnerhu

If the user sets Download PDFs instead of Open PDFs in Chrome in Chrome, the length of the plugin array will be 0, causing a false positive for headless detection. any solutions? image

hwangzhiming avatar Jul 01 '24 02:07 hwangzhiming

I am also seeing a lot of false positives on the length of the Plugin array being 0. It appears the navigator.plugins array is deprecated anyways: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/plugins

Can this rule be removed for good?

nketkar avatar Jul 23 '24 01:07 nketkar

I'm also running into this one as a user of one of the sites that use this lib, took me a while to figure out why, wish I knew that the lib has a playground :smile:

logs
{"isError":false,"collectionTime":7.300000000745058,"detectionTime":7.400000002235174,"detectionResult":{"bot":true,"botKind":"headless_chrome"},"detectedBot":"headless_chrome","collectedData":{"process":{"state":-1,"error":"BotdError: window.process is undefined"},"android":{"value":false,"state":0},"browserKind":{"value":"chrome","state":0},"browserEngineKind":{"value":"chromium","state":0},"documentFocus":{"value":true,"state":0},"userAgent":{"value":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36","state":0},"appVersion":{"value":"5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36","state":0},"rtt":{"value":50,"state":0},"windowSize":{"value":{"outerWidth":1920,"outerHeight":1051,"innerWidth":1920,"innerHeight":964},"state":0},"pluginsLength":{"value":0,"state":0},"pluginsArray":{"value":true,"state":0},"errorTrace":{"value":"TypeError: Cannot read properties of null (reading '0')\n    at errorTrace (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:45891)\n    at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:39573\n    at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:38227\n    at Object.next (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:38332)\n    at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:37248\n    at new Promise (<anonymous>)\n    at e (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:36993)\n    at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:39410\n    at Array.map (<anonymous>)\n    at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:39386","state":0},"productSub":{"value":"20030107","state":0},"windowExternal":{"value":"[object External]","state":0},"mimeTypesConsistent":{"value":true,"state":0},"evalLength":{"value":33,"state":0},"webGL":{"value":{"vendor":"WebKit","renderer":"WebKit WebGL"},"state":0},"webDriver":{"value":false,"state":0},"languages":{"value":[["en-US"]],"state":0},"documentElementKeys":{"value":["lang"],"state":0},"functionBind":{"value":"function bind() { [native code] }","state":0},"distinctiveProps":{"value":{"awesomium":false,"cef":false,"cefsharp":false,"coachjs":false,"fminer":false,"geb":false,"nightmarejs":false,"phantomas":false,"phantomjs":false,"rhino":false,"selenium":false,"webdriverio":false,"webdriver":false,"headless_chrome":false},"state":0},"notificationPermissions":{"value":false,"state":0}},"detectorsResults":{"detectAppVersion":{"bot":false},"detectDocumentAttributes":{"bot":false},"detectErrorTrace":{"bot":false},"detectEvalLengthInconsistency":{"bot":false},"detectFunctionBind":{"bot":false},"detectLanguagesLengthInconsistency":{"bot":false},"detectNotificationPermissions":{"bot":false},"detectPluginsArray":{"bot":false},"detectPluginsLengthInconsistency":{"bot":true,"botKind":"headless_chrome"},"detectProcess":{"bot":false},"detectUserAgent":{"bot":false},"detectWebDriver":{"bot":false},"detectWebGL":{"bot":false},"detectWindowExternal":{"bot":false},"detectWindowSize":{"bot":false},"detectMimeTypesConsistent":{"bot":false},"detectProductSub":{"bot":false},"detectDistinctiveProperties":{"bot":false}},"debugData":{"browserEngineKind":"chromium","browserKind":"chrome","browserVersion":{"major":127,"minor":0},"documentFocus":true,"mozAppearanceSupport":false,"isAndroid":false,"isDesktopWebKit":false,"isIPad":true}}

Jackenmen avatar Aug 13 '24 00:08 Jackenmen