Bypassing Captcha Like a Boss
The captcha check compared a hidden hash parameter with the user-entered captcha value, and the hash was simply a reversible encoding of the correct answer. An attacker could decode the hash and submit the matching value to bypass the captcha and automate unlimited requests.
{{media:0}}
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.
Context
This is a write-up of a captcha bypass found on a private bug bounty program. The researcher, Ak1T4, does not name the company; the examples use example.com and company.com as placeholders. The affected feature is a subscription form protected by an image captcha. In the researcher's own words, a captcha is mostly used to avoid bots and to ensure that the user behind the application is a real human.
Setup
The work was done against a private program, so no account details, roles or target versions are given. The only tool named in the report is dcipher, described as a tool that decrypts hashes using online rainbow tables (hash toolkit, GromWeb, MD5Hashing) and lookup table attack services. The proof of concept was a Python bot written by the researcher.
Finding it
While mapping the application, the researcher found a subscription endpoint with a captcha filter:
http://example.com/captcha/captchaCheck?
That endpoint led to the source of the page, which contained the following form:
<form action="/captcha/captchaCheck" method="post">
<input name="hash" value="[redacted]" type="hidden">
<input name="emailAddress" value="[redacted]" type="hidden">
<input name="name" value="" type="hidden">
<input name="enteredValue" size="25" type="text">
<input value="Subscribe" type="submit">
</form>
Two parameters stood out: hash, described in the report as an encryption hash, and enteredValue, the number value of the captcha. The researcher filled the captcha and submitted the form to observe how the check behaved, and concluded:
If "hash" == "enteredValue" then Request is Accepted
If "hash" != "enteredValue" then Request is Blocked
So the server accepts the request when the two parameters match. The remaining question was whether the hash could be decrypted.

Exploitation
Step 1: decrypt the hash
The researcher pasted the hash into a terminal and tried to decrypt it with dcipher:
The hash decrypted successfully. The result was a six digit number, and the researcher notes that this number was equal to the captcha shown in the image below:
In other words, the hidden hash field decrypts to the captcha answer, and the answer can be recovered from it through a lookup table.
Step 2: build a bot
With all the pieces in place, the researcher wrote a Python bot as a proof of concept. The report describes its flow as follows:
- First the bot sent a request to the subscription page with the captcha -> https://company.com/captcha/form/?
- Bot scrape on the page and retrieve the 'hash' value param.
- Bot decrypt the Hash (dcipher)
- With decrypted value the bot creates a POST request to http://company.com//captcha/captchaCheck and automatically fills all user form required params with random values (email, name, ipaddress, etc)
- Bot sent the POST request and bypass the captcha

The bot is described as very basic but working. The researcher submitted it to the program together with the following explanation of security impact:
Security Impact
An attacker can create a bot to bypass the captcha and automate the tasks to sent unlimited requests to a multiple urls or lists with random/fake users, emails, IP address.. for spamming or evil purposes (collect data, analyse traffic behaviours, etc)
The program responded in under an hour. The timeline given is:
| Event | Time |
|---|---|
| Submitted | 2018-04-16 03:51:17 UTC |
| Team response with triage and bounty | 2018-04-16 04:48:17 UTC |
The bounty amount is not disclosed in the report; it is shown only as $ xxx.

