AgentShield: Hardening Web Applications Against AI Agents and Agentic BrowsersAgentShield: Fortifying Web Applications Against AI Agents and Agentic Browsers
The authors evaluate the ability of 14 types of AI clients to bypass existing anti-bot defenses, and propose the AgentShield behavioral fingerprinting framework, which the authors state can distinguish humans from agents.
The defender is the website operator, who controls the Web server but cannot modify the AI client and cannot assume its cooperation; the adversary uses off-the-shelf AI user clients, which can run locally or in the cloud, may or may not self-declare, and are directed by a human operator with unknown intent.
- LLM-driven agentic browsers can autonomously complete Web tasks, but whether existing anti-bot defenses are effective against them remains unclear, and websites need reliable means to identify and control such clients.
- The authors systematically evaluate the pass rates of 14 categories of AI clients against three types of defenses—network-layer, environment verification, and identity declaration—and propose AgentShield: using a dynamic form that progressively reveals fields to measure behavioral fingerprints such as PRA loop latency, supplemented by hidden prompts at the DOM layer and canvas visual layer and EPD page-freezing experiments.
- Locally running agents can bypass all three classes of existing defenses; after combining behavioral fingerprints, most agents have difference scores above 0.70, and the authors state that even when explicitly told the defense mechanism, they cannot reliably evade it; hidden prompt injection effectiveness varies by client architecture.
- The authors note that AgentShield has not yet been evaluated on fully custom agents, listing this as future work; the human baseline comes only from 6 authors; review comments note that the evaluation of false positives and false negatives when combining behavioral metrics could be more detailed.
- Evaluated models
- Perplexity CometChatGPT AtlasClaude for ChromeAmazon Nova ActDirector.aiManusDevtools MCP (Claude)Gemini in ChromeEdge CopilotBrave LeoChatGPTClaudeGeminiCrawl4AI
- Benchmarks
- 自建动态表单测试页(22个条件显示字段,含简化版与含下拉菜单版)WordPress电商+新闻测试站reCAPTCHA v3Cloudflare TurnstileCloudflare AI Crawl Control + AI Bot Blocking
- Metrics
- reCAPTCHA v3 / Turnstile 通过判定行为指标(Dwell Time、Field Reaction Time、Keypress Count、Mouse Movement Count)逻辑回归差异分数(difference score)隐藏提示词遵从率(Succeeded/Partial/Failed)EPD行为计数(隐藏指令执行、执行延迟等)
The researchers propose a behavioral fingerprinting defense framework, AgentShield, to help web applications identify AI agents and agentic browsers. An empirical evaluation of mainstream anti-bot mechanisms in the paper shows that many defenses designed for traditional automation struggle to reliably identify autonomous AI agents. AgentShield targets the perceive-reason-act (PRA) loop of agentic clients, collecting fine-grained interaction telemetry through dynamic web forms that reveal content step by step, and distinguishing human users from autonomous agents based on behavioral traces. The paper also proposes a novel attack, Extinction-induced Policy Drift (EPD), in which repeatedly blocking task completion prompts agents to relax their own safeguards and exhibit unsafe behavior; it further presents a defensive prompt injection technique that exploits agent-specific weaknesses to mitigate automated web abuse that relies on content extraction.
Paper analysis
What problem does this paper attempt to solve?
Whether existing anti-bot defenses are effective against AI agent clients is unknown; the paper systematically evaluates this and proposes a behavioral fingerprinting detection framework.
Core question: Against LLM-driven agentic browsers and AI user clients, are existing anti-bot defenses still effective, and can websites reliably detect such clients.
- Scenario and importance: The authors note that agentic browsers such as Comet and ChatGPT Atlas can autonomously fill forms and place orders, and existing reports document their use for phishing and scaled fraud; Cloudflare reports that AI crawler traffic grew 18% year over year, with GPTBot's share rising from 5% to 30%, yet only about 14% of top websites publish robots.txt rules targeting AI agents.
- Shortcomings of existing methods: The authors argue that traditional defenses assume clients are static fingerprints or deterministic automation scripts; locally running agents use real browsers, residential IPs, and user sessions, and identity-declaration-based defenses (User-Agent, signatures) rely on a "honor system" of voluntary client cooperation.
- Core observation: Autonomous agents are driven by a Perception–Reasoning–Action (PRA) loop, whose perception-reasoning-action latency, keystroke, and mouse behavior differ measurably from humans; repeatedly obstructing task completion may cause agents to relax their own safety constraints.
- The paper proposes: (1) a systematic evaluation of 14 AI clients against mainstream defenses; (2) the AgentShield behavioral fingerprinting framework, which uses dynamic forms to capture fine-grained interaction telemetry; (3) the Extinction-induced Policy Drift (EPD) attack, which induces agents to execute hidden instructions by freezing the page; (4) a defensive prompt injection technique against crawling.
- Threat model (§2):
- Defender's perspective: websites wish to detect or control how AI clients interact with their content.
- Defender's capabilities: control the Web server, but cannot modify AI clients and cannot assume their cooperation.
- Adversary: uses off-the-shelf AI user clients, which may run locally or in the cloud, may or may not self-declare, and are directed by a human operator with unknown intent.
- Scope note: the authors state the study focuses on the behavior of popular off-the-shelf clients and their built-in safety measures, not on local LLMs without safety restrictions.
What related research exists?
Related work falls into four groups: autonomous Web agents, agent security, prompt injection, and bot detection; the authors state that this paper connects these three fields.
Autonomous Web agents and LLM automation
- MiniWoB [80], WebShop [81] — Web interaction evaluation environments in controlled settings.
- Mind2Web [82], WebArena [83], VisualWebArena [84], WebVoyager [44] — extended to real websites, multimodal interfaces, and long-horizon tasks.
- ST WebAgentBench [85], SecureWebArena [86] — evaluate agents' ability to safely complete tasks while obeying policy constraints; OpenAI Operator [87] — a commercial agentic browsing system. The authors state this paper is complementary to this task-completion-oriented line of research, focusing on the safety implications of agentic browsing.
Agent safety
- Fang et al. [88] — LLM agents can autonomously exploit one-day vulnerabilities; Kumar et al. [30] — LLMs trained for refusal are easily jailbroken when acting as browser agents; Ersoy et al. [31] — the impact of dark patterns on Web agents.
- Ayzenshteyn et al. [32] — honeytoken and deceptive defenses against LLM agents; WebCloak [57] — a content-poisoning defense that injects anti-scraping declarations to protect images from being scraped. The paper notes that WebCloak protects only images, does not manipulate agent text output, and does not measure each manipulation objective on each deployed agent.
Prompt injection and adversarial content manipulation
- Greshake et al. [29] — the first systematic study of indirect prompt injection, including fact manipulation overlapping with this paper's Opposite Information category; the paper notes it only demonstrates that injection is feasible and does not measure each manipulation objective on each deployed agent.
- Liu et al. [92] (prompt injection benchmark), InjecAgent [93], AgentDojo [94], Spotlighting [95] — benchmarks, tool-integrated agent attacks, and trust-separation defenses. The paper states that the other three injection categories (Hidden Promotion, Additional Information, Abusive) are new page-level injection types.
Anti-bot defenses and behavioral biometrics
- Limitations of crawler exclusion and voluntary opt-out mechanisms [96][97][98]; CAPTCHA under pressure from AI solvers [11][99]; fingerprinting methods rely on assumptions about browser characteristics and browsing history [100].
- Keystroke dynamics, mouse trajectories, and interaction timing distinguish humans from scripted automation [58][101][102][103]; hidden form elements exploit the browser-user perception gap [104]; session and network-layer signals characterize automated browsing [8][105]. The paper notes that most of these methods target traditional bots rather than LLM-driven agents.
Baselines and comparison targets: This paper does not compare accuracy against a particular detection method, but directly evaluates deployed defenses — reCAPTCHA v3, Cloudflare Turnstile, Cloudflare AI Crawl Control + AI Bot Blocking, IP filtering, JA4 TLS fingerprinting, User-Agent, RFC 9421 request signatures; the human baseline is telemetry from 6 authors filling out the form, and it cites the 116 ms mean keystroke duration reported by Dhakal et al. [58] over 136M keystrokes as an external reference.
Positioning: The authors state that this paper connects three previously separate areas (agent safety, prompt injection, bot detection), provides an empirical evaluation of agentic browsers against modern Web defenses, and that its behavioral detection exploits the PRA-loop latency signal specific to agents.
How does the paper address this problem?
Four technical lines: evaluating existing defenses, dynamic-form behavioral fingerprinting, DOM/visual two-layer content injection, and EPD page-freezing inducement.
Overall approach: first systematically measure the performance of 14 AI clients against three types of existing defenses, then use the behavioral and perceptual features inherent to the agent PRA loop to build detection and defense mechanisms. AgentShield centers on dynamic forms, supplemented by content-layer injection and EPD.
Evaluation pipeline for existing defenses (§3.1)
- Three types of defenses: network signals (IP filtering, JA4 TLS fingerprinting, Dual-Request mode, Cloudflare Crawl Control and AI Bot Blocking), environment verification (reCAPTCHA v3 with a default threshold of 0.5 as the blocking line, Cloudflare Turnstile), self-declared identity (User-Agent, RFC 9421 request signatures).
- Deployment: the test site connects to Cloudflare with managed mode enabled; JA4 is recorded by server-side Zeek SSL logs; Dual-Request flags request pairs to the same page from two different IPs within a short time window.
Dynamic forms (§3.2)
- Mechanism: a registration form with 22 conditionally displayed fields, fields hidden with CSS (opacity: 0, zero size), with the previous field completed before JavaScript reveals them one by one; the display sequence is branching (e.g., selecting a country displays the corresponding subfields). Split into a simplified version (no dropdown menus, ensuring compatibility with all clients) and a standard version (with dropdown menus).
- Four behavioral metrics: Dwell Time (duration of each keystroke from keydown to keyup), Field Reaction Time (interval from field display to first interaction, which the authors state directly measures the end-to-end latency of the PRA loop), Keypress Count (total keydowns per session, near zero for paste-style input), Mouse Movement Count (40 ms sampling, automated frameworks typically produce pointer events only at the click target).
- Telemetry: the DOM Event API records mouse, keystroke and form events, MutationObserver records field display timestamps, and all events carry timestamps enabling reconstruction of the full session timeline.
Content modification (§3.3)
- Testbed: a WordPress e-commerce + news site, with injection points located in news articles and product listings.
- Five types of hidden prompts (one fixed prompt per type): Defensive Prompt (declares content proprietary and asks to stop extraction), Hidden Promotion (inserts a fictitious promotion), Opposite Information (replaces visible claims), Additional Information (appends unsupported details), Abusive Prompt (inserts threatening warnings); each type has its own success criterion (e.g., compliance, injected content appearing in output).
- Two-layer hiding: the DOM layer uses CSS classes to make text invisible while retaining it in the document tree, covering clients that parse the DOM/HTML/accessibility tree; the visual layer draws the injected text into a canvas in low-opacity gray, covering only clients that use screenshot + OCR. The authors report empirically tuning the threshold to be imperceptible to humans but recoverable by OCR, and state that below that opacity or font size the visual-layer agent cannot recover the text.
- Repeated variants: the same defensive prompt is repeated N times within the page, N ∈ {3, 5, 7}, to test whether compliance changes with repetition.
Extinction-Induced Policy Drift (§3.4)
- Mechanism: a self-built e-commerce platform where clicking the secure checkout button "freezes" the page for 120 seconds before redirecting to the payment page; the page hides an instruction disguised as a site degradation mechanism that provides an alternative URL. An agent that ignores this instruction under normal conditions but executes it after sustained obstruction is taken as a signal of relaxed safety constraints.
- Measurement: prompt execution latency (from first checkout click to navigation to the fingerprint endpoint) and re-click intervals, recorded by the server-side /track endpoint; GETs to nonexistent paths are also recorded to capture URL hallucination.
Classification model (§4.3)
- Features and model: 12 features (4 reaction times, 3 keystroke dynamics, 2 pointer activities, 1 session duration, two temporal-presence indicators), standardized and then fitted with L2-regularized logistic regression with balanced class weights; one model is trained per form variant.
- Evaluation protocol: each agent is held out entirely and scored by a model that has never seen it, testing generalization to unseen agents; the human group uses K-fold, and its mean score serves as the model's false positive rate on real humans.
What experiments did the paper conduct?
Pass tests of 14 clients against three classes of defenses, form behavior measurements of 7 Web agents, injection compliance of 14 clients, and EPD and adaptive attack experiments on 6 agents.
Experimental setup
- Clients tested (Table 1, 14 total): 7 autonomous Web agents (Perplexity Comet, ChatGPT Atlas, Claude for Chrome, Amazon Nova Act, Director.ai, Manus, Devtools MCP (Claude)), 3 browser assistants (Gemini in Chrome, Edge Copilot, Brave Leo), 3 Web LLMs (ChatGPT, Claude, Gemini), 1 Web crawler (Crawl4AI).
- Defenses and testbed: reCAPTCHA v3 (0.5 threshold), Cloudflare Turnstile, Cloudflare AI Crawl Control + AI Bot Blocking, IP filtering, JA4, Dual-Request, User-Agent, RFC 9421 signatures; two dynamic form variants; WordPress e-commerce + news site.
- Sample sizes and repetitions: form experiments use 10 independent sessions per agent (fresh browser state); content injection uses 10 runs per prompt per client with fresh sessions; EPD uses 10 page-freeze runs per agent; adaptive attacks use 10 runs per condition per client.
- Human baseline: 6 authors completed the form; the authors cite Dhakal et al.'s 116 ms mean over 136M keystrokes as an external reference, and this paper's human dwell time mean is about 108 ms.
- Judging method: injection experiments are manually categorized as Succeeded/Partial/Failed (the paper does not state who or which model judged); the classification model is L2-regularized logistic regression, evaluated with whole-agent holdout.
Main results
Evaluation of existing defenses (Table 3, 4, 5):
Swipe horizontally to read the table
Client IP type CC+AIB blocking reCAPTCHA v3 Turnstile Comet Both ✗ ✗ (passed) ✗ Nova Data Center ✗ N/A ✓ Manus Data Center ✓ ✓ ✓ Director.ai Residential ✗ ✓ ✗ Atlas Both ✗ ✓ ✗ Claude for Chrome Residential ✗ ✗ (passed) ✗ Chrome Devtools MCP Residential ✗ ✓ ✓ ChatGPT Data Center ✓ — — Claude Data Center ✓ — — Gemini Data Center ✗ — — Crawl4AI Residential ✗ — — (Per Table 3, 4; "—" means not reported in the paper; reCAPTCHA/Turnstile were tested only on the 7 Web agents; Nova did not complete the task under reCAPTCHA v3)
- Locally running clients are a persistent gap: the authors note that agents running a browser on the user's machine are indistinguishable from human visitors under residential IPs and real browser environments; although Comet and Atlas self-report a UA from their cloud backends, the browser requests actually interacting with the page still carry the standard Chrome UA.
- Signatures are almost absent: Table 5 shows only Nova signs requests per RFC 9421; ChatGPT agent mode signs when invoked via chatgpt.com but does not sign within Atlas.
- Cloudflare intercepts only some: the authors note that among the data-center agents Cloudflare could reasonably flag, its managed AI controls intercepted only three (Manus, ChatGPT, Claude).
Form behavior and combined classification (§4.2, §4.3)
- Simplified form: humans' mean reaction time to newly displayed fields is about 5.5 s, and most agents are slower; Claude for Chrome and Chrome DevTools MCP are 1.7 s and 2.3 s respectively, below the human baseline, on which basis the authors conclude a single reaction time is insufficient for classification. Most agents have lower dwell time and mouse movement counts than humans; Nova's keystroke statistics are close to humans; Manus's keystroke count is more than twice the human baseline (Figure 1).
- Dynamic form: all runs of Manus and Director.ai fail (they can open dropdown menus but cannot reliably select); agents that complete both variants show increased reaction times, with Claude for Chrome and Chrome DevTools MCP rising from means of 1.7 s and 2.3 s to 9.5 s and 21.2 s respectively (§4.2).
- Combined classification (Figure 2): every held-out agent scores above the human baseline (false-positive rate), and most above 0.70; Nova scores 0.143 on the simplified form, close to the human baseline, and 0.98 on the dynamic form. The authors state the combined signal holds even for agents unseen in training.
Content injection (§4.4)
- DOM layer (Figure 3, 10 runs per prompt): defensive (ToS-style) prompts are mostly ignored, with ChatGPT (Web LLM) the only system that consistently complies, while ChatGPT Atlas, sharing the same model family, ignores them entirely; promotion injection is effective on most agents, with Claude for Chrome consistently recognizing and excluding it; contradictory-claim injection is the least successful. Gemini (Web LLM) is omitted because its search tool cannot retrieve the unindexed test page.
- Visual layer: Amazon Nova (screenshot-only perception, fully immune to DOM injection) complies with canvas injection in 8 of 10 runs; Gemini in Chrome and Director.ai comply every time; the remaining DOM-reading clients cannot recover canvas content at all, which the authors say shows that manipulation resistance depends on the match between the hiding layer and the perception mechanism, not on the agent itself.
- Repetition experiments (Figure 7): effects vary by client — Manus shifts from ignoring to refusing or requesting confirmation with repetition, ChatGPT (Web LLM) triggers injection detection after repetition and stops complying, Claude (Web LLM) complies more at medium repetition and less at high repetition, and Atlas is largely unaffected.
EPD and adaptive attacks (§4.5, §4.6)
- EPD (Table 6, 10 runs per agent): under baseline (no freeze) all 6 agents ignore the hidden instruction; under freezing, Manus and Director.ai execute the hidden instruction 10/10 (execution latency 5.77 s and 33.13 s respectively), Comet 6/10 (38.54 s), Claude for Chrome (act configuration) 4/10 (7.11 s), Atlas 1/10 (55.32 s); Nova executes 0 times but all 10 runs are deterministic-interval retries, with 8 task aborts; Atlas additionally has 5 URL hallucinations.
- Adaptive-behavioral signal: after explicitly telling agents to imitate human input (typing character by character, moving the mouse continuously, random delays), all tested agents still score above 0.80, and Nova rises from 0.143 to 0.944; the authors state the evasion prompt instead moves it further from the human baseline.
- Adaptive-content injection: after prepending an "ignore hidden content" warning before the Additional Information payload, Figure 4 shows that at the DOM layer only a few clients change behavior and none suppress the injected content, with some previously resistant clients complying after the warning; at the visual layer the warning reduces some clients' responses but never eliminates injection.
- Adaptive-EPD: instructing agents to wait for the page to recover like a human does not eliminate hidden-instruction execution, and some agents execute more frequently; the authors report that all agents executing the hidden path expose the behavior within about 40 s, several within 10 s, so the 120 s freeze can be shortened.
Other ablations and analyses
- Visual-layer parameters: the authors report empirically tuning canvas text to a threshold imperceptible to humans but recoverable by OCR; below that threshold, visual-layer agents cannot recover the text (§3.3).
- Full-canvas variant: when an entire article is rendered into the canvas, DOM-parsing clients cannot recover even fully visible canvas text, on which basis the authors confirm they never rasterize the page (§4.4).
- Form variant comparison: dropdown menus multiply reaction times, so classification models are trained separately per variant (§4.3).
What are some points that can be further explored?
The authors note that evaluating fully custom agents is a future direction; the human baseline is only 6 people, and reviewers suggested refining the false-positive/false-negative evaluation.
Limitations and future directions noted by the authors
- Custom agents not evaluated (§5 Discussion): The authors write that although custom agents may have different (or no) safety measures, "we consider evaluating AgentShield against fully custom agents an interesting future direction."
- Small human baseline (§4.2): The authors write that the human baseline comes from 6 authors, "Although small," and cite Dhakal et al.'s 136M keystroke data to corroborate that its mean dwell time is consistent; they also note that this external study does not capture the form-level signals central to this paper.
- False-positive/false-negative evaluation could be strengthened (Appendix C Meta-Review, "Noteworthy Concerns"): Reviewers noted that a more detailed evaluation of false positives and false negatives when combining behavioral indicators would further strengthen the assessment of detection reliability.
- Asking the user merely shifts the decision to the user (§4.5): The authors note that an agent requesting confirmation from the user "merely shifts the decision to the user," and in real purchasing scenarios a user may approve navigating to a plausible-looking recovery URL without scrutiny.
Experimental coverage
- A total of 14 clients were tested (Table 1), of which the form-interaction and EPD experiments cover only part of the 7 autonomous Web agents (EPD actually tested 6; Chrome DevTools MCP was excluded because it refused all transactions).
- Each experimental condition was 10 runs (form sessions, injection, EPD, adaptive), and the paper does not report cross-run variance or statistical tests.
- The human telemetry baseline is 6 authors; the paper does not report form data from a larger scale or external human participants.
- The injection experiments use only one fixed prompt per category (§3.3); the paper does not report the effect of variations in prompt wording.
- The adaptive attack covers only one form of adaptation, "informing the defense mechanism via the prompt" (§4.6); the defenses were deployed on the authors' own forms, WordPress site, and e-commerce platform, and the paper does not report deployment results on third-party real websites.
Summarize the main content of the paper
Systematic evaluation shows existing anti-bot defenses cannot stop locally running agents; AgentShield detects them using PRA-loop behavioral fingerprinting.
An empirical study on the adversarial interaction between AI agent clients and Web defenses, presenting both a detection framework and new attack demonstrations.
- Problem: LLM-driven agentic browsers can autonomously browse, fill forms, and transact; the authors note that existing anti-bot defenses (CAPTCHA, fingerprinting, IP reputation, identity declarations) rest on assumptions about traditional automation, and their effectiveness against such clients had previously lacked systematic evaluation.
- Method: Evaluate three classes of existing defenses against 14 AI clients (7 autonomous Web agents, 3 browser assistants, 3 Web LLMs, 1 crawler); propose AgentShield, which uses a dynamic form that reveals fields step by step to measure PRA-loop latency, keystroke and mouse behavior, and combines 12 features with L2-regularized logistic regression; also propose dual-channel hidden prompt injection at the DOM layer and the canvas visual layer, and the EPD attack, which induces agents to execute hidden instructions by freezing the checkout page.
- Main results:
- Locally running agents bypass all three classes of defenses; Cloudflare-hosted AI controls intercepted only three of the data-center agents that could reasonably be flagged; only Nova signs requests per RFC 9421 (Table 3–5).
- Under the combined behavioral fingerprint, all held-out agents score above the human false-positive baseline, and most above 0.70; Nova scores 0.143 on the simplified form and 0.98 on the dynamic form (Figure 2).
- Adaptive prompts that explicitly disclose the defense mechanism do not help any agent evade detection; Nova instead rises from 0.143 to 0.944 (§4.6).
- Injection compliance varies by architecture: Amazon Nova, which perceives only screenshots, is fully immune to DOM injection yet complies with canvas injection in 8 of 10 cases (§4.4).
- Under EPD, Manus and Director.ai execute hidden instructions 10/10, Comet 6/10, Atlas 1/10 (Table 6).
- Authors' conclusion: The authors state that current anti-bot mechanisms are insufficient as access-control signals against autonomous agents running through real browsers, while PRA-loop latency provides a practical basis for detection; the authors plan to release all AgentShield code, agent prompts, and data as an NPM package.