Skip to content

Advanced browser extension for detecting anti-bot solutions, CAPTCHA services, and web security mechanisms. Identifies 26+ services including Cloudflare, reCAPTCHA, DataDome, PerimeterX & more with confidence scoring.

License

Notifications You must be signed in to change notification settings

scrapfly/Antibot-Detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Scrapfly Security Detection Chrome Extension

Chrome Extension Manifest V3 JavaScript

A powerful browser extension for detecting CAPTCHAs, anti-bot systems and fingerprinting technologies on websites


🎯 Overview

Scrapfly Security Detection is a Manifest V3 Chrome extension that helps security researchers, web developers, and bot detection enthusiasts identify and analyze:

  • CAPTCHAs: reCAPTCHA, hCaptcha, FunCaptcha, GeeTest
  • Anti-bot systems: Cloudflare, Akamai, DataDome, PerimeterX, Shape Security, AWS WAF, and more
  • Fingerprinting techniques: Canvas, WebGL, Audio, Font, WebRTC, and other browser fingerprinting methods

✨ Features

πŸ” Multi-Layer Detection System

  • DOM Analysis: Detects scripts, classes, and HTML elements
  • Network Monitoring: Analyzes cookies, headers, and URLs
  • JavaScript Hooks: Intercepts fingerprinting API calls (Canvas, WebGL, Audio, etc.)
  • Window Properties: Checks for anti-bot objects in the global scope
  • CSS Detection: Identifies protection-specific stylesheets

🎨 Modern UI

  • Real-time Detection: Live detection results with confidence scores
  • Detection History: Track detected systems across browsing sessions
  • Advanced Capture Tools: Specialized tools for reCAPTCHA, Akamai, Imperva, Shape Security, and AWS WAF
  • Intermediate Page Handling: Automatically captures data from challenge pages before redirect (AWS WAF, Shape Security)
  • Rules Editor: Customize and manage detection rules
  • Settings Panel: Configure cache duration, history limits, and URL blacklists

⚑ Performance Optimized

  • Smart Caching: 12-hour detection cache to reduce overhead
  • Pattern Caching: LRU cache for compiled regex patterns (60-80% faster)
  • Early Exit: Stops detection after finding high-confidence matches
  • Lazy Evaluation: On-demand data collection
  • Batched Operations: Optimized DOM traversal and storage writes

πŸ›‘οΈ Privacy & Security

  • No Data Collection: All detection happens locally in your browser
  • CSP Compliant: No inline event handlers or unsafe-eval
  • Context Isolation: Proper separation between page and extension contexts
  • Safe Conditions: Pre-compiled evaluators (no eval/arbitrary code execution)

πŸ“¦ Installation

From Chrome Web Store

Coming soon...

Manual Installation (Developer Mode)

  1. Download the Extension

    git clone https://github.com/diegopzz/Antibot-Detector.git
    cd Antibot-Detector/core
  2. Load in Chrome

    • Open Chrome and navigate to chrome://extensions/
    • Enable Developer mode (top-right toggle)
    • Click Load unpacked
    • Select the core/ folder
  3. Start Detecting

    • Click the extension icon in your toolbar
    • Browse to any website
    • View detected security systems in the popup

πŸš€ Usage

Basic Detection

  1. Navigate to a Website: The extension automatically scans pages
  2. Open Popup: Click the extension icon to view results
  3. View Details: Click on any detection card to see full details
  4. Copy Results: Use the copy button to export detection data

Advanced Capture Tools

reCAPTCHA

  • Start Capture
  • Obtain Selector
  • Extract SiteKey
  • ReCaptcha CallBack

Akamai

  • Start Capture
  • Extract Sensor Data

Imperva

  • Check Cookies
  • Analyze Scripts
  • Start Capture

Shape Security

  • Check Headers
  • Analyze Scripts
  • Start Capturing

AWS WAF

  • Check Cookies
  • Analyze Scripts

Rules Editor

  1. Browse Detectors: View all detection rules by category
  2. Edit Rules: Modify detection patterns, confidence scores, and settings
  3. Add Methods: Create new detection methods (Cookie, Header, URL, Content, DOM, Window, JS Hooks, CSS)
  4. Pattern Options: Configure regex, whole-word, and case-sensitive matching
  5. Import/Export: Share rules via JSON files