Root cause
The form ships a hidden hash field that decrypts to the captcha answer, and the server's check is a comparison between that hash and the value the user types into enteredValue. Because the answer space is only six digits, the hash can be reversed with a lookup table, so the client can always compute the correct value without solving the image. The captcha image adds little, since the answer is derivable from the hidden field the server sent to the browser. The report does not describe any server-side session binding, rate limiting or other defence that would have stopped this.
Impact
An attacker can automate the subscription form: fetch the page, read the hash, decrypt it, and post the form with arbitrary values for email, name and IP address. The researcher frames the impact as the ability to send unlimited requests to multiple URLs or lists with random or fake users, emails and IP addresses, for spamming or other purposes such as collecting data or analysing traffic behaviour. The report does not quantify the volume or name any other affected endpoint.
Fix
The report does not say what the program changed. A fix would need to keep the captcha answer on the server and validate it against state tied to the session rather than against a value supplied in the request.
Variants to test
- Look for hidden fields next to a captcha input and check whether the value is a hash of the answer. A positive result is a hash that decrypts to the captcha text.
- Try short numeric captchas (six digits) whose hash appears in the form. A positive result is a lookup table hit on the hash.
- Compare the
hashandenteredValueparameters across submissions. A positive result is acceptance whenever the two match, regardless of the image. - Replay a captured
hashwith the matching value in a scripted loop. A positive result is many accepted submissions without solving any captcha. - Check whether the same hash can be reused for different email or name values. A positive result is a successful subscription with arbitrary data each time.
What happened, in plain words
A security researcher was testing a private bug bounty program, which means a company invited selected researchers to look for security problems in its systems and pays for good findings. The company is not named in the write-up, so the examples use example.com and company.com as stand-ins. The researcher's name is Ak1T4.
The feature involved is a subscription form: a page where a visitor types an email address and a name to sign up, and which is protected by a captcha. A captcha is the small image with distorted letters or numbers that you are asked to copy into a box. Its purpose, as the researcher puts it, is mostly to avoid bots and to ensure that the user behind the application is a real human. A bot is a program that performs actions on a website automatically, far faster than a person could.
The problem was that the page sent a hidden hash to the browser that decrypted to the captcha answer, and that disguise could be undone. Once the answer is known, a program can fill in the form correctly every time without ever looking at the image, which defeats the whole point of the captcha. The researcher built a small bot to prove it, and the company accepted the report and paid a bounty within about an hour.
The setup
Because this was a private program, the report gives no account details, no user roles and no software versions. The only tool named is dcipher, described as a tool that decrypts hashes using online rainbow tables (hash toolkit, GromWeb, MD5Hashing) and lookup table attack services. The proof of concept was a Python bot written by the researcher.
Two ideas are worth explaining before going further, because everything else depends on them.
A hash is the result of feeding some data through a mathematical recipe that always produces the same output for the same input, but from which you are not supposed to be able to work back to the input. Think of it like a fingerprint: it identifies a person, but you cannot rebuild the person from the fingerprint. A rainbow table is a huge pre-computed list of inputs and their hashes, kept so that someone can look up a hash and find the input that produced it. It works like a phone book used in reverse: instead of looking up a name to find a number, you look up a number to find a name. It only works when the set of possible inputs is small enough to list, which matters a lot later.
Finding it
While mapping the application, which means browsing it and noting down its pages and features, the researcher found a subscription endpoint with a captcha filter:
http://example.com/captcha/captchaCheck?
This is a URL: the address of a page on the company's website. example.com is a placeholder domain used in examples, and /captcha/captchaCheck is the path of the page that performs the captcha check. The trailing ? marks the start of the query string, the part of a URL that can carry extra values, though nothing follows it here.
That endpoint led to the source of the page. Every web page is built from source code that your browser downloads and interprets; you can see it in your browser's developer tools. The source contained this form:
<form action="/captcha/captchaCheck" method="post">
<input name="hash" value="[redacted]" type="hidden">
<input name="emailAddress" value="[redacted]" type="hidden">
<input name="name" value="" type="hidden">
<input name="enteredValue" size="25" type="text">
<input value="Subscribe" type="submit">
</form>
Line by line:
<form action="/captcha/captchaCheck" method="post">opens a form.actionsays which page will receive the data when the form is sent, andmethod="post"says the data travels in the body of the request rather than in the URL.<input name="hash" value="[redacted]" type="hidden">is a field calledhashcarrying a long string of letters and digits.type="hidden"means the visitor never sees it on the page, but the browser still sends it with the form. This is the disguised captcha answer.<input name="emailAddress" value="[redacted]" type="hidden">is a hidden field for the email address, pre-filled with a placeholder address.<input name="name" value="" type="hidden">is a hidden field for the name, empty here.<input name="enteredValue" size="25" type="text">is the visible text box where the visitor types what they see in the captcha image.size="25"is just its width on screen.<input value="Subscribe" type="submit">is the button that sends the form.
Two parameters stood out: hash, described in the report as an encryption hash, and enteredValue, the number value of the captcha. A parameter is simply a named value sent with a request, like a labelled box on a form.
The researcher filled the captcha and submitted the form to observe how the check behaved, and concluded:
If "hash" == "enteredValue" then Request is Accepted
If "hash" != "enteredValue" then Request is Blocked
In plain words: the server accepts the request when the two values are equal, and blocks it when they differ. == means "is equal to" and != means "is not equal to". So the server was comparing the typed answer against the value of the hidden field that the browser had just sent back. That is the key observation, because it means the browser holds everything needed to pass the check.
The remaining question was whether the hash could be decrypted, that is, turned back into the original answer.

