What it is
Client-side bot detection involves running detection logic within the browser environment, which presents an asymmetry where the code executes in an environment controlled by the attacker, including their CPU, debugger, and clock. This means that any signals used to detect automation, such as mouse kinematics, rendering quirks, or timing jitter, are invisible to the server-side detection system.
How it works
The core challenge is that the code must reside in the page where the bot is operating, as this is the only place the signals exist. Instead of relying on obfuscation to hide the logic, the approach treats obfuscation as a cost, aiming to make reverse-engineering the code worthwhile for the attacker. This is achieved by making the internal encoding and mapping of operations regenerate with every build, ensuring that static signatures extracted from one version do not apply to the next.
A second principle is to avoid branching decisions in critical security checks. Instead of using conditional statements like if (debuggerDetected) { ... }, the system uses cryptography to fold the signal into key material. If the execution environment is legitimate, the derived key is correct; if tampering occurs, the derived key is wrong, causing the program to fail without providing an explicit “caught” flag.
TWSC experience
Not yet tested by TWSC.
Related
- browser-use
- bot-detection-system
- browserbase-chrome
- Google SearchGuard - a live instance of these principles: VM-delivered checks, per-build regeneration, tamper folded into a degraded token
- vm-based-javascript-obfuscation
Sources
The Web Scraping Wiki is compiled from the tests and research published on The Web Scraping Club, the newsletter for web scraping professionals. Subscribe to get the next article in your inbox.