Settings

  • Cache Duration: Set detection cache expiry (1-24 hours)
  • History Limit: Control max history items (10-500)
  • URL Blacklist: Exclude specific domains from detection
  • Auto-cleanup: Automatic history expiration

πŸ—οΈ Architecture

Project Structure

core/
β”œβ”€β”€ manifest.json              # Extension configuration (Manifest V3)
β”œβ”€β”€ background.js              # Service worker (message handling, detection)
β”œβ”€β”€ content.js                 # Content script (page data collection)
β”œβ”€β”€ content-main-world.js      # JS hooks installer (MAIN world)
β”œβ”€β”€ popup.js/html/css          # Extension popup UI
β”‚
β”œβ”€β”€ detectors/                 # JSON detector definitions
β”‚   β”œβ”€β”€ antibot/              # Cloudflare, Akamai, DataDome, etc.
β”‚   β”œβ”€β”€ captcha/              # reCAPTCHA, hCaptcha, etc.
β”‚   β”œβ”€β”€ fingerprint/          # Canvas, WebGL, Audio, etc.
β”‚   └── index.json            # Category configuration
β”‚
β”œβ”€β”€ modules/                   # Core managers (singleton pattern)
β”‚   β”œβ”€β”€ detection-engine-manager.js    # Detection orchestration
β”‚   β”œβ”€β”€ detector-manager.js            # Detector CRUD operations
β”‚   β”œβ”€β”€ category-manager.js            # Category metadata
β”‚   β”œβ”€β”€ confidence-manager.js          # Confidence calculations
β”‚   β”œβ”€β”€ notification-manager.js        # Toast notifications
β”‚   β”œβ”€β”€ pagination-manager.js          # Pagination component
β”‚   β”œβ”€β”€ color-manager.js               # Color picker UI
β”‚   └── search-manager.js              # Advanced search
β”‚
β”œβ”€β”€ sections/                  # UI sections (modular architecture)
β”‚   β”œβ”€β”€ detection/            # Detection results tab
β”‚   β”œβ”€β”€ history/              # Detection history tab
β”‚   β”œβ”€β”€ rules/                # Detector rules editor
β”‚   β”œβ”€β”€ settings/             # Settings & configuration
β”‚   └── advanced/             # Advanced capture tools
β”‚       β”œβ”€β”€ base-interceptor-helpers.js    # Service worker utilities
β”‚       β”œβ”€β”€ advanced-utils.js              # Popup UI utilities
β”‚       β”œβ”€β”€ base-advanced-module.js        # Base class for modules
β”‚       └── modules/                        # Detector-specific tools
β”‚           β”œβ”€β”€ recaptcha/
β”‚           β”œβ”€β”€ akamai/
β”‚           β”œβ”€β”€ imperva/
β”‚           β”œβ”€β”€ shapesecurity/
β”‚           └── awswaf/
β”‚
└── utils/                     # Utility functions
    β”œβ”€β”€ utils.js              # Core utilities
    └── debug.js              # Debug logging

Detection Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  1. Page Load                                                β”‚
β”‚     └─> content.js injects content-main-world.js             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  2. Data Collection (content.js)                             β”‚
β”‚     └─> DetectionEngineManager.collectPageData()            β”‚
β”‚         β€’ DOM elements, scripts, classes                     β”‚
β”‚         β€’ Cookies, headers (via background.js)               β”‚
β”‚         β€’ Window properties (via MAIN world)                 β”‚
β”‚         β€’ JS hooks (via MAIN world)                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  3. Detection (background.js)                                β”‚
β”‚     └─> DetectionEngineManager.detectOnPage()               β”‚
β”‚         β€’ Pattern matching against detectors                 β”‚
β”‚         β€’ Confidence score calculation                       β”‚
β”‚         β€’ Results aggregation                                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  4. Storage & Display                                        β”‚
β”‚     └─> Cache results (12-hour expiry)                      β”‚
β”‚     └─> Update popup UI with detections                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Design Patterns

  • Singleton Managers: DetectorManager, CategoryManager for centralized state
  • Event-Driven Communication: postMessage for MAIN ↔ ISOLATED world communication
  • Modular Sections: Each UI section is self-contained (JS + HTML + CSS)
  • JSON-Driven Detectors: All detection rules stored in JSON for easy updates
  • LRU Caching: Pattern cache, URL hash cache for performance
  • Observer Pattern: Real-time updates via Chrome extension messaging