Exploitation
Step 1: decrypt the hash
The researcher pasted the hash into a terminal and tried to decrypt it with dcipher. A terminal is a text window where you type commands instead of clicking buttons.
The hash decrypted successfully. The result was a six digit number, and the researcher notes that this number was equal to the captcha shown in the image below:
In other words, the hidden hash field decrypts to the captcha answer, and the answer can be recovered from it through a lookup table. The lookup table works here because the answer is only six digits long: there are only one million possible six digit numbers, a small enough set to look up. It is like a thief who cannot pick a lock but owns a key ring with a copy of every key in the building; the lock is only safe if the number of possible keys is enormous.
Step 2: build a bot
With all the pieces in place, the researcher wrote a Python bot as a proof of concept. A proof of concept is a small demonstration that a problem is real, built only far enough to show it works. The report describes its flow as follows:
- First the bot sent a request to the subscription page with the captcha -> https://company.com/captcha/form/?
- Bot scrape on the page and retrieve the 'hash' value param.
- Bot decrypt the Hash (dcipher)
- With decrypted value the bot creates a POST request to http://company.com//captcha/captchaCheck and automatically fills all user form required params with random values (email, name, ipaddress, etc)
- Bot sent the POST request and bypass the captcha
Step by step, and why each one is needed:
- The bot first loads the subscription page, because that is where the server hands out a fresh
hashfor this visit. Skipping this step would leave the bot with nothing to work from. - It then reads the page's source and picks out the
hashvalue. This is called scraping: a program reading a web page the way a person reads it, but automatically, and extracting the parts it needs. - It feeds that hash to dcipher, which looks it up in its tables and returns the original number. This is the step that removes the need to solve the image.
- It builds a POST request to the check page. A POST request is the kind your browser sends when you submit a form: the data travels in the body of the message. The bot fills in the email, name and IP address fields with random values. An IP address is the numeric label that identifies a device on a network.
- It sends the request with the decrypted number in
enteredValue, which matches thehashvalue, so the check passes. The captcha has been bypassed without anyone looking at the image.

The bot is described as very basic but working. The researcher submitted it to the program together with the following explanation of security impact:
Security Impact
An attacker can create a bot to bypass the captcha and automate the tasks to sent unlimited requests to a multiple urls or lists with random/fake users, emails, IP address.. for spamming or evil purposes (collect data, analyse traffic behaviours, etc)
In plain words: because the captcha no longer stops automation, someone can send as many submissions as they like, to one page or many, filled with made-up people and addresses. That is useful for spam, for filling a service with junk data, or for studying how the site reacts to traffic.
The program responded in under an hour. The timeline given is:
| Event | Time |
|---|---|
| Submitted | 2018-04-16 03:51:17 UTC |
| Team response with triage and bounty | 2018-04-16 04:48:17 UTC |
The bounty amount is not disclosed in the report; it is shown only as $ xxx. Triage here means the company's first review of the report, where they confirm the problem is real and decide what to do about it.

