Captcha Breaking :: Getting Naughty Once Again

Breaking CAPTCHA: Getting Naughty with Computer Vision……. And Captcha Breaking Experiment in PHP…. These terms now familiar to us. 1st one was made possible by Nadim vai and 2nd one by M. M. Rifat-Un-Nabi. Their post makes me inspire to get naughty once again more simply and more easily. Because I like simplicity ;). I also choosed SomeWhereInDhaka.Net Captcha to do this experiment.

P

That Captcha Which made me Naughty 😛

The SomeWhereInDhaka.Net CAPTCHA suffers several weaknesses: fixed font face, fixed font size, no distortions and it’s easy to segment. In this experiment, I have developed simple algorithm to break the SomeWhereInDhaka.Net CAPTCHA.

  1. At first need the captcha image from the page, We can do it in two way :

    (a) capturing only the captcha portion [I have used php function: imagejpeg()] or,

    (b) capturing the page image by php function and then crop only captcha portion from that page.

  2. So, we got that captcha. Now sampling that captcha image
  3. Match sampling pattern with reference pattern. If matching is true then it will give output, In this case the captcha value. (No need any edit distance algorithm)

I wrote a PHP+JavaScript code to implement this algorithm, which can read captcha and can fill up the form with out any human interaction.

Get Captcha Value with php

Get Captcha Value with php

And finally in bot section again JavaScript proved that its cool than anything.
I used simple JavaScript code which just read the HTML Tag and fill & submit the form automatically.

auto fill up the form by my bot

auto fill up the form by my bot

You can see the effect here.

I post my website ads 😛 as spam. So, isn’t it more simple.

And finally a sympathy will goes for SomeWhereInDhaka.Net. And also I would like to thanks them because they not change there captcha yet. and it help me to make this experiment :D. So, my friends if wana see weak captcha then what are you waiting for – just log in to SomeWhereInDhaka.Net and keep getting naughty :P.

Advertisements

12 Comments on “Captcha Breaking :: Getting Naughty Once Again”

  1. Rifat says:

    Good Work 🙂 . BTW, I’ve some questions for you-

    1) What did you want to mean by “recognize patterns with sampling patterns (No need any edit distance algorithm)”?

    2) “doesn’t need any template matching”. What is the difference between template matching & sampling pattern?

    3) Where did you find that edit distance is needed for this work?

    I hope Nadim Bhai will drop you a valuable comment soon.

  2. Kawser Hossain says:

    Oh!! great work .. hope this time SWI will make some change

  3. Md. Faisal says:

    @Rifat: “recognize patterns with sampling patterns” in this portion i used my own method for recognizing sampling pattern with reference pattern.

    “doesn’t need any template matching” that mean i didn’t use any template matching algorithms.

    i found “edit distance” term in VistaArc 😀

    BTW, ur work was really nice.

  4. Suvro Hasan says:

    Nice Job. there are lots of things which can possible with php. Keep rocking!

  5. Robert says:

    That´s an interesting type of using PHP 🙂 Here, anyone can see how powerfull PHP is with challenges like this.

  6. Nadim says:

    hey whazz up
    u said

    “And finally in bot section again JavaScript proved that its cool than anything.
    I used simple JavaScript code which just read the HTML Tag and fill & submit the form automatically.”

    if it is automatic that means the whole thing is done by DOM reading by JS then sending the captcha URL to ur PHP script then set the values of the form fields by JS and then submit, but u showed the image of the filled form. if it is done automatically where did u get that image that u put up in ur post? did u do that by ur hands manually ? LOL

    and btw, what do u mean by “Sampling Pattern” ? why do u bother with that ?

  7. Md. Faisal says:

    @Nadim: Hey Bro… yah!!! i’m cool 😀
    lollllllll. yah!! after sending the captcha URL to PHP script then it give the captcha value and then i used document.form.submit(); and in body tag i called a function where use setInterval(submitform,timeinterval), so form will submit in specific timeinterval with out reloading the page. so i can see how form is filled. also can show u all 😉 .
    I found some good resource in http://www.captain.at/howto-ajax-form-post-request.php

    “Sampling Pattern” means which i sampled from captcha image.

  8. Nadim says:

    if u r using document.form.submit() how did u get the image titled “auto fill up the form by my bot” ?

  9. Mamun says:

    Good Job!
    is it possible to apply for other weak captcha

  10. Md. Faisal says:

    @Nadim: so simple ; just have a look
    (fill textbox)=>(fill captchaVal)=>(submit form)=>(finish)=>(call setInterval)
    so before finish i can took a snap and post this screen shot for console.

    @Mamun: Thnxx. it depends. if the captcha contain fixed font face, fixed font size, no distortions then can possible to implement this 🙂

  11. Om Malik says:

    nice post ! very good effort


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s