The Spanner logo
    • Home
    • Blog
      • Blog home
      • RSS
    • Login
    • Home
    • Blog
      • Blog home
      • RSS
    • Login
    The Spanner logo

    The Spanner
    Web security blog

    Made by Gareth Heyes
    Follow me on Twitter: @garethheyes

    Javascript for hackers!

    Hackvertor logo
    Shazzer logo
    My Github account
    Recent posts
    Introducing Feedworm: A Privacy-First RSS Reader That Lives in DevToolsSpeedy RSVP extensionAutoVaderHackvertor history and tag finderShadow Repeater v1.2.3 releaseBurp Hackvertor v2.1.24 releaseHacking roomsXSSing TypeErrors in SafarivalueOf: Another way to get thisMaking the Unexploitable Exploitable with X-Mixed-Replace on FirefoxThe curious case of the evt parameterCSS-Only Tic Tac Toe ChallengeRewriting relative urls with the base tag in SafariBypassing DOMPurify with mXSSNew IE mutation vectorHow I smashed MentalJSMentalJS DOM bypassAnother XSS auditor bypassXSS Auditor bypassBypassing the IE XSS filterUnbreakable filterMentalJS bypassesmXSSJava SerializationBypassing the XSS filter using function reassignmentRPOSandboxed jQueryX-Domain scroll detection on IE using focusEpic fail IEnew operatorDecoding complex non-alphanumeric JavaScriptHacking FirefoxDOM ClobberingBypassing XSS AuditorThe evolution of codeNon-Alpha PHP in 6-7 charsetTweetable PHP-Non AlphaMentalJS for PHPOpera x domain with video tutorialSandboxing and parsing jQuery in 100ms

    Heyes Captcha

    By Gareth Heyes (@hackvertor)

    Published 19 years ago • Last updated March 22, 2025 • ⏱️ 2 min read

    ← Back to articles

    I've spent a lot of research over the last few weeks trying to create a different type of captcha. The basic idea is to try and produce one without images and try to make it as accessible as possible. I started off with a checkbox idea which allowed you to choose different fruits, this was easily broken by the clever guys over at sla.ckers.org forum (Trev, kuza55), so I took the useful info I gathered from their techniques in breaking this simple captcha and started to create a new one.

    The new captcha uses code from my Keypress authorisation technique and the basic idea is you hold keys down for a number of seconds, this makes it difficult for an attacker to reproduce the key presses with executing the javascript. Of course the attacker could just scan the source code to gather the correct key presses, this is were my next technique comes into play, random javascript code is created which is stored by the server which is then compared against the client version, then the combination is hashed using md5 and then sent to the server.

    Update...

    I've had some great feedback on my captcha, WhiteAcid from the Slackers forum in particular has been very helpful in highlighting the problems with javascript protection. I plan to update my captcha soon so watch this space...

    Visit demo

    My question is, can it be automated? .....

    It turns out yes it can via javascript, although server side it would be more difficult.

    Source code released

    I've decided to release the source code for my captcha, I'm currently working on timing based protection so the will be another update shortly. If anyone wishes to contribute to the development, please let me know and I will be happy to include your code and credits.

    HeyesCaptcha Source

    ← Back to articles