πŸ”§ Development

Prerequisites

  • Google Chrome (latest version)
  • Basic understanding of:
    • Chrome Extension APIs (Manifest V3)
    • JavaScript (ES6+)
    • HTML/CSS
    • Content Script isolation

Setup Development Environment

# Clone repository
git clone https://github.com/diegopzz/Antibot-Detector.git
cd Antibot-Detector/core

# Load extension in Chrome
# 1. Go to chrome://extensions/
# 2. Enable Developer mode
# 3. Click "Load unpacked"
# 4. Select the core/ folder

Development Workflow

  1. Make Changes: Edit files in core/
  2. Reload Extension: Click reload button in chrome://extensions/
  3. Test: Browse to test websites
  4. Debug:
    • Popup: Right-click extension icon β†’ Inspect popup
    • Background: Service worker link in chrome://extensions/
    • Content Script: Regular DevTools on any webpage

Adding a New Detector

  1. Create JSON File: detectors/[category]/[name].json

    {
      "id": "my-detector",
      "name": "My Detector",
      "category": "Anti-Bot",
      "color": "#3B82F6",
      "confidence": 85,
      "lastUpdated": "2025-01-15",
      "version": "1.0.0",
      "icon": "my-detector.png",
      "description": "My custom security system detector",
      "detection": {
        "cookie": [
          {
            "name": "__my_cookie",
            "confidence": 90,
            "description": "Main tracking cookie"
          }
        ],
        "content": [
          {
            "content": "my-security-script.js",
            "confidence": 80,
            "description": "Security script identifier"
          }
        ],
        "url": [
          {
            "pattern": "/security/challenge",
            "confidence": 85
          }
        ]
      }
    }
  2. Test Detection: Reload extension and visit test page

  3. Adjust Confidence: Fine-tune based on false positive rate

Project Guidelines

  • File Naming: Always use lowercase kebab-case (e.g., detector-manager.js)
  • No Build System: Pure JavaScript/HTML/CSS (no transpilation)
  • CSP Compliance: No inline event handlers or unsafe-eval
  • Code Style: ES6+ features, clear variable names, comprehensive comments
  • Performance: Use caching, lazy evaluation, early exit patterns

πŸ“Š Performance Metrics

The extension has been extensively optimized across 8 phases:

  • Detection Speed: 60-80% faster than baseline
  • Memory Usage: 50-70% reduction
  • Pattern Matching: 60-80% faster with LRU cache
  • DOM Operations: 60-70% faster with single-pass tree walk
  • Network Fetching: 5-10x faster with parallel requests
  • Cache Hit Rate: ~80% on typical browsing patterns

🀝 Contributing

Contributions are welcome! Here's how you can help:

Adding New Detectors

  1. Fork the repository
  2. Create a new detector JSON file
  3. Test thoroughly on multiple websites
  4. Submit a pull request with:
    • Detector JSON file
    • Test cases (URLs where it works)
    • Confidence score justification

Bug Reports

Please include:

  • Chrome version
  • Extension version
  • Steps to reproduce
  • Expected vs actual behavior
  • Console logs (if applicable)

Feature Requests

Open an issue with:

  • Use case description
  • Proposed solution
  • Alternative approaches considered

πŸ“œ License

This project is licensed under the Non-Profit Open Software License 3.0 (NPOSL-3.0).

Copyright (c) 2025 Scrapfly

Key Terms

  • βœ… Free to use for personal and non-profit purposes
  • βœ… Modify and distribute with attribution
  • βœ… Create derivative works under the same license
  • βœ… Patent protection for contributors
  • ❌ Commercial use requires separate licensing

Full License

See the LICENSE file for complete terms and conditions.


License

About

Advanced browser extension for detecting anti-bot solutions, CAPTCHA services, and web security mechanisms. Identifies 26+ services including Cloudflare, reCAPTCHA, DataDome, PerimeterX & more with confidence scoring.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published