Ambigram Captchas

May 29th, 2009 | By | Category: Products

A Captcha is that warped piece of text that’s supposed to prevent automated systems from registering for email accounts, posting comments on blogs, or buying blocks of tickets for hot concert tours.

Captcha Example

Captcha Example

Unfortunately, lately they’ve been failing to do their job.

Could ambigram captchas be the solution?

This is no small problem. Concert giant Ticketmaster claims that they have been battling hackers ‘like the dickens’. The hackers continually defeat Ticketmaster’s captcha, claim large blocks of tickets, and sell them on eBay, Craigslist and reseller site StubHub for very impressive profits.

This Wall Street Journal article states that the highest price for a ticket on TicketMaster for the recent Hannah Montana “Best of Both Worlds” concert ticket was $63, yet the average price for tickets to that show through ticket reseller site StubHub was $237, a profit of almost 400%.

Ticketmaster isn’t alone. Yahoo’s captcha was recently hacked, Microsoft’s captcha was hacked, even the highly regarded captcha for Google was hacked.

According to the Wikipedia entry on captchas, programs that defeat captchas usually contain the following functionality:

  1. Pre-processing: Removal of background clutter and noise.
  2. Segmentation: Splitting the image into regions which each contain a single character.
  3. Classification: Identifying the character in each region.

Furthermore, the Wikipedia article states that the most difficult step to automate is usually #2: The segmentation of the captcha into its individual characters.

I propose that one possible solution would be an ambigram captcha.

An ambigram based captcha would make both the #2 and the #3 stages much more difficult. Stage #2 would be more difficult since any separation technology that works in one orientation would NOT work in the other orientation, due to the way that ambigram characters combine in a finished design.  A character in an ambigram will often span multiple letters, but usually only in one orientation. A human does not have a hard time with visually separating the letter forms, but a computer would have a very difficult time doing separation on an ambigram captcha.