Root cause
The form ships a hidden hash field to the browser that decrypts to the captcha answer, and the server's check is a comparison between that hash and the value the user types into enteredValue. Because the answer space is only six digits, the hash can be reversed with a lookup table, so the client can always compute the correct value without solving the image. The captcha image adds little, since the answer is derivable from data the server already sent to the browser. The report does not describe any server-side session binding, rate limiting or other defence that would have stopped this. Session binding would mean tying the answer to one particular visitor's browsing session, and rate limiting would mean refusing too many requests in a short time.
Impact
An attacker can automate the subscription form: fetch the page, read the hash, decrypt it, and post the form with arbitrary values for email, name and IP address. The researcher frames the impact as the ability to send unlimited requests to multiple URLs or lists with random or fake users, emails and IP addresses, for spamming or other purposes such as collecting data or analysing traffic behaviour. The report does not quantify the volume or name any other affected endpoint.
Fix
The report does not say what the program changed. A fix would need to keep the captcha answer on the server and validate it against state tied to the session rather than against a value supplied in the request. In everyday terms: the answer should stay on the server, and the server should remember, for this one visitor, what it expects them to type.
Variants to test
These are the same checks the researcher's approach suggests, written as things to try on other sites:
- Look for hidden fields next to a captcha input and check whether the value is a hash of the answer. A positive result is a hash that decrypts to the captcha text.
- Try short numeric captchas (six digits) whose hash appears in the form. A positive result is a lookup table hit on the hash.
- Compare the
hashandenteredValueparameters across submissions. A positive result is acceptance whenever the two match, regardless of the image. - Replay a captured
hashwith the matching value in a scripted loop. A positive result is many accepted submissions without solving any captcha. - Check whether the same hash can be reused for different email or name values. A positive result is a successful subscription with arbitrary data each time.
Glossary
- Bounty: money a company pays a researcher for reporting a valid security problem.
- Bug bounty program: an arrangement where a company invites researchers to test its systems and rewards findings.
- Private program: a bounty program open only to selected researchers, not to the public.
- Captcha: an image or puzzle meant to be easy for a person and hard for a program, used to slow down bots.
- Bot: a program that performs actions on a website automatically.
- Endpoint: a specific address on a website that accepts requests, such as a page or a form handler.
- URL: the address of a resource on the web.
- Query string: the part of a URL after the
?, used to carry extra values. - Parameter: a named value sent with a request, like a labelled box on a form.
- Form: the part of a web page that collects values and sends them to the server.
- Hidden field: a form field the visitor cannot see but the browser still sends.
- POST request: a request that carries data in its body, typically used when submitting a form.
- Client: the program on your side, usually your browser.
- Server: the computer that runs the website and answers requests.
- Source: the code a browser downloads to build a page, visible in developer tools.
- Hash: the output of a one-way mathematical recipe; the same input always gives the same output, and the input is not meant to be recoverable from it.
- Decrypt: turn disguised data back into its original form.
- Rainbow table: a large pre-computed list of inputs and their hashes, used to look up what produced a given hash.
- Lookup table attack: recovering an original value by searching a pre-computed list rather than by breaking the maths.
- dcipher: the tool named in the report, which decrypts hashes using online rainbow tables and lookup table services.
- Terminal: a text window where you type commands instead of clicking.
- Scraping: a program reading a web page and extracting the parts it needs.
- Proof of concept: a small demonstration built to show that a problem is real.
- IP address: the numeric label identifying a device on a network.
- Triage: a company's first review of a report, confirming the problem and deciding what to do.
- Session: the server's memory of one visitor's ongoing interaction, usually kept via a cookie or token.
- Session binding: tying a check, such as a captcha answer, to one particular visitor's session.
- Rate limiting: refusing or slowing requests when too many arrive in a short time.
- Root cause: the underlying design or coding mistake that makes a problem possible.
- Impact: what an attacker could actually do if the problem is left unfixed.