HTML Encoded Captchas 177
rangeva writes to tell us about a twist he has developed on the common Captcha technique to discourage spam bots:
HECs encode the Captcha image into HTML, thus presenting an unsolved challenge to the bots' programmers. From the writeup: "The Captcha is no longer an image and therefore not a resource they can download and process. The owner of the site can change the properties of the Captcha's HTML, making it unique,... add[ing] another layer of complication for the bot to crack." HECs are not exactly lightweight — the one on the linked page weighs in at 218K — but this GPL'd project seems like a nice advance on the state of the art.
I failed to see how this'll help (Score:5, Interesting)
Re: (Score:3, Informative)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re:I failed to see how this'll help (Score:5, Insightful)
It's not that simple. Since the Captcha is no longer an image that you can download, the bot will first has to locate the position of the Captcha. The owner of the site can modify the layout of the page and Captcha making it unique. By rendering the image into HTML you practically modify to encoding of the image to a new and unique one - making it highly difficult to create a generic bot that will learn to decode all the HTML variations out there.
The problem today is with automated software that download the Captcha images from a pre-defined location (URL) and crack them. HECs makes it much harder to locate this resource.
Oh and everything is Crackable;)
Re: (Score:2)
How poorly are the CAPTCHAs doing these days against bots, anyway? I see a few that are probably easy to OCR, but there are quite a few where I have to make a effort to read them myself...
Re: (Score:2)
The HEC should only be on the form page (registration, forum submission etc) so it won't harm the user's experience too much.
I created the HEC because I used to get about 20 spam posts a day on my phpBB forums and other forms on my sites. I also read on many boards that this is a real problem. Since I started using HECs the spam amount went to 0.
Re: (Score:2)
Wouldn't pretty much anything larger than a single letter in HEC be larger than a full CAPTCHA?
My problem with the idea is that if it got popular, it'd probably be in a well-know script, at which point it'd be fairly easy to crack (even with random HTML spread around, i
Re: (Score:2)
This is still an image. Instead of sending a JPG or GIF, you are sending an actual bitmap in HTML. In my three-second preview, it just looks like a table with one-pixel cells. Then, you set the color of each cell (pixel) in HTML.
So, this still requires OCR, but there is just an extra obfuscation step in getting the image from HTML to a standard graphics format. The down side is that it is
Re: (Score:2)
Yes, I
Re: (Score:2)
Once a HTML-to-image rendering engine is added...
profiles can be updated to include site-specific html layout
Re: (Score:3, Insightful)
The "HTML renderer" in question will be either Mozilla or IE, both of which offer through Javascript the ability to find the absolute position of an element, and its absolute width and height. So the only "hard" part left is identifying the HTML location of the test, probably with something like XPath, or Mozilla's DOM Inspector which already allows you to just click on the element (and maybe go up in the hierarchy a bit.)
And I'm pretty sure the spammers already have progr
Clever but no cigar. (Score:3, Insightful)
It's a useful tool to slow down script kiddies but it won't stop anyone that could actually write the code to grab the characters in the image in the firs
Re: (Score:2)
I think a better approach is to use some natural language: "Please type the following word in backwards: WIBBLE" - "Please type in every alternate letter of this word XPQUNTF" - "Please tell me the name of a baby dog". "What is the first word in this paragraph?"
Just think up a few dozen of these and you're done. Providing no two websites us
Re:I failed to see how this'll help (Score:4, Interesting)
Add in the huge size of the html and the annoyance factor of captchas in general, and this is amazingly stupid.
Re:I failed to see how this'll help (Score:4, Insightful)
Yes, I see that they recommend adding in random divs and crap. If it's still a table, it's still very very easy to parse, even without a parser. If they intend for you to replace the table with 'random elements'
Re: (Score:2)
And it didn't render at all in my everyday browser.
Re: (Score:2, Informative)
Gecko is absolutely overkill there: the HTML "encoding" is pretty lame, as the image is entirely made of 1px table cells, each one carrying its color information inlined in the style attribute.
Just one Perl line can extract the color matrix and pass it straight to your OCR algorithm.
Maybe if they used JavaScript to render the table on the client side, that would require Gecko or something like that (SpiderMonkey or Rhino would likely suffice), but still the complexity of a captcha cracker is noise reducti
Do others use such spam-bot blockers? (Score:3, Interesting)
I've had sessions that took an inordinately long time to initialize with various web service providers (it's very noticeable on dial-up.) I'm wondering whether similar techniques might be used to attack rather than defend, possibly including rogue AJAX code.
Re: (Score:2)
What I'm trying to get at is that with Flash and similar technologies, I can just remove the plugin or disable it in the browser. But with an AJAX or any other interface that uses ECMAScript, it might well be possible to deliver attack code. People forget it's called JavaScript because it's a similar syntax, but it is NOT sandboxed like real Java applets.
A matter of time (Score:2, Interesting)
The advantage of this captcha is that it is not widespread yet and so the chances that a bot can crack it are lower.
Funny that when OCR software is supposed to work it often fails, but when there is some effort to hinder recognition then bots can deal with that. Maybe general OCR software should try to crack input instead!
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Render, PrintScr, OCR? (Score:3, Interesting)
A better solution might be the authentication system old 386 games had where you have to do some simple but human intelligence requiring task. "Find the word in the upper right of manual pg 4" -> "Enter the 3rd word from the following paragraph"
Re: (Score:2)
Re: (Score:2)
If anyone wants to produce HTML table graphics then The GIMP comes with an export plugin, good fun but don't try exporting or rendering anything too large, it can put a lot of strain on the browser.
Re: (Score:3, Funny)
"Prove or disprove P=NP. (You have 500 characters remaining.)"
Re: (Score:2)
Chance are that if you make something that joe sixpack can pass... so can a bot written by an Einstein.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
"One of the pictures below is of a dog lying on a pile of newspaper headlines. What's on the dog's nametag?"
On second thought, I guess that could eventually be solved as well. Maybe add in a legend with "What kind of dog is it?" etc. The joys of a never-ending arms race.
watermarking (Score:3, Interesting)
Re: (Score:2)
What are the gotchas with these captchas (Score:2)
Re:What are the gotchas with these captchas (Score:5, Insightful)
Re: (Score:3, Insightful)
Nyh
Re: (Score:2)
I was wondering why I can normally see captchas but saw nothing in the sample box. Being colorblind I need to force most pages to colors I can see. Since my browser doesn't allow me to set colors for one site but not another, even the good sites get changed.
Re: (Score:2)
Re: (Score:2)
Bad form (Score:5, Insightful)
Re: (Score:2)
Re: (Score:2)
1: Your browser does not prerender (ie. IE) - though rendering was pretty instantaneous in IE6 for me too.
2: Something is wrong with your machine
3: You should consider looking into the purchase of a new machine if you are obviously so anal about a registration scheme that you will go through -once- taking a few extra seconds.
Re: (Score:2)
Re:Bad form (Score:4, Informative)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
I was thinking that the files may be large, but they're highly compressible, but you hit on a good point. On my 933MHz PowerPC G4 running Firefox 2 it's not terribly slow, but it's definitely slower than any other captcha I've seen. It's an interesting technique, in any case.
Re: (Score:2)
In Safari, on a 1.83 GHz Core Duo, the rendering was completely not noticeable. Perhaps Gecko is poor at rendering giant tables?
(This isn't unlikely. On Mozilla 1.4 on a 1.8 GHz HP, about a year ago, I tried to render a 320x200 image as a table - I was trying to find a quick hack to get an image out of QBasic. It took less time to realize
workaround... (Score:5, Informative)
1. Show the image in an alternate pornographic/warez/whatever website
2. Ask the user to type it in to access the site
3. Use the user's input to access the original protected site
4. There is no step 4.
Re: (Score:2, Funny)
Re: (Score:2)
Re:workaround... (Score:5, Funny)
One hand eh?
Guess we don't really need to ask how you know this...
Re: (Score:2)
At least you're maintaining good posture while you're stunting your growth.
Re: (Score:2)
A captcha is still a captcha (Score:5, Interesting)
A HTML generated captcha would prevent that, since there is no image file to copy.
However, what prevents the attacker to simply copy the relevant HTML source and put it on his or her site, just like the image? Sure, you can make it quite complicated by adding CSS layers and whatnot, but in the end that would just merely be an extra annoyance.
And stopping the attacker on using OCR on the captcha won't really work either. It's not that hard to render HTML code to an image, which you can feed to the OCR software.
In short, this hack is just another step in the arms race, that just buys us some time.
Re: (Score:2)
You could also just steal the html table code, and show it on another site. It almost easier, since there's no file to deal with.
Re: (Score:2)
The trick has to be to make life harder for the image recognition step - not to make it harder to feed the image into that stage.
So - more noise in the background - more crazy font choices - more 'meta' stuff li
Not a resource they can download and process? (Score:2)
It's a nice idea, but it's little more than a speed-bump at best. (And not a particularly high one, at that)
Re: (Score:2)
Re: (Score:2)
Or it could just be that FreeBSD/KDE has magic powers.
Re: (Score:2)
By "no problems" I mean that it's right there in the page, and can be scraped out with relative ease. In fact, it's not really any harder than searching for the appropriate img tag, in either case you have to identify an enclosing block of text and pull out the relevant HTML fragment.
I
Re: (Score:2)
Re: (Score:2)
Screen Captcha! (Score:3, Interesting)
The file size is what intriques me. Just make a 'hidden' captcha that a bot would download. Now figure out how to make a jpeg decompressor uncompress that to 2 gigs or better.
It's like the old "I'll compress 2gigs of the letter A with zip and upload it to that BBS and let the virus checker gag" gag.
Or maybe a gif file. I wonder how solid black or white compress......
Re: (Score:2)
As to how to make it compress really well, simple. Save it as a 2-colour bitmap (with all the pixels "on"). Of some obscenely high resolution. Like 168,000x105,000. 17.6 billion pixels. Will compress really small, but will also suck up a huge amount of RAM to display.
Re: (Score:2)
Re: (Score:2)
Lunacy (Score:4, Interesting)
With the limited amount of colours used, it would make much more sense to
a) give the table an id, then:
table.tabid td { width:1px; height:1px; )
b) give some classes for each colour used
td.colid { background-color: blah; }
I'm sure that would half the source code size... How can you trust a HTML solution that hasn't even been properly thought through?
Processing (Score:2, Interesting)
The Captcha is no longer an image and therefore not a resource they can download and process.
Err...but the HTML captcha is a resource they can download and process.
Re: (Score:2)
The Captcha is no longer an image and therefore not a resource they can download and process.
Err...but the HTML captcha is a resource they can download and process.
You still need to separate the captcha from the rest of the page.
Captcha's are annoying (Score:5, Insightful)
While this has little to do with the original post I have a really annoying experience with captchas
I have 20/20 vision and am not color blind. Captchas are becoming so complicated and garbled that I get the code wrong about 40% of the time. Another portion of the time I take to long trying to answer the code question and type in the right characters. I typically get screwed on the number Zero and the letter 'O' and lowercase 'L' and the number 1.
It'b becoming, for me, an entry barrier to signing up and gaining access to websites. It would be much easier to simply use email authentication. What do you do with the people who are color blind? I spent some years dealing with display design and this was a legitimate concern that we addressed at the time for a specialized group of people. In the common population there are a lot more occurrences of people who are color blind.
Are captcha's really worth the effort compared to other more human friendly processes? Is anyone working on what we will be doing next? Considering that there are decades of technology in machine vision technology to pull from I think it will be fairly trivial for the bots to become better at reading captchas than humans.
It might be effective to take the email authentication process and apply everything that mail servers do to authenticate the user. What I mean by this is apply all the mail server rules like FQDN requirements for HELO, fully resolvable email domains, valid email addresses, non-open relays. Much of this would eliminate either the bots or the ISP's who are too stupid to properly configure a mail server. Similarly it might be sufficient to code the HTML/HTTP to expect a properly responding client and not some hacked up bot that can't do most of it right.
Re: (Score:2)
The thing is, it's a losing battle. You can either shrug your shoulders, and let it happen, or you can take up arms. A
Re: (Score:2)
I supposed the next step is to have people write a physical letter or make a phone call to you personally. But I wonder how long it will be before electronic speech gets better.
'notabot' anti-captcha (Score:2)
Obviously that will only work until the spammers add a rule to check for what you're doing. If your method remains a minority, they probably won't bother.
Given that, why bother asking the user to type anything or show them the graphic? Just use Javascript to enter the
Re: (Score:2)
Re: (Score:2)
Broken (Score:5, Interesting)
Re: (Score:2)
Re: (Score:2)
Make the question a wav file (Score:2)
Generate the audio file using a good natural text to speech maker.
Ofcourse, use 10 variations of grammer for the questions perhaps. Easy to do in real time.
Re: (Score:2)
If the questions are created by a human, there is going to be a limited set. The spammers only have to figure out the answers to that limited set. Only by having the computer generate a (essentially) infinite set of questions can this workaround be avoided.
Re: (Score:2)
Kitten tastes like veal, actually. Mmm.
Blacklisting every single bot IP ought to do it. Turn off the internet for the botnets, that's all. Yes, it's "enumerating badness", but it's still a reasonably finite and discoverable space. Blogs aren't at the state of the art anti-spam was in 5 years ago, and they could be adding to the anti-spam arsenal instead of trying to catch up with it. Ah well.
218k of junk (Score:3, Informative)
Also on the subject of it being 218k, each pixel looks like:
which is badly redundant, the very first thing is you can make all "td"-s in the table be 1px/1px with a simple: table.captcha td {width:1px; height:1px} rule, then background-color can be shortened to just "background" and still be valid.
Furthermore you don't need table with rows and columns, if you float the pixels to left, then you only need a container of the right width and columns/rows wil naturally form, to keep it down we can style a shorter tag for our purposes, like <b>
So at this stage we arrive at the much simpler:
<b style="background:#abcdef"></b>
But this can be simplified even further by indexing the colors used as around a 40-50 css classes (fiven the image has a lot more than 40-50 pixels and 40-50 colors are enough for it, it's still a net gain), for example:
<b class="cA"></;b>
and again the original:
And this is before we start putting JavaScript in the picture...
Congratulations... FOOL! (Score:2, Interesting)
Congratulations. How much did they pay you?
Oh, as for the "official" purpose. I give it a life expectancy of 3 weeks before the spammers have found a way around it. If they bother at all.
Re: (Score:2)
Re: (Score:2)
Are you seriously trying to imply that the concept of rendering an image in HTML via 1-pixel table cells is new? The innovation here is connecting table-rendered-images and CAPTCHAs, not one or the other.
No need to download the image (Score:5, Interesting)
Now, just go to MD5Lookup.Com [md5lookup.com] and convert that little "hidden" MD5Sum back to the original text:
ad6ade8a0b6e2f748b80a390ff45cf31 - &NMTB
Maybe the author should add some salt.
Re: (Score:2)
Adding a long salt should work though, as long as the salt is secret.
Re: (Score:2)
Re: (Score:2)
Captchas synonymous to DRM? (Score:2)
Cleaner way (Score:2)
How smart can they be if... (Score:2)
You must have a very poor dialup connection. (Score:2)
The larger problem would probably be load on the server - possibly you could get around this by pre-compressing and then randomly serving. I don't think this was supposed to be a perfect solution, it's just a nice little demo showing how something common can be done in a new way.
Re: (Score:2)
Re: (Score:2)