Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

Stealing Google ReCAPTCHA v3 Challenges

Good evening everyone! --- I think it's time I release some code I've written.

edit: I forgot to add that is is a Python 3.x application.

tl;dr - This script builds a well structured dataset that could absolutely be used for creating a Machine Learning model that can beat Google's ReCAPTCHA v3. --- Just build the data set, run it through a supervised continuous learning algorithm, and you're done.

What the hell is this code?!

The way I decided to try and crack the CAPTCHA was to build a Machine Learning model to fill in the form for me --- I couldn't do this without a proper dataset and I sought after building one from complete scratch.

What the following script does is cleverly uses Selenium with a Gecko driver (Wont work with PhantomJS unfortunately) to navigate around scraping HTML and analyzing it carefully with the BeautifulSoup module to gain access to both the CAPTCHA challenge image and text. It has built in features to handle the "Too many requests" error that you get after loading the CAPTCHA without solving it ~15 times or so.

This script was intended to be deployed to a remove server running continuously for weeks, months, or even a year to hopefully end up with a giant dataset which then in turn would be used somehow to train a ML model.

Why am I releasing this before completing the project?

I simply do not have the time or drive to focus on this right now as I am actually engaging in several professional academic research projects so I hope to touch the heart of one of you here who has the drive to move forward with this. I know it is possible because a professor at a well known university had recently done the exact same thing.

Module for manipulating the Firefox browser and analyzing the page/iframe's source code
CAPTCHA_Digger.py

Main program that handles all calls to the CAPTHA Digger module, this includes the smart time-out handlers etc.
Digger.py

Manages the creation of the file system for the dataset --- basically just automated having to make empty directories and eliminated having to install other small files.
FileInstaller.py

If you are to use this make sure you name all the files as is otherwise it won't run properly.
I suggest throwing it on a server as intended and running it continuously --- But do try to refrain from running it on Google App Engine considering you are attempting to analyze their products in an attempt to possibly crack it.

- I have no responsibility for what you do with this code, my intentions are purely scientific and not malicious of nature at all.
(Sep 18, 2019 10:40 PM)magicparty Wrote:  Good evening everyone! --- I think it's time I release some code I've written.

tl;dr - This script builds a well structured dataset that could absolutely be used for creating a Machine Learning model that can beat Google's ReCAPTCHA v3. --- Just build the data set, run it through a supervised continuous learning algorithm, and you're done.

What the hell is this code?!

The way I decided to try and crack the CAPTCHA was to build a Machine Learning model to fill in the form for me --- I couldn't do this without a proper dataset and I sought after building one from complete scratch.

What the following script does is cleverly uses Selenium with a Gecko driver (Wont work with PhantomJS unfortunately) to navigate around scraping HTML and analyzing it carefully with the BeautifulSoup module to gain access to both the CAPTCHA challenge image and text. It has built in features to handle the "Too many requests" error that you get after loading the CAPTCHA without solving it ~15 times or so.

This script was intended to be deployed to a remove server running continuously for weeks, months, or even a year to hopefully end up with a giant dataset which then in turn would be used somehow to train a ML model.

Why am I releasing this before completing the project?

I simply do not have the time or drive to focus on this right now as I am actually engaging in several professional academic research projects so I hope to touch the heart of one of you here who has the drive to move forward with this. I know it is possible because a professor at a well known university had recently done the exact same thing.

Module for manipulating the Firefox browser and analyzing the page/iframe's source code
CAPTCHA_Digger.py

Main program that handles all calls to the CAPTHA Digger module, this includes the smart time-out handlers etc.
Digger.py

Manages the creation of the file system for the dataset --- basically just automated having to make empty directories and eliminated having to install other small files.
FileInstaller.py

If you are to use this make sure you name all the files as is otherwise it won't run properly.
I suggest throwing it on a server as intended and running it continuously --- But do try to refrain from running it on Google App Engine considering you are attempting to analyze their products in an attempt to possibly crack it.

- I have no responsibility for what you do with this code, my intentions are purely scientific and not malicious of nature at all.

I'll be checking this out.
Brilliant work, and logical.
Thanks for sharing. I'm going to mark this to come back to soon and give it some further consideration.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by killakally3Sep 26, 2023 07:25 AM 2 166 Sep 26, 2023 07:25 AM
Last Post: ILovePizza
[C] by SIM-4725719Jul 9, 2020 06:25 PM 13 404 Jul 9, 2020 06:25 PM
Last Post: SIM-4725719
[.NET] by xx1ben99xxApr 7, 2020 02:45 PM 10 300 Apr 7, 2020 02:45 PM
Last Post: xx1ben99xx