For a computer to do the separation step on an ambigram, it would first need to do the Classification step (#3) to determine what characters are there, but if it could do that, it wouldn’t need to do the separation at all!  Classification is very easy for a human, and we do not require Separation to get there.

The Stage #3 Classification step itself would also be much more difficult, even if stage #2 could somehow be completed with an acceptable level of performance. After all, it is hard to OCR a word when the font itself has tens of thousands of characters, none of which are public, and all of which are different!

Also, the casing of letters automatically varies within a word, letterforms take on different characteristics based on their usage, and letters split and connected in unexpected and unpredictable ways (unexpected to an OCR system, anyway).

In fact, Stages #2 and #3 would be so hard to crack that Stage #1 (background noise and character warping) could be completely eliminated. Since this is the easiest part of the process to crack anyway, this won’t be a large loss from a security standpoint. Plus, the elimination of the swirls, random lines and noise from the background will make it easier for a human to read, which has become a big problem with highly deformed “regular” captchas.

Here is an example of what an ambigram captcha may look like:

Ambigram Captcha

Ambigram Captcha

As a side benefit, having 2 words in the captcha (one in each orientation) will make it even more difficult to develop an automated way to hack the system.

Of course, the other common complaint about captcha systems is that they can become too difficult for even some humans to read. Ambigram captchas would be no exception. Sometimes people do have a difficult time making out the letter forms, especially the first time they see one.

However, the human has the advantage here in that the generated words could be made to be “related” in a way that would be difficult for a computer to comprehend, but would help a human determine the two words from their context.

For instance, in the captcha above, the two words are “teach” and “learn”. This is easy for a person to determine based on context and the fact that those two words “must be the right answer” since they are related and they “match”, but this type of abstract, high-level thinking would be all but impossible for a computer to perform, especially if the database of interconnected word pairs was very large.

Ambigrams are also based on uniquely human psychological variables, including how we read letter forms. Furthermore, they are a form of optical illusion, making it even more difficult for a computer based OCR system to decipher. In the ambigram above, a human would “understand” that the extra leg on the bottom left of the “a” in teach is unnecessary and would simply ignore it. An automated system would easily trip up on small things like that.

Of course, its not to be underestimated that an ambigram captcha would likely be one of the most beautiful captcha systems in existence! Instead of dreading the deciphering of a warped piece of mangled text presented against a grainy, low-contract background, users may actually look forward to the small puzzle that an ambigram captcha represents.

Although not perfect in every way, ambigram captchas may be one solution to the current methods that automated system use to gain entry into systems that only humans should be able to access.

Comments? Feel free to share them below.

Tags: , , , , , ,

Leave a comment »

  1. I’m a bit sceptical about the feasibility of an ambigram captcha system. This requires a decent, fast ambigram generator. The Glyphusion generator proves it is already (close to) possible, but its method comes with some important limitations.

    First of all a generator uses a fixed ‘font’ to generate its ambigrams. True, these fonts are with more than hundreds of thousands of symbols much larger than regular fonts, but this also is a weakness. It means that the creation of the entire database of symbols requires a humongous amount of work. I wonder if it’s worth such effort only for a captcha generator.

    Secondly secrecy of the entire symbol set is required. However I doubt it’s possible to protect the database from brute force attacks. If a team of people automatically requests thousands of captchas and manually teaches their software the meaning of the symbols in the captcha (i.e. which letter combinations they represent normal and upside down), I think the larger part of the symbol set could be cracked within a few weeks or so.
    Note that the recognition of ambigram symbols (by humans) is much easier than creating them. Hence even by adding new symbols to the database you can never keep up with the rate they’re being cracked.

    I am fairly sure that a captcha as depicted in the sample image could be cracked easily. To make it more difficult for software, the separate symbols the ambigram is composed of need at least to be merged, bringing back the segmentation problem. Additional warping etc may help as well. However this wouldn’t help any human solvers, as with the naturally tricky readability of ambigrams these additional steps will make the captcha much less legible.

    Using ambigrams for captchas is a neat idea, but I’m afraid in practice too much work to create and hardly any safer from organized attacks.

  2. I think it is a beautiful idea.

    I agree with the writer in that ambigrams would have to be more difficult for an OCR-bot to distinguish the individual whole characters, as they are often linked to each other or have gaps breaking them into pieces. The human eye would automatically separate linked letters and put together pieces of whole letters. (I often have to break letters into pieces and combine parts of them together when drawing ambigrams.)

    I also agree that OCR-bots Must Be Defeated!

    Just curious though: For those people who are yet unfamiliar with ambigrams — and therefore less likely to visualize the inversion without physically turning the image over or standing on their heads — would it be easy enough to include with these Captchas a “toggle switch” for viewing the inverted image?

  3. Hi Rebecca,

    To answer your last question, there would definitely need to be a way to “spin” the ambigram to see the inverted state in order to write it down.

    In fact, stay tuned. I’m writing a cross-browser script library method of spinning an ambigram 180 degrees without Flash or any other plug-ins required, and will be doing a future post on just how its done.

    Thanks to both of you for such thoughtful responses!

  4. these are amazing!!! how long does it take u to make them?

  5. It’s an interesting idea, but I don’t think ambigrams would pose a challenge that much bigger than Yahoo’s heavily distorted text (which I can only read myself about 40% of the time)- it’s just a different set of distortions that get used.

    If we try to ignore that you told us your ambigraptcha is “Learn/Teach”, is there any reason that it couldn’t just as easily be read as “unch/yarn”? Not that “unch” is a common word to anybody but crossword puzzle enthusiasts. Unfortunately, I’m a crossword puzzle enthusiast.

    That said, ambigram captchas are definitely prettier than pretty much any of the effective alternatives, although ReCaptcha has a certain sort of conceptual elegance to it. What would you get with half an ambigram? It’s a word from one side, and gibberish identifiable as letters from the other side. It’s up to the reader to turn it the right way around. That would allow the word itself to be more legible with fewer compromises, while not only would the segmentation problem remain for an OCR attempt, it can get valid letters out of both sides without knowing which side is going to make a word. It does, of course, make the significant sacrifice of no longer being an ambigram!

  6. A beatiful idea, but I’m afraid captchas will keep getting cracked unless we crack down hard on people who request captcha cracking teams on freelance job sites. Once offering or accepting such a job is illegal, things will be a lot easier.

(page contents are not an accurate historical record. Many pages were modified in 2012)
If you liked this page, you may also be interested in creating your own ambigrams or ambigram tattoos.