Reverse engineering du système anti-bot de Google Reverse engineering of Google's anti-bot system
Janvier 2026 - Version 41 January 2026 - Version 41
Powered by RESONEOBotGuard est le système de protection anti-bot propriétaire de Google, connu en interne sous le nom de "Web Application Attestation" (WAA). Introduit vers 2013, il est aujourd'hui intégré dans la quasi-totalité des services Google : YouTube, Google Search, reCAPTCHA v3, Google Maps, et bien d'autres.
Contrairement aux CAPTCHAs traditionnels qui demandent une interaction explicite, BotGuard opère de manière totalement invisible. Il collecte en permanence des signaux comportementaux (mouvements de souris, frappes clavier, patterns de scroll, timing des interactions) et les analyse via des algorithmes statistiques sophistiqués pour distinguer un humain d'un bot.
Le script génère un token cryptographique envoyé aux serveurs Google pour validation. Ce token est chiffré avec un algorithme ARX dont la constante magique change régulièrement, rendant toute tentative de contournement par reverse engineering rapidement obsolète.
Cette analyse est basée sur la version 41 du script BotGuard, extrait et déobfusqué à partir des données de challenge. Le code s'exécute dans une machine virtuelle bytecode avec 512 registres pour résister au reverse engineering.
Dans sa plainte contre SerpApi, Google a révélé l'existence de ce système sous le nom de "SearchGuard", vraisemblablement le nom interne de BotGuard pour la protection de Google Search.
"SearchGuard is the product of tens of thousands of person hours and millions of dollars of investment."
Cette déclaration illustre l'importance stratégique de ce système de protection pour Google et les ressources considérables investies dans son développement.
BotGuard is Google's proprietary anti-bot protection system, internally known as "Web Application Attestation" (WAA). Introduced around 2013, it is now integrated into virtually all Google services: YouTube, Google Search, reCAPTCHA v3, Google Maps, and many others.
Unlike traditional CAPTCHAs that require explicit interaction, BotGuard operates completely invisibly. It continuously collects behavioral signals (mouse movements, keystrokes, scroll patterns, interaction timing) and analyzes them using sophisticated statistical algorithms to distinguish humans from bots.
The script generates a cryptographic token sent to Google servers for validation. This token is encrypted with an ARX cipher whose magic constant changes regularly, making any bypass attempt through reverse engineering quickly obsolete.
This analysis is based on version 41 of the BotGuard script, extracted and deobfuscated from challenge data. The code runs in a bytecode virtual machine with 512 registers to resist reverse engineering.
In its complaint against SerpApi, Google revealed the existence of this system under the name "SearchGuard", presumably the internal name for BotGuard protecting Google Search.
"SearchGuard is the product of tens of thousands of person hours and millions of dollars of investment."
This statement illustrates the strategic importance of this protection system for Google and the considerable resources invested in its development.
Informations clés extraites du code source, vérifiées par analyse statique.
Key information extracted from source code, verified through static analysis.
| Propriété Property | Valeur Value | Status |
|---|---|---|
| Nom Name | BotGuard (Google) | Vérifié Verified |
| Version | xo.m = 41 |
Vérifié Verified |
| Namespace | window.botguard / xo |
Vérifié Verified |
| Constructeur principal Main Constructor | xo.bg (alias LU) |
Vérifié Verified |
| Fonction auxiliaire Auxiliary Function | xo.a (alias Pn) |
Vérifié Verified |
| Factory challenge | xo.fcn_ |
Vérifié Verified |
| Licence License | Apache-2.0 (SPDX) | Vérifié Verified |
Les quatre piliers fonctionnels de BotGuard pour détecter les comportements automatisés.
The four functional pillars of BotGuard for detecting automated behavior.
Capture les mouvements souris, frappes clavier, scroll, et touch events avec timing précis.
Captures mouse movements, keystrokes, scroll, and touch events with precise timing.
Génère une empreinte unique basée sur le navigateur, l'environnement, et les interactions.
Generates a unique fingerprint based on browser, environment, and interactions.
Produit un token chiffré prouvant l'humanité de l'utilisateur aux serveurs Google.
Produces an encrypted token proving user humanity to Google servers.
S'exécute dans une machine virtuelle bytecode pour résister au reverse engineering.
Runs in a bytecode virtual machine to resist reverse engineering.
Séquence d'exécution complète, de l'initialisation à la génération du token final.
Complete execution sequence, from initialization to final token generation.
xo.fcn_(challenge...)zV() - Setup initialpuB, CDOMContentLoadedmL() - Boucle VMUb()J$/ARX"!XXXX..."xo.fcn_(challenge...)zV() - Initial SetuppuB, CDOMContentLoadedmL() - VM Main LoopUb()J$/ARX"!XXXX..."Méthodes utilisées pour rendre le code difficile à analyser et à reproduire.
Methods used to make the code difficult to analyze and reproduce.
Pratiquement toutes les fonctions utilisent une machine à états rendant le flux de contrôle difficile à suivre :
Virtually all functions use a state machine making the control flow difficult to follow:
Le code utilise des expressions bitwise équivalentes à des opérations simples :
The code uses bitwise expressions equivalent to simple operations:
| Expression obfusquée Obfuscated Expression | Equivalent Equivalent |
|---|---|
-~x | x + 1 |
~x + 2 | -x + 1 |
(a|b) - (a&b) | a ^ b (XOR) |
-~(a&b) + 2*(a^b) + (~a^b) | a + b |
(a|0) - 2*(a&b) - ~a + ~b | a - b |
Toutes les variables significatives sont renommées en identifiants courts et obscurs :
All meaningful variables are renamed to short, obscure identifiers:
| Variable | Signification Meaning |
|---|---|
Mv |
ID unique pour event listeners Unique ID for event listeners |
yw |
Compteur de listeners Listeners counter |
iN |
Marqueur "listenable" "Listenable" marker |
hf |
Valeurs ARIA par défaut Default ARIA values |
nd |
Options d'événements Event options |
Structure interne du code : classes, registres VM et organisation de la mémoire.
Internal code structure: classes, VM registers and memory organization.
Arbre d'héritage des classes principales, de la base OT aux composants UI.
Inheritance tree of main classes, from base OT to UI components.
Les 18 registres indexés utilisés par la VM pour stocker l'état d'exécution.
The 18 indexed registers used by the VM to store execution state.
| Index | Nom Name | Description |
|---|---|---|
510 | IP | Instruction Pointer |
152 | SP | Stack Pointer |
508 | ERROR | Registre d'erreur Error register |
498 | STATUS | Status flags |
468 | BUFFER | Buffer de données Data buffer |
302 | OUTPUT | Buffer de sortie Output buffer |
256 | INPUT | Buffer d'entrée Input buffer |
448 | HISTORY | Historique History |
130 | METRICS | Métriques Metrics |
117 | KEY | Clé de chiffrement Encryption key |
51 | CRYPTO | État crypto Crypto state |
Organisation des propriétés de l'objet contexte créé à l'initialisation.
Organization of the context object properties created at initialization.
g: "create"Lu: "toString"h: ErreurErrorh$: Dernier timestampLast timestampW: Compteur généralGeneral counter (1)T: Flag touch (false)H: Flag hover (false)A: Accumulateur tempsTime accumulator (0)S: Stack []O: Registres/mémoireRegisters/memory []K: Bytecode principalMain bytecodev: Taille bytecodeBytecode size (0)pu: Bytecode décodéDecoded bytecode []fz: Données initialesInitial data []Nq: Queue callbacksCallbacks queue []Gn: Historique timingsTimings history []Algorithme cryptographique propriétaire utilisé pour générer et protéger les tokens.
Proprietary cryptographic algorithm used to generate and protect tokens.
Le cipher utilisé est similaire à Speck de la NSA - un cipher ARX (Add-Rotate-XOR) léger et rapide.
The cipher used is similar to the NSA's Speck - a lightweight and fast ARX (Add-Rotate-XOR) cipher.
Paramètres techniques du cipher : taille de bloc, rotations et nombre de rounds.
Technical cipher parameters: block size, rotations and number of rounds.
| Paramètre Parameter | Valeur Value |
|---|---|
| Taille de bloc Block size | 64 bits (2 x 32 bits) |
| Taille de clé Key size | 64 bits |
| Nombre de rounds Number of rounds | 15 |
| Rotation droite Right rotation | 8 bits |
| Rotation gauche Left rotation | 3 bits |
| Constante Constant | 3328 |
Implémentation reconstruite du cipher après déobfuscation du code source.
Reconstructed cipher implementation after source code deobfuscation.
Chaîne de traitement des données, de l'IV aléatoire à la compression finale.
Data processing chain, from random IV to final compression.
Découverte majeure : La constante magique du cipher n'est pas fixe ! Elle change régulièrement avec chaque rotation du script. Cela rend obsolète toute tentative de contournement basée sur le reverse engineering d'une version antérieure.
Major finding: The cipher's magic constant is not fixed! It changes regularly with each script rotation. This makes any bypass attempt based on reverse engineering a previous version obsolete.
| Timestamp | Script Hash | Constante magique Magic Constant |
|---|---|---|
| 16:04:21 | Cp_4f0VEzU-X... | 1426 |
| 16:24:06 | V3ebOGDdmYS... | 3328 |
| Rotation régulière du script Regular script rotation | ||
Le script BotGuard est servi depuis une URL avec hash d'intégrité : //www.google.com/js/bg/{HASH}.js. Ce hash change régulièrement, invalidant le cache et forçant le téléchargement de la nouvelle version.
The BotGuard script is served from a URL with integrity hash: //www.google.com/js/bg/{HASH}.js. This hash changes regularly, invalidating cache and forcing download of the new version.
Google expose BotGuard via un service gRPC-Web interne :
Google exposes BotGuard via an internal gRPC-Web service:
Signaux comportementaux analysés pour distinguer humains et bots.
Behavioral signals analyzed to distinguish humans from bots.
Quatre catégories de comportements surveillés en temps réel.
Four categories of behaviors monitored in real-time.
Trajectoire, vélocité, accélération, jitter. Un mouvement "parfait" (linéaire, vitesse constante) est suspect.
Trajectory, velocity, acceleration, jitter. A "perfect" movement (linear, constant speed) is suspicious.
Temps de pression (70-150ms normal), intervalle entre touches, taux d'erreurs, rythme de frappe.
Press duration (70-150ms normal), key intervals, error rate, typing rhythm.
Amplitude, direction, timing, fluidité. Un scroll par incréments fixes est suspect.
Amplitude, direction, timing, smoothness. Scrolling in fixed increments is suspicious.
Variance des intervalles, précision du timer, anomalies temporelles.
Interval variance, timer precision, temporal anomalies.
Liste complète des 101 balises HTML trackées, extraite du code source.
Complete list of 101 tracked HTML tags, extracted from source code.
Structure : ARTICLE, SECTION, NAV, ASIDE, HEADER, FOOTER, MAIN, DIV
Structure: ARTICLE, SECTION, NAV, ASIDE, HEADER, FOOTER, MAIN, DIV
Headings : H1, H2, H3, H4, H5, H6, ADDRESS
Headings: H1, H2, H3, H4, H5, H6, ADDRESS
Texte : P, HR, PRE, BLOCKQUOTE, EM, STRONG, SMALL, S, CITE, Q, DFN, ABBR, DATA, TIME, CODE, VAR, SAMP, KBD, SUB, SUP, I, B, U, MARK, BDI, BDO, SPAN, BR, WBR, INS, DEL
Text: P, HR, PRE, BLOCKQUOTE, EM, STRONG, SMALL, S, CITE, Q, DFN, ABBR, DATA, TIME, CODE, VAR, SAMP, KBD, SUB, SUP, I, B, U, MARK, BDI, BDO, SPAN, BR, WBR, INS, DEL
Ruby : RUBY, RB, RT, RTC, RP
Ruby: RUBY, RB, RT, RTC, RP
Listes : OL, UL, LH, LI, DL, DT, DD
Lists: OL, UL, LH, LI, DL, DT, DD
Tableaux : TABLE, CAPTION, COLGROUP, COL, TBODY, THEAD, TFOOT, TR, TD, TH
Tables: TABLE, CAPTION, COLGROUP, COL, TBODY, THEAD, TFOOT, TR, TD, TH
Formulaires : SELECT, DATALIST, OPTGROUP, OPTION, OUTPUT, PROGRESS, METER, FIELDSET, LEGEND, BUTTON, INPUT (priorité haute)
Forms: SELECT, DATALIST, OPTGROUP, OPTION, OUTPUT, PROGRESS, METER, FIELDSET, LEGEND, BUTTON, INPUT (high priority)
Médias : FIGURE, FIGCAPTION, PICTURE, PARAM, TRACK, MAP, CANVAS
Media: FIGURE, FIGCAPTION, PICTURE, PARAM, TRACK, MAP, CANVAS
Interactif : DETAILS, SUMMARY, MENU, DIALOG, SLOT
Interactive: DETAILS, SUMMARY, MENU, DIALOG, SLOT
Obsolètes : FONT, CENTER, ACRONYM, BASEFONT, BIG, DIR, HGROUP, STRIKE, TT, NOBR (détection de tooling)
Obsolete: FONT, CENTER, ACRONYM, BASEFONT, BIG, DIR, HGROUP, STRIKE, TT, NOBR (tooling detection)
Événements écoutés avec l'option {passive: true, capture: true}.
Events listened with {passive: true, capture: true} option.
| Catégorie Category | Événements Events | Données collectées Collected Data |
|---|---|---|
| Mouse | mousemove, mousedown, mouseup, click, dblclick |
Coordonnées, timing, bouton Coordinates, timing, button |
| Keyboard | keydown, keyup, keypress |
Timing inter-touches, séquences Inter-key timing, sequences |
| Touch | touchstart, touchend, touchmove |
Points de contact, pression Contact points, pressure |
| Scroll | scroll, wheel |
Vélocité, direction, amplitude Velocity, direction, amplitude |
| Focus | focus, blur, focusin, focusout |
Cible, durée Target, duration |
| Visibility | visibilitychange |
document.hidden |
| DOM | DOMContentLoaded, load |
Timing de chargement Load timing |
Propriétés du navigateur et de l'environnement collectées pour créer une empreinte unique.
Browser and environment properties collected to create a unique fingerprint.
userAgentlanguage / languagesplatformhardwareConcurrencydeviceMemorymaxTouchPointswidth / heightavailWidth / availHeightcolorDepthpixelDepthdevicePixelRatioperformance.now()performance.timeOrigintiming.navigationStartdocument.hiddenvisibilityStatereadyStatehasFocus()Valeurs limites déduites de l'analyse du code pour chaque métrique.
Threshold values inferred from code analysis for each metric.
| Métrique Metric | Valeur Normale Normal Value | Seuil Bot Bot Threshold |
|---|---|---|
| Mouse velocity variance | 50-500 | < 10 |
| Key press duration variance | 20-50ms | < 5ms |
| Click interval variance | 100-1000ms | < 20ms |
| Event count / second | 10-50 | > 200 |
| Scroll delta variance | 20-100px | < 5px |
Propriétés JavaScript vérifiées pour détecter Selenium, Puppeteer et autres outils.
JavaScript properties checked to detect Selenium, Puppeteer and other tools.
Méthode statistique pour calculer la variance en temps réel avec un minimum de mémoire.
Statistical method to calculate variance in real-time with minimal memory.
BotGuard utilise l'algorithme de Welford pour calculer la variance en ligne avec O(1) mémoire :
BotGuard uses the Welford algorithm to calculate online variance with O(1) memory:
Version reconstruite et commentée du script BotGuard v41 après déobfuscation.
Reconstructed and commented version of BotGuard v41 script after deobfuscation.
Note : Ce code est une reconstruction basée sur l'analyse statique. Les noms de fonctions et variables ont été renommés pour la lisibilité. Le code original utilise des identifiants obfusqués comme J$, mL, zV, etc.
Note: This code is a reconstruction based on static analysis. Function and variable names have been renamed for readability. The original code uses obfuscated identifiers like J$, mL, zV, etc.
Correspondance entre les noms obfusqués et leur fonction réelle.
Mapping between obfuscated names and their actual function.
| Obfusqué Obfuscated | Fonction Function | Description |
|---|---|---|
J$ | ARX Cipher | Chiffrement principal Main encryption |
mL | VM Loop | Boucle principale VM Main VM loop |
zV | Setup | Initialisation Initialization |
Eb | encodeUTF8 | Encodage UTF-8 UTF-8 encoding |
Cz | base64Url | Encodage Base64 URL-safe URL-safe Base64 encoding |
ko | generateIV | Génération IV aléatoire Random IV generation |
Bn | mixFunction | Fonction de mélange ARX ARX mix function |
PM | packMessage | Empaquetage du message Message packing |
sT | arrayIndexOf | Recherche dans tableau Array search |
Constantes utilisées pour la communication interne du système.
Constants used for internal system communication.
| Constante Constant | Type | Description |
|---|---|---|
GV | INIT | Initialisation du système System initialization |
dF | TOUCH_EVENT | Événement tactile capturé Captured touch event |
rF | RESULT | Résultat de traitement Processing result |
ak | ASYNC_CALLBACK | Callback asynchrone Async callback |
Kd | DOM_READY | DOM chargé et prêt DOM loaded and ready |
wF | LOAD | Chargement page Page loading |
ke | UPDATE | Mise à jour état State update |
g0 | METRIC | Métrique collectée Collected metric |
XK | EXECUTE | Exécution bytecode Bytecode execution |
Code source reconstruit avec annotations explicatives.
Reconstructed source code with explanatory annotations.
Fichiers disponibles pour analyse approfondie.
Files available for in-depth analysis.
Avertissement : Ce document est à but éducatif uniquement. L'utilisation de ces informations pour contourner des mesures de sécurité peut violer les conditions d'utilisation des services concernés et potentiellement des lois sur la fraude informatique.
Warning: This document is for educational purposes only. Using this information to bypass security measures may violate the terms of service of the concerned services and potentially computer fraud laws.