26
Presented by: AVINASH MAURYA IT VI SEM 0829213008

563.10.3 CAPTCHA

Embed Size (px)

Citation preview

Page 1: 563.10.3 CAPTCHA

Presented by: AVINASH MAURYA

IT VI SEM 0829213008

Page 2: 563.10.3 CAPTCHA

Definition Background Applications Code in php Types of CAPTCHAs Breaking CAPTCHAs Proposed Approach Conclusion Reference

2

Page 3: 563.10.3 CAPTCHA

CAPTCHA stands for Completely Automated Public Turing test to tell Computers and Humans Apart

A program that can tell whether its user is a human or a computer.

The challenge: develop a software program that can create and grade challenges most humans can pass but computers cannot

3

Page 4: 563.10.3 CAPTCHA

First used by Altavista in1997• Reduced SPAM add-url by over 95%

CMU/Yahoo!• Automated the creating and grading of

challenges PARC

• Relies on document image degradation to prevent successful OCR

• Conducted user-focused studies to assess the effectiveness of CAPTCHAs

4

Page 5: 563.10.3 CAPTCHA

CAPTCHAs are based on open AI problems

Breaking CAPTCHAs help advance AI by solving these open problems

Improving CAPTCHAs help telling computers and human apart

Win-win situation

5

Page 6: 563.10.3 CAPTCHA

Pessimal Print: A Reverse Turing TestAllison L. Coates, Henry S. Baird, Richard J. Fateman

Telling Humans and Computer Apart AutomaticallyLuis von Ahn, Manuel Blum, and John Langford

CAPTCHA: Using Hard AI Problems for SecurityLuis von Ahn, Manuel Blum, Nicholas J. Hopper, and John Langford

Using Machine Learning to Break Visual Human Interaction Proofs (HIPs)Kumar Chellapilla, Patrice Y. Simard

6

Page 7: 563.10.3 CAPTCHA

Free email services Online polls Dictionary attacks Newsgroups, Blogs, etc… SPAM

7

Page 8: 563.10.3 CAPTCHA

8

i. Initializationii. Handwritten CAPTCHA Challengeiii. User Responseiv. Verification

Automatic Authentication Session for Web Services.

Internet

User

Authentication Server

Challenge

Response

User authentication

The user initiate the dialog and has to be authenticated by server

Internet

User

Authentication Server

Challenge

Response

User authentication

The user initiate the dialog and has to be authenticated by server

Page 9: 563.10.3 CAPTCHA

9

<?phpsession_start();$ranStr = md5(microtime());$ranStr = substr($ranStr, 0, 6);$_SESSION['cap_code'] = $ranStr;$newImage = imagecreatefromjpeg("cap_bg.jpg");$txtColor = imagecolorallocate($newImage, 0, 0, 0);imagestring($newImage, 5, 5, 5, $ranStr, $txtColor);header("Content-type: image/jpeg");imagejpeg($newImage);?>

Captcha.php

Page 10: 563.10.3 CAPTCHA

10

phpif ($_SERVER['REQUEST_METHOD'] == 'POST'){if ($_POST['captcha'] == $_SESSION['cap_code']) {// Captcha verification is Correct. Do something here!}else {// Captcha verification is wrong. Take other action}}?>

Verifying captcha code is equal or not

1-$_SESSION['cap_code'] - is having actual captcha code2-$_POST['captcha'] - user entered captcha code

Page 11: 563.10.3 CAPTCHA

11

Javascript<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><script type="text/javascript">$(document).ready(function(){$('#submit').click(function(){var name = $('#name').val();var msg = $('#msg').val();var captcha = $('#captcha').val();if( name.length == 0){$('#name').addClass('error');}else{$('#name').removeClass('error');}if( msg.length == 0){$('#msg').addClass('error');}else{$('#msg').removeClass('error');}if( captcha.length == 0){$('#captcha').addClass('error');}else{$('#captcha').removeClass('error');}if(name.length != 0 && msg.length != 0 && captcha.length != 0){return true;}return false;});var capch = '<?php echo $cap; ?>';if(capch != 'notEq'){if(capch == 'Eq'){$('.cap_status').html("Your form is successfully Submitted ").fadeIn('slow').delay(3000).fadeOut('slow');}else{$('.cap_status').html("Human verification Wrong!").addClass('cap_status_error').fadeIn('slow');}}});</script>

Page 12: 563.10.3 CAPTCHA

Text based• Gimpy, ez-gimpy• Gimpy-r, Google CAPTCHA• Simard’s HIP (MSN)

Graphic based• Bongo• Pix

Audio based

12

Page 13: 563.10.3 CAPTCHA

Gimpy, ez-gimpy• Pick a word or words from a small dictionary• Distort them and add noise and background

Gimpy-r, Google’s CAPTCHA• Pick random letters• Distort them, add noise and background

Simard’s HIP• Pick random letters and numbers• Distort them and add arcs

13

Page 14: 563.10.3 CAPTCHA

14

Page 15: 563.10.3 CAPTCHA

Bongo• Display two series of blocks• User must find the characteristic that sets

the two series apart• User is asked to determine which series

each of four single blocks belongs to

Difference? thick vs. thin lines

15

Page 16: 563.10.3 CAPTCHA

PIX• Create a large database of labeled images• Pick a concrete object• Pick four images of the object from the

images database• Distort the images• Ask the user to pick the object for a list of

words

16

Page 17: 563.10.3 CAPTCHA

17

DogPool

Page 18: 563.10.3 CAPTCHA

Pick a word or a sequence of numbers at random

Render them into an audio clip using a TTS software

Distort the audio clip Ask the user to identify and type the

word or numbers

18

Page 19: 563.10.3 CAPTCHA

Most text based CAPTCHAs have been broken by software• OCR• Segmentation

Other CAPTCHAs were broken by streaming the tests for unsuspecting users to solve.

19

Page 20: 563.10.3 CAPTCHA

Very similar to PIX Pick a concrete object Get 6 images at random from

images.google.com that match the object Distort the images Build a list of 100 words: 90 from a full

dictionary, 10 from the objects dictionary Prompt the user to pick the object from

the list of words

20

Page 21: 563.10.3 CAPTCHA

Make an HTTP call to images.google.com and search for the object

Screen scrape the result of 2-3 pages to get the list of images

Pick 6 images at random Randomly distort both the images and

their URLs before displaying them Expire the CAPTCHA in 30-45 seconds

21

Page 22: 563.10.3 CAPTCHA

The database already exists and is public

The database is constantly being updated and maintained

Adding “concrete objects” to the dictionary is virtually instantaneous

Distortion prevents caching hacks Quick expiration limits streaming

hacks

22

Page 23: 563.10.3 CAPTCHA

Not accessible to people with disabilities (which is the case of most CAPTCHAs)

Relies on Google’s infrastructure Unlike CAPTCHAs using random

letters and numbers, the number of challenge words is limited

23

Page 24: 563.10.3 CAPTCHA
Page 25: 563.10.3 CAPTCHA

25

Page 26: 563.10.3 CAPTCHA

26