[Paper Review] Hacking Google reCAPTCHA v3 using Reinforcement Learning
This paper proposes a reinforcement learning (RL) approach to bypass Google reCAPTCHA v3 by modeling mouse movement as a grid-world navigation task. Using a policy gradient method (Reinforce), the agent learns to navigate from random start positions to the reCAPTCHA checkbox with a 97.4% success rate on a 100×100 grid and 96.7% on 1000×1000 resolution, leveraging a divide-and-conquer strategy to generalize across screen sizes without retraining.
We present a Reinforcement Learning (RL) methodology to bypass Google reCAPTCHA v3. We formulate the problem as a grid world where the agent learns how to move the mouse and click on the reCAPTCHA button to receive a high score. We study the performance of the agent when we vary the cell size of the grid world and show that the performance drops when the agent takes big steps toward the goal. Finally, we used a divide and conquer strategy to defeat the reCAPTCHA system for any grid resolution. Our proposed method achieves a success rate of 97.4% on a 100x100 grid and 96.7% on a 1000x1000 screen resolution.
Motivation & Objective
- To investigate whether reinforcement learning can be used to automate bypassing Google reCAPTCHA v3, which operates without user interface and assigns risk scores via ML.
- To model the reCAPTCHA challenge as a Markov Decision Process (MDP) where the agent learns optimal mouse movement to achieve a high trust score.
- To evaluate the impact of grid cell size on agent performance and detectability by reCAPTCHA’s behavioral analysis.
- To develop a scalable solution that generalizes across different screen resolutions without retraining the RL agent for each resolution.
- To simulate human-like interaction by avoiding browser automation tools and headless detection mechanisms.
Proposed method
- Formalize the reCAPTCHA bypass task as a grid-world MDP with state space defined by mouse positions and action space by directional movements (up, down, left, right).
- Use the Reinforce algorithm with policy gradient optimization to train the agent, where the reward is based on the final reCAPTCHA score received after each episode.
- Implement a custom browser environment using PyAutoGUI to control the mouse directly, avoiding detection from browser automation tools like Selenium.
- Introduce a divide-and-conquer strategy: divide large grids into 100×100 sub-grids, apply the trained agent to each segment sequentially to navigate larger screens.
- Control environmental factors such as Google account login status and IP routing to mimic real human behavior and avoid detection.
- Define the episode horizon as twice the diagonal of the grid to allow sufficient steps for navigation without premature termination.
Experimental results
Research questions
- RQ1Can reinforcement learning be effectively applied to bypass reCAPTCHA v3, which lacks a visible challenge and relies on risk scoring?
- RQ2How does the cell size in the grid world affect the agent’s success rate and detectability by reCAPTCHA’s behavioral analysis?
- RQ3Can a single RL agent trained on a 100×100 grid generalize to larger screen resolutions like 1000×1000 without retraining?
- RQ4What environmental factors (e.g., browser automation, account status, IP routing) significantly impact the agent’s ability to receive high reCAPTCHA scores?
- RQ5To what extent does the divide-and-conquer strategy maintain high performance across varying grid resolutions?
Key findings
- The RL agent achieved a success rate of 97.4% on a 100×100 grid, demonstrating high effectiveness in bypassing reCAPTCHA v3.
- On a 1000×1000 grid resolution, the agent maintained a success rate of 96.7%, showing strong generalization across larger screens.
- Increasing the cell size from 1×1 to 10×10 pixels reduced the success rate, with detection as a bot occurring in over 20% of trials at cell size 10, indicating non-human movement patterns.
- The divide-and-conquer strategy enabled the agent to achieve over 90% success rate across multiple tested grid sizes without retraining, proving scalability.
- Using PyAutoGUI for direct mouse control outperformed browser automation tools like Selenium, which triggered reCAPTCHA detection due to automated headers and signals.
- The absence of a Google account and use of standard IP routing improved the likelihood of receiving high reCAPTCHA scores, suggesting that account and network context influence risk assessment.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.