Skip to content
Account takeover Write-up Intermediate

Utilizing AI Model for Hacking: Bypassing CAPTCHAs using AI leads to Account Takeover | Bug Bounty

The CAPTCHA endpoint had a CORS misconfiguration that allowed any origin to fetch CAPTCHA images, and the CAPTCHA itself was a simple maths problem that an AI model could solve after image preprocessing. An attacker could automate login attempts with solved CAPTCHAs to brute-force credentials and take over accounts.

ph-hitachi Follow

Published on ph-hitachi.medium.com

Leveraging AI for CAPTCHA bypass opens the door to potential vulnerabilities, revealing critical flaws in web security.

Ph.Hitachi, on ph-hitachi.medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the CAPTCHA endpoint reflected arbitrary origins in its CORS headers with credentials allowed, and the CAPTCHA challenge itself was too simple for an AI to solve after basic image processing.

Impact

An attacker could brute-force user credentials and take over accounts, as the CAPTCHA protection was bypassed; the CORS misconfiguration only affects browsers and does not prevent the attack.

What the attacker needed

Network access to the target; ability to run scripts; access to an AI model API

The fix

The CAPTCHA endpoint should validate the Origin header and not reflect arbitrary origins with credentials, and the CAPTCHA should be made harder for AI to solve.

How it was found

  1. Send a request to the CAPTCHA endpoint from an untrusted origin and observe that the CAPTCHA image is returned.
  2. Analyse the authentication endpoint to see it requires username, password, CAPTCHA solution, and CAPTCHA key.
  3. Preprocess the CAPTCHA image (blur, threshold, paint) to improve readability for the AI model.
  4. Use an AI model to extract the maths expression from the image and solve it.
  5. Script the process to fetch a new CAPTCHA, solve it, and attempt a login with a wordlist.
  6. Run a cluster bomb attack with username and password lists, using the solved CAPTCHA for each attempt.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A CAPTCHA is a test meant to be easy for humans but hard for bots, like solving a simple sum. Here, the website let any other website fetch its CAPTCHA images, and the CAPTCHA was just a maths question that an AI could read and solve. That meant a script could keep guessing usernames and passwords without being stopped, potentially breaking into accounts.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

More by ph-hitachi

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.