Evading ML Anomaly Detection
When the Defender Stops Using Rules
Earlier anti-bot systems matched signatures: known datacenter IPs, known headless flags, known bad headers. Modern bot management supplements those rules with machine-learned anomaly detection trained on enormous volumes of real human traffic. You are no longer matching a hardcoded list; you are trying to look like a sample drawn from the human distribution.
What the Model Sees
A supervised or semi-supervised model is trained on features like:
- Fingerprint combinations: canvas hash, WebGL renderer, fonts, screen, timezone, all jointly.
- Request patterns: inter-arrival timing, header order, HTTP/2 frame structure, connection reuse.
- Behavioral sequences: navigation path, dwell times, mouse and keyboard telemetry.
- Population-level statistics: how many requests this IP/subsession makes, and how similar it is to known bots.
- Account and history features: age, prior challenge outcomes, reputation.
The model outputs a score; the WAF escalates challenges when the score is high. The key insight: it is not checking a single value—it is checking whether your combination of values is statistically plausible.
Rare Combinations Are the Tell
Human traffic clusters. A real iPhone user in Tokyo uses a set of fingerprints, fonts, timezones, and languages that co-occur constantly in the training data. A scraped profile that mixes, say, a Chrome-on-Windows fingerprint with a Japanese mobile timezone is individually plausible but jointly rare—and rarity is exactly what anomaly detection flags. This is why consistency matters more than any single perfect value. Aim to reproduce a common, well-represented real-world device profile end to end, not an exotic one.
Rate and Volume Features
Models love volume signals: requests per session, sessions per IP per day, requests to a single endpoint, and deviation from the global inter-arrival distribution. Perfectly regular timing (a fixed sleep) is a strong outlier; genuine human timing is noisy and right-skewed. Distributed, slow crawling with jittered delays and human-shaped session lengths blends with the population far better than high-throughput bursts from a handful of IPs.
Concept Drift
The model is retrained periodically, and the human distribution shifts (new devices, new browser versions, seasonal behavior). A strategy that evaded detection six months ago may score poorly today because the population moved. This is the ML equivalent of signature churn: your camouflage must be refreshed, and you should monitor success rates for gradual decline.
What Actually Helps
- Be a common profile: match a popular device/browser/OS/locale combination exactly, including all its minor idiosyncrasies.
- Be consistent over time: a stable fingerprint across a session; no mid-request mutations.
- Be noisy in timing but human in structure: jittered delays, variable dwell times, natural navigation paths.
- Be modest in volume: stay under per-IP and per-session rate expectations, and distribute across diverse, well-reputed exits.
- Be patient: aged profiles with clean histories score better than fresh ones.
The Honest Limits
You are not "defeating" a well-built ML model permanently. At best you are producing samples that fall within the human distribution for the features the model observes, and you will occasionally land in the tail and get challenged. Treat the model as an adversary you continuously re-measure against, and be honest about when a target's detection is strong enough that evasion stops being economical or ethical. The right answer is sometimes to stop, not to escalate.