1 00:00:00,000 --> 00:00:08,100 Alright, okay. So, you know, a couple days ago I was browsing one of my favorite Web 2.0 photo file sharing sites. 2 00:00:08,720 --> 00:00:13,740 And, you know, it's a special site. It's specialized for Linux nerds. 3 00:00:20,380 --> 00:00:22,520 It's specialized for open source software people. 4 00:00:22,820 --> 00:00:25,860 You know, it's a knockoff of a common Web 2.0 site. 5 00:00:25,860 --> 00:00:31,080 And, you know, I'm getting ready to upload my favorite XKCD comic in case somebody else had missed it. 6 00:00:31,260 --> 00:00:37,700 And all of a sudden, you know, the site's asking me to fill in, you know, how many shells are in a standard Ubuntu installation. 7 00:00:38,220 --> 00:00:40,640 And I'm like, you know, I'm tired of dealing with this stuff. 8 00:00:41,260 --> 00:00:44,760 I'm sure most of you have seen this kind of thing. I've seen captures. 9 00:00:44,960 --> 00:00:49,320 You know, they're supposed to prevent, you know, automated robots from abusing websites. 10 00:00:49,840 --> 00:00:53,820 But, you know, they really, you know, they come in all sorts of shapes and sizes. 11 00:00:53,820 --> 00:00:55,660 Some of them are colored. Some of them are squiggly. 12 00:00:55,860 --> 00:00:57,520 Some of them, you know, have grids. 13 00:00:57,560 --> 00:01:01,020 Some of them are, you know, ask you to solve, you know, high-order calculus problems. 14 00:01:01,120 --> 00:01:01,820 And some of them don't. 15 00:01:02,160 --> 00:01:04,500 But they all really have sort of two attributes in common. 16 00:01:05,680 --> 00:01:09,380 They're all kind of annoying, and none of them really work that well. 17 00:01:10,080 --> 00:01:11,720 And so what's the inherent problem here? 18 00:01:11,880 --> 00:01:17,200 I mean, the problem is that in order to make a good capture, the capture has to be really hard for a computer. 19 00:01:17,640 --> 00:01:21,900 But in order to be hard for a computer, it's got to be, you know, pretty hard for a person. 20 00:01:22,860 --> 00:01:25,240 But that means that they can't really be too hard. 21 00:01:25,860 --> 00:01:34,740 And, you know, this sort of a, this problem allows people to, the niche that they need to break these things. 22 00:01:36,200 --> 00:01:40,440 So in order to talk, before we can really talk about what's involved in breaking a capture, 23 00:01:40,540 --> 00:01:42,700 we need to talk about when is it worth it to break a capture. 24 00:01:42,840 --> 00:01:44,780 Like, why do people even bother with this thing? 25 00:01:45,300 --> 00:01:53,040 And, you know, the issue is that there tend to be sort of two types of targets involved that are being protected by captures. 26 00:01:53,560 --> 00:01:55,480 There are low-value targets. 27 00:01:55,480 --> 00:01:56,700 And there are high-value targets. 28 00:01:58,200 --> 00:02:05,240 And the distinction between these is key to understanding what kind of, you know, what kind of threat you need to consider. 29 00:02:05,580 --> 00:02:12,280 High-value targets, you know, your captures really sort of, they're not really going to do a great job. 30 00:02:12,480 --> 00:02:20,600 Because if the target is high, if the value of making a post, you know, in the personal section of Craigslist, for example, is 10 cents, 31 00:02:20,700 --> 00:02:24,440 and it costs one or two cents to hire a person to solve the capture for you, 32 00:02:25,480 --> 00:02:26,620 it doesn't matter about the capture. 33 00:02:27,280 --> 00:02:34,280 On the other hand, you know, if you have, you know, if you're a spammer and you're trying to spam the entire Internet or every blog on the Web, 34 00:02:34,960 --> 00:02:38,080 then you're much less interested in these high-value captures. 35 00:02:38,160 --> 00:02:43,620 And you're much more interested in automating the procedure in such a way that you can hit a huge number of sites, you know, 36 00:02:43,620 --> 00:02:47,740 without paying someone, you know, one cent every single time you post. 37 00:02:50,840 --> 00:02:55,460 So this talk is essentially focused on what is involved in breaking a capture. 38 00:02:55,480 --> 00:02:56,940 And what is involved in breaking a capture with automation. 39 00:02:57,620 --> 00:03:02,240 And they're really, we consider there to be sort of two approaches to doing this. 40 00:03:02,920 --> 00:03:08,480 In one case, you can try and attack the back-end implementation of the capture generator. 41 00:03:08,740 --> 00:03:14,240 And in the other case, you can try and break the actual capture problem, you know, sort of solve the crux. 42 00:03:15,120 --> 00:03:18,400 So we're going to talk a bit about implementation-style attacks first. 43 00:03:18,580 --> 00:03:22,120 And then Scott will talk a bit about attacking the actual capture problem a bit later. 44 00:03:22,980 --> 00:03:24,800 So one of the really common problems. 45 00:03:24,800 --> 00:03:32,980 In CAPTCHAs and in lousy implementations of CAPTCHAs is that they don't record enough state on the server side 46 00:03:32,980 --> 00:03:36,820 in order to tell whether or not the CAPTCHA, whether or not the solution is legitimate. 47 00:03:37,400 --> 00:03:42,080 There's sort of two main classes of state that tend not to be recorded in some cases. 48 00:03:42,540 --> 00:03:46,980 In one case, people don't actually tie the CAPTCHA to a specific request. 49 00:03:47,380 --> 00:03:54,320 And this is particularly relevant because it means that someone can say batch request a large number of CAPTCHAs. 50 00:03:54,320 --> 00:03:54,780 So they can say, you know, I'm going to do this. 51 00:03:54,780 --> 00:03:56,980 Solve them very efficiently in a batch mode. 52 00:03:57,240 --> 00:04:00,000 And then use those solutions over a long period of time. 53 00:04:00,680 --> 00:04:07,700 You know, this is actually a fairly common problem that's present in even some of the, some fairly widespread CAPTCHAs. 54 00:04:08,260 --> 00:04:15,660 The other problem that's a little bit less common is that some implementations simply can't tell whether or not a CAPTCHA's been used before. 55 00:04:16,080 --> 00:04:21,220 And so it's possible to reuse the CAPTCHA, you know, several times over the course of usually a certain time period. 56 00:04:22,180 --> 00:04:24,560 So here is an example. 57 00:04:24,780 --> 00:04:31,720 This is a chunk of code from a, from a defunct software project that's, you know, the software project is defunct. 58 00:04:31,800 --> 00:04:35,580 But you can find the code living on in various sites across the web if you look hard enough. 59 00:04:36,240 --> 00:04:46,140 And all this is doing is it's, it's comparing the, the inputted solution here, which is, you know, the, the input solution is string. 60 00:04:46,480 --> 00:04:48,640 And it's comparing that to a calculated code. 61 00:04:48,820 --> 00:04:54,340 And it calculates the code by taking the, the MD5 hash of a site-specific key. 62 00:04:55,060 --> 00:04:57,040 Plus the, the request token. 63 00:04:57,300 --> 00:04:58,700 Plus the state field. 64 00:04:59,420 --> 00:05:01,680 But the state field only changes once a day. 65 00:05:02,020 --> 00:05:07,980 And so, you know, a spammer can simply solve this CAPTCHA once and then reuse that, reuse the same solution all day. 66 00:05:08,120 --> 00:05:11,180 And this is not an uncommon problem. 67 00:05:11,820 --> 00:05:16,560 The, another common problem in sort of low-end CAPTCHAs is that the encoding is lousy. 68 00:05:16,780 --> 00:05:22,960 For example, the, the solution of the CAPTCHA is included in a form parameter in, say, rock 13. 69 00:05:23,240 --> 00:05:24,760 This is usually done in the name of, you know, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the, the. 70 00:05:24,760 --> 00:05:27,800 This is usually done in the name of, you know, sort of, you know, the, the, the mythical horizontal scalability. 71 00:05:28,000 --> 00:05:29,380 Because we, we don't want any server-side state. 72 00:05:29,400 --> 00:05:31,180 We don't want to have to remember what the solution is. 73 00:05:31,280 --> 00:05:32,280 So we just sort of encode it. 74 00:05:32,840 --> 00:05:37,840 I was a little, I was originally a little bit worried about finding a, finding a, a good example of this problem. 75 00:05:38,860 --> 00:05:41,940 But here's something from, from an actual web page online. 76 00:05:42,160 --> 00:05:43,220 It's a reasonable amount of traffic. 77 00:05:44,120 --> 00:05:48,380 And you'll, you'll notice here the CAPTCHA's asking you to solve a simple arithmetic problem. 78 00:05:49,080 --> 00:05:51,060 And there's, there's an X and a Y and an operation. 79 00:05:51,720 --> 00:05:53,820 But there, there are three fields in the image URL. 80 00:05:54,760 --> 00:05:56,560 There's an X and a Y and, and an L field. 81 00:05:57,380 --> 00:06:02,680 And it turns out if you, if you look at it, if you, if you subtract, if you add 12 to the, to the X value in the URL, 82 00:06:02,780 --> 00:06:09,380 and you subtract 17 from the Y value in the URL, then you end up with the, with the actual CAPTCHA operation. 83 00:06:10,660 --> 00:06:11,720 And it gets a little bit better. 84 00:06:12,600 --> 00:06:15,820 The, the people who wrote this CAPTCHA were, were feeling a little bit lazy. 85 00:06:15,980 --> 00:06:19,160 And apparently they don't, they don't want to, they don't want to do that themselves on the server-side. 86 00:06:19,280 --> 00:06:22,160 So, so they encoded the solution itself in the form. 87 00:06:23,120 --> 00:06:24,660 Of course, the, the solution, 88 00:06:24,760 --> 00:06:26,720 the solution itself was the MD5 of the solution. 89 00:06:27,000 --> 00:06:30,480 And, and when the solution varies from, you know, integers from, say, 0 to 20, 90 00:06:30,700 --> 00:06:32,960 that's not a very large search space, search space. 91 00:06:35,360 --> 00:06:44,140 So another, another fairly common problem is that the, is that a single image URL will always return the same letters. 92 00:06:44,780 --> 00:06:48,920 But, you know, because of the, again, not wanting to retain state on the server-side, 93 00:06:49,180 --> 00:06:52,000 it will randomize sort of some of the parameters of the image generation. 94 00:06:52,000 --> 00:06:55,160 So you end up with lots of different-looking versions of the same thing. 95 00:06:55,460 --> 00:06:58,200 This is a problem because if you're using an OCR-based attack, 96 00:06:58,340 --> 00:07:02,700 then it allows you to very easily sort of pump up the accuracy of your, of your classifier. 97 00:07:03,920 --> 00:07:06,780 So we're going to take a quick look at how some of these, 98 00:07:06,960 --> 00:07:09,440 how using some of these attacks looks from a, from a code perspective. 99 00:07:12,180 --> 00:07:15,240 Okay, so this is, this is a very simple, basic CAPTCHA implementation. 100 00:07:16,120 --> 00:07:20,880 And some very, very basic Python code to, to talk to it. 101 00:07:21,760 --> 00:07:25,560 So first, look, see, you know, it, it basically works. 102 00:07:25,640 --> 00:07:28,640 If you type in the word correctly, then, and it lets you through. 103 00:07:28,720 --> 00:07:30,720 If you type in the word incorrectly, then it doesn't let you through. 104 00:07:31,220 --> 00:07:33,640 But, you know, the first implementation has, has a couple problems. 105 00:07:33,900 --> 00:07:37,960 You know, in, in particular, this one, I think, has, has a, has a static token. 106 00:07:38,240 --> 00:07:39,040 And it never changes. 107 00:07:39,840 --> 00:07:43,800 So this is sort of a, a basic example of, you know, how, how do you, how do you post a request? 108 00:07:44,200 --> 00:07:46,520 What's the basic template code for submitting a CAPTCHA solution? 109 00:07:55,700 --> 00:07:58,820 So, you know, as you can see, it's clearly, clearly trivial to break. 110 00:07:59,040 --> 00:08:02,860 So upgrading it a little bit, you know, we try and, try and randomize the CAPTCHA solution. 111 00:08:03,120 --> 00:08:11,360 But here, you know, if you, if you look at the URL, you see, you see a poorly encoded version of the solution there. 112 00:08:11,520 --> 00:08:17,340 If you look at it, it, any, any, I think, right-thinking hacker might take a look at a few, a few letters that, 113 00:08:17,400 --> 00:08:20,240 they're all ASCII letters, but they're not quite the letters that you see there. 114 00:08:20,240 --> 00:08:22,880 And think, well, I don't, I don't know, what, what would an engineer do? 115 00:08:23,060 --> 00:08:24,020 They'd use ROT13. 116 00:08:24,340 --> 00:08:25,880 So let's try that and see what happens. 117 00:08:32,400 --> 00:08:35,820 You, you, carefully type that out. 118 00:08:35,900 --> 00:08:42,880 Anyway, and so, so they, you know, the, your, your favorite, you know, your, your social bookmarking site has gotten wise to your attacks. 119 00:08:43,020 --> 00:08:44,540 And so they, they've improved things a bit. 120 00:08:44,860 --> 00:08:49,860 And now they've, but now they still, they still allow you to request multiple versions of the same image. 121 00:08:50,720 --> 00:08:51,140 Right? 122 00:08:51,260 --> 00:08:58,520 So first, we're going to show you sort of a classifier-based attack if you, if you can't request the image more than once. 123 00:08:58,620 --> 00:09:00,280 Like, how well does the classifier really work? 124 00:09:00,560 --> 00:09:02,200 Just, just at the baseline level. 125 00:09:04,940 --> 00:09:07,400 And you can see it just, it doesn't work very well at all. 126 00:09:07,740 --> 00:09:15,260 But taking advantage of the, of, of this ability to request multiple copies of the same image and using, say, a simple voting algorithm, 127 00:09:15,760 --> 00:09:20,220 then you can see that it takes, it takes up so much time. 128 00:09:20,220 --> 00:09:23,620 It takes substantially longer, but it works with substantially better accuracy. 129 00:09:26,120 --> 00:09:34,020 So moving back to, so these have been sort of some very, very sort of basic run-of-the-mill vulnerabilities that you see in a fair number of places. 130 00:09:34,540 --> 00:09:42,540 But let's take a moment to look at some, say, less common vulnerabilities that, a little bit more esoteric, but that I think are interesting nonetheless. 131 00:09:43,380 --> 00:09:50,200 So one of the key problems in, in making a captcha is to generate the code that you're using. 132 00:09:50,220 --> 00:09:52,580 And most people, you know, they use some sort of random number generator. 133 00:09:53,020 --> 00:10:00,100 Now, we all know that making random number generators that are good is hard, and keeping them that way is, is sometimes even harder for some people. 134 00:10:00,880 --> 00:10:05,040 But, you know, by, by and large, you know, you'd think that people would be able to do this. 135 00:10:05,100 --> 00:10:11,060 But the problem is that most of the people writing basic captcha packages for, for web application aren't really familiar with this. 136 00:10:11,140 --> 00:10:17,800 So they usually fall back on just the basic random number generator provided by, provided by their scripting language. 137 00:10:18,060 --> 00:10:20,200 So for, in PHP, they might just be calling this. 138 00:10:20,220 --> 00:10:20,540 They might be calling rand. 139 00:10:21,000 --> 00:10:26,160 Now, admittedly, reconstructing the sequence from just, from just a couple of captcha letters is, is a little bit tricky. 140 00:10:26,300 --> 00:10:33,540 Because you're, you're looking at truncated output, sort of a large number indexed into a fairly slow, a fairly small number of bits. 141 00:10:33,660 --> 00:10:37,140 And then to select, you know, whichever character in your character set's being used. 142 00:10:37,440 --> 00:10:40,880 And you have to worry about sort of intermediate requests to the random number generator. 143 00:10:41,260 --> 00:10:44,140 And you have to worry about, say, multiple servers sitting behind a load balancer. 144 00:10:44,440 --> 00:10:50,200 But, you know, even, even if you have to do all of this stuff, you'd, you'd really like the security research, your, your site of your site. 145 00:10:50,200 --> 00:10:54,380 You'd really like the security of your implementation to be independent of the actual sort of web server configuration. 146 00:10:55,100 --> 00:10:56,240 So it's just, sleep easy. 147 00:10:56,440 --> 00:10:59,520 Use MD5 combined with a key and the output of random number generator. 148 00:11:00,400 --> 00:11:04,920 And just for kicks, let's take a closer look at a, at a, at a captcha implementation with this problem. 149 00:11:05,280 --> 00:11:10,240 So here's a bit of code from a fairly easy to find PHP captcha. 150 00:11:10,940 --> 00:11:15,580 And as you can see, it uses rand and it simply indexes the output into a character set. 151 00:11:15,840 --> 00:11:17,860 So what, what does the PHP rand function do? 152 00:11:18,200 --> 00:11:20,180 You know, perhaps it, perhaps it doesn't. 153 00:11:20,200 --> 00:11:24,320 It does something magic and, and secure like, like, like you'd expect from PHP. 154 00:11:25,300 --> 00:11:28,480 But, you know, looking more carefully, you see, no, not really. 155 00:11:28,640 --> 00:11:32,740 It, it, it chooses, tries to choose intelligently between different libc implementations. 156 00:11:32,820 --> 00:11:35,120 But, you know, that's, that's not really doing so much. 157 00:11:35,340 --> 00:11:36,760 I mean, is, is rand any good? 158 00:11:36,920 --> 00:11:38,960 Well, you know, it's, it's a linear congruential generator. 159 00:11:39,260 --> 00:11:40,860 You know, it has a couple different implementations. 160 00:11:41,620 --> 00:11:44,600 You know, but, but I think everyone here should know it's, it's bad. 161 00:11:44,840 --> 00:11:46,820 But, but how bad is it, is it really? 162 00:11:47,080 --> 00:11:49,560 Like, how many bits of output from rand? 163 00:11:50,280 --> 00:11:53,000 Do you need, how many samples do you need to reconstruct a sequence? 164 00:11:53,640 --> 00:11:55,200 And it turns out, not that many. 165 00:11:55,480 --> 00:11:59,360 For example, if you only have, you know, the high order 20 bits, 166 00:11:59,480 --> 00:12:02,900 then you still only need three samples to do that. 167 00:12:03,100 --> 00:12:06,940 And if you only have, say, five bits from every generated random number, 168 00:12:07,040 --> 00:12:12,520 then you can still reconstruct the sequence perfectly with after, you know, roughly 12 to 13 samples. 169 00:12:13,180 --> 00:12:17,340 Which is sort of well within the range that you can get from most, from most websites' captures. 170 00:12:19,160 --> 00:12:22,940 Now, you might, you might think that rand is a little bit better if you, if you looked at the man page. 171 00:12:23,220 --> 00:12:27,320 You know, it says something, something fancy about, about a non-linear additive feedback generator. 172 00:12:27,560 --> 00:12:28,880 And maybe that's doing something pretty cool. 173 00:12:29,300 --> 00:12:33,600 But this is another one of those cases where then the people who are writing the documentation don't actually know what's going on. 174 00:12:34,020 --> 00:12:37,200 And if you look at the source, it turns out it's just, just sort of a linear feedback system. 175 00:12:37,400 --> 00:12:42,580 Which, which really means that any individual number is sort of the sum of, of a couple previous numbers. 176 00:12:42,800 --> 00:12:43,880 Maybe, maybe plus one. 177 00:12:44,360 --> 00:12:44,420 . 178 00:12:46,940 --> 00:12:50,180 So, you know, if you're, if you're more interested in looking at this random number generator stuff, 179 00:12:50,440 --> 00:12:51,340 you know, here are a couple of references. 180 00:12:51,460 --> 00:12:54,480 You can find them on the, on the slides on the CD and on the website. 181 00:12:55,260 --> 00:12:56,480 After, we'll show after the talk. 182 00:12:56,920 --> 00:13:02,680 But, you know, for now, now Scott's going to talk a little bit about breaking CAPTCHA using OCRs. 183 00:13:05,260 --> 00:13:07,940 So we're, we're recovering Perl programmers up here. 184 00:13:08,360 --> 00:13:09,320 So we're pretty lazy. 185 00:13:09,960 --> 00:13:12,100 We like to use other people's stuff wherever possible. 186 00:13:12,260 --> 00:13:14,340 Even better if we can use it just completely off the shelf. 187 00:13:14,420 --> 00:13:16,000 With no work involved at all. 188 00:13:19,800 --> 00:13:23,400 So fortunately there's some really good off the shelf OCR packages out there. 189 00:13:23,520 --> 00:13:24,740 We have Google to thank for some of that. 190 00:13:25,740 --> 00:13:28,580 One of the particularly good ones that we like to use a lot is Tesseract. 191 00:13:30,560 --> 00:13:33,760 Essentially our approach is just going to be to use these OCR engines as a black box. 192 00:13:34,080 --> 00:13:38,240 All we really care about is pre-processing the images to make them as suitable as possible for the OCR. 193 00:13:38,680 --> 00:13:41,960 And then post-processing the output of the OCR to make sure that we have a sensible solution. 194 00:13:41,960 --> 00:13:49,220 For example, a lot of CAPTCHAs are just going to be all lowercase characters or only numbers or something like that. 195 00:13:51,540 --> 00:14:00,300 So essentially what we're going to do in the pre-processing stage is make the image from the CAPTCHA as close as possible to typical text that OCR engines like to analyze. 196 00:14:00,840 --> 00:14:08,280 So a lot of that's going to involve removing noise, smoothing noise, despeckling, removing a bad background, stuff like that. 197 00:14:08,460 --> 00:14:10,480 So we can automate this as much as possible. 198 00:14:10,520 --> 00:14:11,940 Usually just with a couple of filter steps. 199 00:14:12,620 --> 00:14:15,320 It's important to note that this actually isn't adding any data. 200 00:14:15,440 --> 00:14:17,940 It's not giving us any more information about the CAPTCHA. 201 00:14:18,080 --> 00:14:19,820 It's just making it more suitable for the OCR. 202 00:14:21,580 --> 00:14:26,560 So here's a couple of examples of some simple CAPTCHAs with pre-processed and post-processed images. 203 00:14:27,600 --> 00:14:34,420 So for the most part, this is just a matter of, like the top example, for example, is a matter of just a thresholding algorithm. 204 00:14:34,660 --> 00:14:38,680 All we have to really do is drop out the background and the foreground is all black. 205 00:14:38,780 --> 00:14:39,480 So it works perfectly. 206 00:14:39,920 --> 00:14:41,060 In the second example, 207 00:14:41,060 --> 00:14:44,660 these people think that they've been a little clever by adding some lines to the background. 208 00:14:44,880 --> 00:14:47,760 There's not a lot of contrast between the characters and the lines. 209 00:14:48,060 --> 00:14:49,140 So that could be difficult. 210 00:14:49,360 --> 00:14:54,180 But the lines are really thin, so it's easy to just blur those, get rid of them, and then run the thresholding algorithm on the result. 211 00:14:55,700 --> 00:14:57,000 These are pretty easy examples. 212 00:14:57,180 --> 00:14:59,580 You wouldn't really see these on a high-profile site, at least not anymore. 213 00:15:00,640 --> 00:15:03,320 But we can even handle some pretty higher-level examples, too. 214 00:15:03,700 --> 00:15:08,760 So the top image, for example, has also taken the low-contrast approach. 215 00:15:08,760 --> 00:15:11,520 They're trying to reduce the contrast between the characters and the background, 216 00:15:11,740 --> 00:15:15,380 use some funky colors, run some gradients everywhere, make it a little more complicated. 217 00:15:15,800 --> 00:15:18,660 But once again, this is just a matter of an edge-finding algorithm. 218 00:15:19,380 --> 00:15:21,580 And then we run the same simple stages. 219 00:15:23,240 --> 00:15:26,300 Finally, in the last example, it's starting to get a little harder. 220 00:15:26,440 --> 00:15:27,740 We have a complicated background. 221 00:15:27,960 --> 00:15:30,600 There's hardly any contrast between the foreground letters and the background. 222 00:15:31,160 --> 00:15:33,320 And it's not going to be a simple matter of just blurring it. 223 00:15:33,620 --> 00:15:37,220 So we can do some complicated tricks here to try to separate the textures. 224 00:15:37,220 --> 00:15:39,300 If we just use a convolution matrix. 225 00:15:39,620 --> 00:15:44,240 This convolution matrix is really optimized for removing that specific texture 226 00:15:44,240 --> 00:15:45,920 and that specific scale of image. 227 00:15:46,420 --> 00:15:49,780 But really, most captchas are going to use similar textures between the background 228 00:15:49,780 --> 00:15:51,800 and the foreground across all of the images. 229 00:15:52,120 --> 00:15:55,560 So we can pre-optimize the convolution matrix for that captcha. 230 00:15:55,680 --> 00:16:00,660 If you really want to make a secure captcha, try to use these tricks in all sorts of bizarre combinations 231 00:16:00,660 --> 00:16:02,520 and randomize it as much as possible. 232 00:16:02,700 --> 00:16:07,060 That means the user has to write a classifier to identify what type of randomization algorithm 233 00:16:07,220 --> 00:16:08,120 is being used beforehand. 234 00:16:11,420 --> 00:16:14,760 So if we want to improve the quality of OCRing in general, 235 00:16:14,920 --> 00:16:20,040 we can retrain the OCR for a specific character set for that one captcha. 236 00:16:20,420 --> 00:16:21,900 Sometimes this can be really simple. 237 00:16:21,980 --> 00:16:25,660 It's just a matter of generating massive amounts of data with LaTeX or something like that. 238 00:16:26,280 --> 00:16:28,280 Sometimes you have to use actual captcha data. 239 00:16:30,940 --> 00:16:36,300 Here's a simple example with the captcha we saw on the second example of pre-processing. 240 00:16:37,220 --> 00:16:41,040 If we take the baseline accuracy of Tesseract with the English training set, 241 00:16:41,220 --> 00:16:45,140 we can read the whole captcha word about 28.5% of the time. 242 00:16:45,700 --> 00:16:47,540 And that's with 2,000 samples. 243 00:16:47,840 --> 00:16:53,000 If we then crop the character set so that Tesseract has been retrained for just uppercase letters, 244 00:16:53,260 --> 00:16:56,640 we can bump that up to 44.2%, which is pretty significant. 245 00:16:56,720 --> 00:16:57,940 It's huge for a spammer. 246 00:16:58,540 --> 00:17:04,180 And then just to further illustrate the significance of presenting multiple variants of the captcha, 247 00:17:04,300 --> 00:17:07,200 if we vote between multiple OCR results of this, 248 00:17:07,220 --> 00:17:09,760 the same word, we can bump that up to 96%, 249 00:17:09,760 --> 00:17:13,960 which is just unrealistic accuracy for trying to defend against. 250 00:17:15,940 --> 00:17:19,680 And now Mike is going to talk about some other strategies for cracking audio captchas. 251 00:17:23,320 --> 00:17:26,300 So shortly after the first captcha went out on the web, 252 00:17:26,480 --> 00:17:30,860 web developers realized that not everyone on the web can see. 253 00:17:32,180 --> 00:17:35,000 Everything that's on the web they can't see isn't necessarily a computer. 254 00:17:35,380 --> 00:17:37,160 And so there was suddenly a call for, 255 00:17:37,220 --> 00:17:38,620 for accessible captchas. 256 00:17:38,880 --> 00:17:42,040 And the response to this was audio captchas primarily. 257 00:17:42,980 --> 00:17:46,020 Now audio captchas, they're reasonably common. 258 00:17:46,140 --> 00:17:48,340 You can find them on most high profile sites. 259 00:17:48,820 --> 00:17:52,020 And they offer some advantages to the attacker. 260 00:17:52,360 --> 00:17:55,700 In particular, I think there's sort of two primary things. 261 00:17:56,220 --> 00:18:02,140 On the one hand, frequency domain filtering of sound is much more intuitive for most people. 262 00:18:02,420 --> 00:18:06,120 Most people, you can't think about frequency filtering for images. 263 00:18:06,400 --> 00:18:07,040 Right? 264 00:18:07,220 --> 00:18:10,780 And that's, you do a low pass filter and cut out, you know, low frequencies. 265 00:18:10,820 --> 00:18:11,640 You end up blurring it. 266 00:18:11,660 --> 00:18:14,560 High pass filtering sort of translates to an edge detection algorithm. 267 00:18:14,840 --> 00:18:16,060 But it's not really intuitive. 268 00:18:16,340 --> 00:18:19,840 But everyone thinks about frequency based filtering when they think about audio. 269 00:18:21,200 --> 00:18:24,600 And on the other hand, I think that there's, in a lot of senses, 270 00:18:24,800 --> 00:18:27,440 there's less room for noise in audio captchas. 271 00:18:27,740 --> 00:18:29,580 This is primarily due to two things. 272 00:18:29,760 --> 00:18:32,500 The first one is that generating good audio, 273 00:18:34,460 --> 00:18:36,580 generating speech that sounds good, 274 00:18:36,580 --> 00:18:38,700 is actually a quite difficult problem. 275 00:18:39,140 --> 00:18:42,240 And the other thing is that when people listen to somebody else 276 00:18:42,240 --> 00:18:43,760 and they understand what they're saying, 277 00:18:43,960 --> 00:18:46,440 a lot of the information about that, 278 00:18:46,540 --> 00:18:52,280 a lot of the information that goes into making the decision to classify that kind of information 279 00:18:52,280 --> 00:18:56,700 is coming from, say, nonverbal cues and prior contexts 280 00:18:56,700 --> 00:19:01,640 and other information that is not precisely encoded in the audio. 281 00:19:01,980 --> 00:19:04,680 And so this means that when you're trying to design an audio captcha 282 00:19:04,680 --> 00:19:07,680 that will be understood by a very wide spectrum of people, 283 00:19:07,980 --> 00:19:14,380 you have very little room to add noise that interferes with the segmentation 284 00:19:14,380 --> 00:19:21,800 or to add noise that, for example, people would have trouble understanding. 285 00:19:22,120 --> 00:19:25,180 So there's very little room for multiple accents and things like that 286 00:19:25,180 --> 00:19:27,680 in a useful audio captcha. 287 00:19:27,980 --> 00:19:29,760 And when you combine all of these things, 288 00:19:29,780 --> 00:19:33,120 it turns out that in many cases it's not even remotely, 289 00:19:33,120 --> 00:19:36,400 you know, not that difficult to get decent accuracy on these things. 290 00:19:38,000 --> 00:19:39,980 So when you're looking at an audio sample, 291 00:19:40,500 --> 00:19:43,060 you generally think about analyzing it in one of two domains. 292 00:19:43,280 --> 00:19:45,900 You're either looking at the time domain in which you just have a bunch of samples 293 00:19:45,900 --> 00:19:48,800 sort of moving up and down over time, 294 00:19:48,980 --> 00:19:50,580 or you're looking at it in the frequency domain, 295 00:19:50,760 --> 00:19:55,960 where you're looking at the distribution of energy in a particular frequency band. 296 00:19:56,080 --> 00:19:58,660 You're looking at how bass-heavy it is, how treble-heavy it is, 297 00:19:58,720 --> 00:19:59,920 and all of the frequency bands in the middle. 298 00:20:01,300 --> 00:20:03,100 So first let's look at the time domain 299 00:20:03,120 --> 00:20:06,080 readout of one particular audio captcha. 300 00:20:06,240 --> 00:20:07,820 Now you look at this captcha, right, 301 00:20:07,880 --> 00:20:09,580 this is just a time domain representation, 302 00:20:09,900 --> 00:20:11,680 and you see a bunch of spikes. 303 00:20:12,100 --> 00:20:13,520 You see a whole bunch of spikes. 304 00:20:14,160 --> 00:20:17,400 Now I wonder where the numbers are in this captcha. 305 00:20:19,000 --> 00:20:21,300 It turns out, if you look at the green arrows, 306 00:20:21,380 --> 00:20:22,380 those are all real numbers, 307 00:20:22,500 --> 00:20:25,040 and the red arrows are all not quite real numbers. 308 00:20:25,300 --> 00:20:26,960 You know, they're all sort of, this noise has been added 309 00:20:26,960 --> 00:20:30,080 to try and disrupt an automated classifier. 310 00:20:30,760 --> 00:20:31,640 But still, 311 00:20:33,120 --> 00:20:35,920 just looking at the peaks and using a simple peak-finding algorithm 312 00:20:36,980 --> 00:20:41,500 gets you really quite a far way towards looking at this stuff. 313 00:20:41,740 --> 00:20:43,880 So we have a short demo 314 00:20:43,880 --> 00:20:47,120 of running a simple peak-finding algorithm 315 00:20:47,120 --> 00:20:50,200 on an actual audio captcha I'd like to play. 316 00:20:54,720 --> 00:20:59,260 So running this is going to play... 317 00:21:17,440 --> 00:21:19,120 So as you can see, 318 00:21:19,280 --> 00:21:22,280 this captcha I think is encoding 9963, 319 00:21:22,640 --> 00:21:23,680 or something to that effect. 320 00:21:24,260 --> 00:21:26,580 But what happens is that the peak-finding algorithm 321 00:21:26,580 --> 00:21:27,960 finds all of the numbers, 322 00:21:28,040 --> 00:21:30,460 but it also finds a bunch of, sort of, 323 00:21:30,460 --> 00:21:33,020 a bunch of noise that's been, specifically, 324 00:21:33,120 --> 00:21:34,760 designed to interfere with a captcha. 325 00:21:35,540 --> 00:21:38,260 But the problem of actually solving that 326 00:21:38,260 --> 00:21:40,300 is sort of orthogonal, right? 327 00:21:40,800 --> 00:21:42,740 Once you've actually extracted all of the little, 328 00:21:42,840 --> 00:21:44,700 all of the individual number segments, 329 00:21:44,900 --> 00:21:46,520 then you're left with the problem of classifying, 330 00:21:47,840 --> 00:21:49,120 classifying between noise 331 00:21:49,120 --> 00:21:51,100 and between the different numbers. 332 00:21:52,200 --> 00:21:52,800 Yeah. 333 00:21:57,080 --> 00:21:57,680 So... 334 00:22:02,780 --> 00:22:03,760 Right. Okay. 335 00:22:03,880 --> 00:22:07,000 So in order to classify, 336 00:22:07,000 --> 00:22:08,800 in order to classify these segments, 337 00:22:08,880 --> 00:22:11,460 then you need to, you know, 338 00:22:11,460 --> 00:22:14,460 basically extract a small set of relevant features. 339 00:22:14,680 --> 00:22:16,980 You know, say, a vector with maybe, you know, 340 00:22:17,000 --> 00:22:20,500 somewhere between 10 and maybe 100 or 200 elements 341 00:22:20,500 --> 00:22:22,260 that you can use to write your classifier. 342 00:22:22,820 --> 00:22:24,860 And on top of that, then you need some sort of 343 00:22:24,860 --> 00:22:26,940 classifier algorithm to use that feature data 344 00:22:26,940 --> 00:22:29,280 to develop the actual matching set. 345 00:22:30,240 --> 00:22:32,400 Now, the thing about it, it turns out that, in speech, 346 00:22:32,640 --> 00:22:34,020 almost all of the actual information 347 00:22:34,020 --> 00:22:39,300 is encoded in the frequency domain, right? 348 00:22:39,400 --> 00:22:41,520 And this should be intuitively clear, 349 00:22:41,900 --> 00:22:43,900 because, you know, people can talk at different speeds, 350 00:22:44,000 --> 00:22:45,320 and they can talk at different loudness levels, 351 00:22:45,840 --> 00:22:47,720 and it more or less still works. 352 00:22:48,120 --> 00:22:50,080 You know, people can still understand what you're saying. 353 00:22:51,000 --> 00:22:51,460 So... 354 00:22:52,900 --> 00:22:53,940 In order to... 355 00:22:53,940 --> 00:22:55,760 It turns, and it also sort of turns out 356 00:22:55,760 --> 00:22:57,880 that it's possible to, in an efficient way, 357 00:22:57,940 --> 00:23:01,480 calculate the frequency content of a sample of audio 358 00:23:01,480 --> 00:23:06,040 in very efficiently, in a computationally efficient time, 359 00:23:06,180 --> 00:23:08,440 using something called the Fast Fourier Transform. 360 00:23:09,320 --> 00:23:09,660 And... 361 00:23:11,500 --> 00:23:13,760 Now, the great thing about doing this 362 00:23:13,760 --> 00:23:15,240 is that once you've done this, 363 00:23:15,340 --> 00:23:17,520 once you've converted your audio to the frequency domain, 364 00:23:17,780 --> 00:23:20,480 it becomes really straightforward to do frequency-level filtering, 365 00:23:20,580 --> 00:23:22,280 to run low-pass filters, to do things like that. 366 00:23:22,780 --> 00:23:24,220 And it also becomes, you know... 367 00:23:24,220 --> 00:23:25,940 And all of that's more intuitive for sound than for image. 368 00:23:27,700 --> 00:23:31,280 But one of the issues is that, you know, 369 00:23:31,280 --> 00:23:34,360 if you just run a Fourier Transformer 370 00:23:34,360 --> 00:23:36,320 and find the frequency content of every single frame 371 00:23:36,320 --> 00:23:37,380 in a short audio clip, 372 00:23:37,500 --> 00:23:38,680 then you end up with a huge amount of data, 373 00:23:38,800 --> 00:23:39,640 a lot of data. 374 00:23:40,780 --> 00:23:42,500 And, you know, I actually looked at 375 00:23:42,500 --> 00:23:43,700 a couple different feature sets, 376 00:23:43,840 --> 00:23:45,080 and it turned out that 377 00:23:45,080 --> 00:23:46,820 one of the most effective ways to look at this 378 00:23:46,820 --> 00:23:48,240 is something called the Power Spectral Density. 379 00:23:48,680 --> 00:23:51,180 And all this is doing is looking at the power 380 00:23:52,060 --> 00:23:53,320 of relative frequency 381 00:23:54,220 --> 00:23:55,640 is looking at the amount of energy contained 382 00:23:55,640 --> 00:23:56,800 in different frequency bands 383 00:23:57,820 --> 00:23:58,780 for different... 384 00:23:59,740 --> 00:24:02,580 for over the entire sample length. 385 00:24:02,940 --> 00:24:04,980 I'm not going to go into all the details of the math here, 386 00:24:05,120 --> 00:24:08,380 but that more or less worked well enough for me. 387 00:24:08,600 --> 00:24:10,440 So here's a quick demo of using 388 00:24:11,280 --> 00:24:12,640 the Power Spectral Density 389 00:24:13,000 --> 00:24:14,180 plus a simple classifier 390 00:24:14,180 --> 00:24:18,280 to identify the previously read system. 391 00:24:21,840 --> 00:24:23,920 So what this is doing is it's running 392 00:24:24,220 --> 00:24:26,420 a classifier against all of the little extracted samples, 393 00:24:27,200 --> 00:24:29,500 and then, you know, using that to figure out 394 00:24:29,500 --> 00:24:31,280 sort of which ones are noise and which ones aren't. 395 00:24:31,440 --> 00:24:33,480 And it prints out at the end the correct answer, 396 00:24:33,560 --> 00:24:36,240 which is 99663. 397 00:24:38,060 --> 00:24:39,600 Now, I should comment a little bit 398 00:24:39,600 --> 00:24:41,420 about, like, what classifier algorithms I'm using. 399 00:24:41,720 --> 00:24:44,120 This is a combination of a support vector machine, 400 00:24:44,280 --> 00:24:44,920 or an SVM. 401 00:24:45,500 --> 00:24:47,400 Again, I'm not going to go into the math here, 402 00:24:47,540 --> 00:24:49,120 but it's sort of a... 403 00:24:49,560 --> 00:24:51,840 It attempts to look at different classes 404 00:24:51,840 --> 00:24:53,000 and find, in some sense, 405 00:24:53,000 --> 00:24:54,460 the optimal separator, 406 00:24:54,560 --> 00:24:56,300 the optimal division between the two classes. 407 00:24:56,620 --> 00:24:59,120 And then another algorithm 408 00:24:59,120 --> 00:25:02,360 that simply calculates the error between two points. 409 00:25:03,420 --> 00:25:06,220 The error between the measured thing 410 00:25:06,220 --> 00:25:07,760 and the average of the training set. 411 00:25:08,300 --> 00:25:12,440 And it combines those to a cumulative score. 412 00:25:12,800 --> 00:25:13,700 And that works. 413 00:25:15,780 --> 00:25:16,340 Yeah. 414 00:25:19,740 --> 00:25:20,380 Oh, yeah. 415 00:25:24,280 --> 00:25:24,800 Okay. 416 00:25:25,520 --> 00:25:26,040 So... 417 00:25:28,760 --> 00:25:30,940 Yeah, so I think Scott's going to talk a little bit 418 00:25:30,940 --> 00:25:33,000 about another strategy 419 00:25:33,000 --> 00:25:37,820 for doing large-scale training of image captions. 420 00:25:38,520 --> 00:25:40,660 So presumably some of you might have been a little upset 421 00:25:40,660 --> 00:25:43,580 when we just glossed over actually training an OCR 422 00:25:43,580 --> 00:25:44,980 for a specific captcha. 423 00:25:45,460 --> 00:25:48,420 So unfortunately, such an approach 424 00:25:48,420 --> 00:25:50,860 is really, really, really time-intensive 425 00:25:50,860 --> 00:25:52,680 compared to every other approach 426 00:25:53,000 --> 00:25:53,640 that we've talked about so far. 427 00:25:53,900 --> 00:25:55,780 But sometimes you just have to take that approach. 428 00:26:06,960 --> 00:26:08,240 So this is a sheet... 429 00:26:08,240 --> 00:26:10,080 This is a sheet of a whole bunch of captchas. 430 00:26:11,660 --> 00:26:12,980 Several thousand samples. 431 00:26:13,480 --> 00:26:16,600 And it's identified with what the OCR algorithm 432 00:26:16,600 --> 00:26:19,820 using the base English training set thinks each letter is 433 00:26:19,820 --> 00:26:21,220 and where it thinks each letter is. 434 00:26:21,220 --> 00:26:23,180 As you can see, some of these letters 435 00:26:23,180 --> 00:26:24,160 are pretty poorly identified. 436 00:26:24,420 --> 00:26:25,660 A lot of them, it's split into two. 437 00:26:26,280 --> 00:26:28,080 Most of the letters, it can't even guess at all. 438 00:26:32,300 --> 00:26:34,040 So if we really want to make this accurate, 439 00:26:34,180 --> 00:26:36,240 we have to tell the OCR engine when we're training it 440 00:26:36,240 --> 00:26:38,380 exactly what each of these letters are 441 00:26:38,380 --> 00:26:40,680 and the complete bounding box around each letter 442 00:26:40,680 --> 00:26:42,160 so that it can segment it appropriately 443 00:26:42,160 --> 00:26:43,640 and extract the right features. 444 00:26:44,080 --> 00:26:47,480 Most of the OCR engines don't use a typical SVM classifier 445 00:26:47,480 --> 00:26:49,640 or nearest neighbor like we're using for audio captchas. 446 00:26:49,640 --> 00:26:51,760 They have a completely... 447 00:26:51,760 --> 00:26:53,800 Not completely, but somewhat different 448 00:26:53,800 --> 00:26:55,020 feature extraction approach. 449 00:27:01,920 --> 00:27:04,860 So what helps a lot in generating these training sets, 450 00:27:05,100 --> 00:27:07,440 the OCR engine is going to expect effectively 451 00:27:07,440 --> 00:27:12,300 a data file that summarizes each letter in the training set, 452 00:27:12,440 --> 00:27:14,040 where it is in the image, 453 00:27:14,260 --> 00:27:15,360 and what it's supposed to be. 454 00:27:16,720 --> 00:27:19,620 So if you have to have a human editing these massive features, 455 00:27:19,620 --> 00:27:20,020 training sets, 456 00:27:20,160 --> 00:27:22,080 it helps to have a tool to convert back and forth 457 00:27:22,080 --> 00:27:24,260 between something that you can easily edit 458 00:27:24,260 --> 00:27:27,340 and what the OCR engine actually expects. 459 00:27:28,000 --> 00:27:30,440 So among other examples on our website, 460 00:27:30,580 --> 00:27:32,220 we'll have a couple of scripts to convert back and forth 461 00:27:32,220 --> 00:27:35,600 between an SVG file, which you can easily edit with Illustrator, 462 00:27:35,680 --> 00:27:37,500 and the Tesseract box training file format. 463 00:27:56,340 --> 00:27:58,380 So really what we're trying to get at here 464 00:27:58,380 --> 00:28:01,180 is that almost every captcha on the internet right now, 465 00:28:01,240 --> 00:28:03,980 you can take a reasonable shot at with these techniques. 466 00:28:04,480 --> 00:28:06,120 And that includes the best of the best. 467 00:28:06,440 --> 00:28:09,520 I mean, even top five Alexa sites still have captchas 468 00:28:09,520 --> 00:28:12,080 that can fall victim to these techniques at some level. 469 00:28:12,420 --> 00:28:16,240 For a spammer, it's really enough just to get 2% to 5% accuracy. 470 00:28:16,500 --> 00:28:18,500 If you have a huge botnet at your control, 471 00:28:18,500 --> 00:28:21,240 then you can throw so many resources at it 472 00:28:21,240 --> 00:28:24,080 that it doesn't matter if you have a horrible accuracy rate. 473 00:28:25,220 --> 00:28:28,780 So the gist of this is that captchas aren't really good 474 00:28:28,780 --> 00:28:30,900 for protecting resources to that effect. 475 00:28:31,720 --> 00:28:34,780 So there's a couple things that you can do 476 00:28:34,780 --> 00:28:37,660 to try to make captchas a little bit more significant. 477 00:28:39,060 --> 00:28:42,960 The most effective of these is to integrate cultural knowledge. 478 00:28:44,160 --> 00:28:47,440 So, for example, a while back there was a Hot or Not captcha 479 00:28:47,440 --> 00:28:47,840 that... 480 00:28:48,520 --> 00:28:51,880 asked you to identify hot or not people in an image. 481 00:28:52,240 --> 00:28:54,460 And that might be a little more effective, 482 00:28:54,620 --> 00:28:56,360 but then you're limiting your user base, right? 483 00:28:56,460 --> 00:29:01,080 If you try to ask some Hawaiians what they think is attractive, 484 00:29:01,340 --> 00:29:03,300 then it might be different from a set of Australians. 485 00:29:04,600 --> 00:29:07,520 So we propose an alternate captcha. 486 00:29:10,200 --> 00:29:12,000 The Bourbon or Scotch captcha. 487 00:29:18,920 --> 00:29:21,100 Wow, I thought we had some funnier jokes in there, too. 488 00:29:21,980 --> 00:29:24,760 But to that effect, now we're going to open it up for questions. 489 00:29:25,200 --> 00:29:27,600 Any particularly good questions will be rewarded, 490 00:29:28,420 --> 00:29:31,320 if you're of age, of course, with a shot of bourbon. 491 00:29:31,380 --> 00:29:32,400 Or no, we don't have bourbon. 492 00:29:32,440 --> 00:29:33,520 Sorry, we have Scotch. 493 00:29:35,940 --> 00:29:36,460 Go ahead. 494 00:29:38,400 --> 00:29:38,800 Anybody? 495 00:29:40,300 --> 00:29:40,700 Nobody. 496 00:29:41,060 --> 00:29:41,880 I have a question. 497 00:29:42,360 --> 00:29:46,840 So it seems like the reason that people use the text-based captchas 498 00:29:46,840 --> 00:29:48,440 is because it's... 499 00:29:49,460 --> 00:29:50,660 it's a limited domain, 500 00:29:50,860 --> 00:29:52,880 so it's like anything you can generate. 501 00:29:53,040 --> 00:29:54,180 But if you're targeting images, 502 00:29:54,780 --> 00:29:56,160 there's a very limited domain. 503 00:29:56,520 --> 00:29:59,160 And if something's being shown to the website several times, 504 00:29:59,680 --> 00:30:02,500 is it very easy to get that controlled hot captcha 505 00:30:02,500 --> 00:30:03,720 to try to spit out? 506 00:30:04,680 --> 00:30:06,360 Yeah, that is a very valid concern. 507 00:30:06,520 --> 00:30:09,400 So what the question basically was that 508 00:30:09,920 --> 00:30:13,180 if you have something that's using a set of cultural images 509 00:30:13,180 --> 00:30:14,020 or something like that, 510 00:30:14,100 --> 00:30:16,040 it has to draw those images from a database. 511 00:30:16,040 --> 00:30:18,200 If that database is of limited size, 512 00:30:18,440 --> 00:30:21,400 then the attacker could just completely exhaust all the possibilities 513 00:30:21,400 --> 00:30:23,300 and just develop some sort of table 514 00:30:23,300 --> 00:30:25,720 to make it easier to pass that classifier. 515 00:30:25,980 --> 00:30:29,200 So you have to be careful when developing cultural captchas 516 00:30:29,200 --> 00:30:31,500 to make it more difficult to do that. 517 00:30:31,840 --> 00:30:37,540 So, for example, in a hypothetical bourbon or Scotch classifier, 518 00:30:38,320 --> 00:30:40,480 we might try to add randomness to the image 519 00:30:40,480 --> 00:30:43,380 or change the background behind the liquor bottle 520 00:30:43,380 --> 00:30:45,760 or add some distortion. 521 00:30:45,760 --> 00:30:47,520 Change the shading, something like that. 522 00:30:47,660 --> 00:30:49,240 There's a lot of approaches that you can take 523 00:30:49,240 --> 00:30:51,940 to try to reduce the attack surface 524 00:30:51,940 --> 00:30:54,700 of a database-backed cultural captcha like that. 525 00:30:58,180 --> 00:31:00,420 Yeah, I think they're already obsolete. 526 00:31:02,060 --> 00:31:06,320 It's so absurdly cheap to hire people to break captchas. 527 00:31:06,400 --> 00:31:08,340 Even if you're forced to use a human, 528 00:31:09,360 --> 00:31:11,680 the vast majority of resources out there 529 00:31:11,680 --> 00:31:14,720 are worth more than the cost of hiring somebody to solve a captcha. 530 00:31:21,000 --> 00:31:22,680 I'm not going to speculate on this. 531 00:31:22,700 --> 00:31:24,000 Something that grand right here. 532 00:31:24,640 --> 00:31:25,900 I'm happy to speculate. 533 00:31:26,160 --> 00:31:29,520 So, personally, I think the Turing test is a terrible test, 534 00:31:29,700 --> 00:31:31,240 mostly because people are pretty stupid. 535 00:31:31,400 --> 00:31:33,920 And it's really easy to convince a person 536 00:31:33,920 --> 00:31:35,120 that they're talking to another person. 537 00:31:36,700 --> 00:31:38,600 That's just my opinion, but anyway. 538 00:31:42,020 --> 00:31:42,800 Other questions? 539 00:31:49,160 --> 00:31:52,520 I think captchas are best used in conjunction 540 00:31:52,520 --> 00:31:53,540 with other techniques, 541 00:31:53,760 --> 00:31:56,540 but you really need to be concerned with rate limiting, 542 00:31:57,180 --> 00:32:01,240 user moderation, other things like that 543 00:32:01,240 --> 00:32:05,740 that can try to reduce the effectiveness of spamming 544 00:32:05,740 --> 00:32:07,180 or breaking into your resource. 545 00:32:07,960 --> 00:32:10,440 But really, you shouldn't expect to rely on a captcha. 546 00:32:16,940 --> 00:32:18,600 All right, well, I guess we're going to... 547 00:32:19,100 --> 00:32:19,500 Sorry? 548 00:32:24,220 --> 00:32:24,860 It's blended. 549 00:32:25,160 --> 00:32:26,080 Johnny Walker read. 550 00:32:29,260 --> 00:32:31,920 Oh, and you guys with the cultural captcha questions 551 00:32:31,920 --> 00:32:32,840 had some pretty good questions, 552 00:32:32,900 --> 00:32:34,720 so if you guys want to come up, feel free. 553 00:32:37,120 --> 00:32:37,520 . 554 00:32:41,700 --> 00:32:42,100 . 555 00:32:45,080 --> 00:32:45,480 . 556 00:32:45,480 --> 00:32:46,360 Yeah, I think the question was asking 557 00:32:46,360 --> 00:32:47,820 what we thought about recaptcha? 558 00:32:49,120 --> 00:32:52,100 So, recaptcha, by and large, is actually really quite good. 559 00:32:52,360 --> 00:32:52,780 I think... 560 00:32:52,780 --> 00:32:55,060 I haven't looked at their audio stuff carefully, 561 00:32:55,180 --> 00:32:56,220 but if I remember right, 562 00:32:56,240 --> 00:32:58,880 it has a little bit more noise than the stuff that we looked at, 563 00:32:59,380 --> 00:33:02,660 and their image stuff is really quite irritating to segments. 564 00:33:02,780 --> 00:33:04,740 Even though it doesn't have difficult backgrounds, 565 00:33:05,240 --> 00:33:07,080 they do a very good job of making 566 00:33:07,080 --> 00:33:09,780 the core problem of running OCR difficult. 567 00:33:11,180 --> 00:33:14,260 Their back-end implementation is also sort of quite innovative, 568 00:33:14,260 --> 00:33:17,240 in that they use sort of public and private keys 569 00:33:17,240 --> 00:33:19,800 to authenticate that a given CAPTCHA 570 00:33:19,800 --> 00:33:21,800 is coming from a given CAPTCHA solution 571 00:33:21,800 --> 00:33:24,480 from the same site that it was submitted by. 572 00:33:25,000 --> 00:33:26,880 But it does have a couple issues. 573 00:33:27,060 --> 00:33:31,340 In particular, it's essentially client-side 574 00:33:31,340 --> 00:33:34,460 in the sense that the client requests a CAPTCHA 575 00:33:34,460 --> 00:33:35,720 from the reCAPTCHA servers 576 00:33:35,720 --> 00:33:38,040 rather than from their website servers. 577 00:33:38,540 --> 00:33:40,120 And one of the side effects of this 578 00:33:40,120 --> 00:33:42,680 is that they don't really tie the CAPTCHA 579 00:33:42,680 --> 00:33:44,440 to any particular request. 580 00:33:44,920 --> 00:33:46,660 And so it turns out that it's possible 581 00:33:46,660 --> 00:33:50,200 to implement one of those simple implementation-based attacks, 582 00:33:50,840 --> 00:33:53,240 request a large number of CAPTCHAs for a single site, 583 00:33:53,340 --> 00:33:55,520 say, solve them using a very efficient 584 00:33:56,620 --> 00:33:57,860 mechanical Turk interface, 585 00:33:58,040 --> 00:34:00,540 and then use those over the course of the next, say, seven hours. 586 00:34:01,760 --> 00:34:03,340 So it's a good CAPTCHA. 587 00:34:03,400 --> 00:34:04,580 It has a few issues. 588 00:34:11,340 --> 00:34:12,160 You in the back? 589 00:34:14,360 --> 00:34:15,260 Go ahead, real loud. 590 00:34:19,620 --> 00:34:20,760 We can't hear you at all. 591 00:34:35,560 --> 00:34:37,000 Yeah, yeah, there we go. 592 00:34:43,060 --> 00:34:43,960 Let's take a picture. 593 00:34:44,160 --> 00:34:45,340 So if you don't want to follow that, 594 00:34:45,520 --> 00:34:47,620 we can make CAPTCHAs on the brain 595 00:34:47,620 --> 00:34:49,900 by using a little bit of voice recognition. 596 00:34:50,660 --> 00:34:51,860 And for example, 597 00:34:52,020 --> 00:34:54,080 if you have a CAPTCHA called for example, 598 00:34:56,740 --> 00:34:58,800 like if I have a CAPTCHA 599 00:34:58,800 --> 00:35:00,960 that I'm going to put a little bit of a name 600 00:35:00,960 --> 00:35:02,960 on several different bodies, 601 00:35:03,080 --> 00:35:05,220 I will say it's on this little one 602 00:35:05,220 --> 00:35:06,320 that's going to be covered. 603 00:35:07,340 --> 00:35:10,660 And that's going to be very naturalized. 604 00:35:10,700 --> 00:35:11,880 So things like that. 605 00:35:12,040 --> 00:35:12,560 Right? 606 00:35:17,600 --> 00:35:22,000 So I think the question is asking about 607 00:35:23,040 --> 00:35:24,320 with audio CAPTCHAs, 608 00:35:24,400 --> 00:35:26,660 the segmentation problem turns out to be very simple 609 00:35:26,660 --> 00:35:27,620 in current implementations, 610 00:35:27,720 --> 00:35:29,300 but there are a lot of things that you can do 611 00:35:29,300 --> 00:35:30,040 to make it much harder. 612 00:35:30,160 --> 00:35:32,440 For example, you might play a trombone 613 00:35:32,440 --> 00:35:36,160 or a music behind a person speaking numbers. 614 00:35:36,280 --> 00:35:38,680 And that makes the actual analysis much more difficult. 615 00:35:39,120 --> 00:35:41,500 So I think that one of the real problems here 616 00:35:41,500 --> 00:35:42,660 is that if you have a CAPTCHA that's going to be 617 00:35:42,660 --> 00:35:43,140 it's going to be a little bit more difficult 618 00:35:43,140 --> 00:35:43,180 to understand what's going on. 619 00:35:43,180 --> 00:35:45,920 I'm not really convinced that people are good enough 620 00:35:45,920 --> 00:35:47,240 at understanding these things 621 00:35:47,240 --> 00:35:49,280 that you have a lot of room to do that 622 00:35:49,740 --> 00:35:50,660 before you start, 623 00:35:50,820 --> 00:35:52,600 the human error rate gets too large. 624 00:35:52,980 --> 00:35:54,880 And the usability just gets too low. 625 00:35:55,600 --> 00:35:56,660 I might be wrong. 626 00:35:56,860 --> 00:35:58,660 I haven't done any careful studies about that. 627 00:35:58,780 --> 00:36:00,400 But that's sort of my hunch 628 00:36:00,400 --> 00:36:02,220 about why you don't see that more often 629 00:36:02,220 --> 00:36:04,400 in current implementations for example. 630 00:36:04,900 --> 00:36:07,500 And why it might not end up being a problem. 631 00:36:07,880 --> 00:36:10,080 But yeah, certainly if people really started 632 00:36:10,080 --> 00:36:11,500 trying to generate conversational speech 633 00:36:11,500 --> 00:36:12,280 and things like that, 634 00:36:12,280 --> 00:36:14,260 then that becomes very difficult. 635 00:36:19,120 --> 00:36:20,260 It's really sort of unfortunate 636 00:36:20,260 --> 00:36:22,060 that we have to worry about all these pesky users. 637 00:36:22,360 --> 00:36:24,500 It'd be a lot easier to develop strong CAPTCHAs if we didn't. 638 00:36:34,300 --> 00:36:34,700 Yeah. 639 00:36:40,160 --> 00:36:42,080 Yeah, so there are a lot of great 640 00:36:42,080 --> 00:36:44,140 text-based CAPTCHAs out there that for example, 641 00:36:44,160 --> 00:36:45,460 ask you to solve math problems 642 00:36:45,460 --> 00:36:47,080 or ask you simple cultural questions. 643 00:36:47,360 --> 00:36:49,820 But these suffer from the same kind of implementation pitfalls 644 00:36:49,820 --> 00:36:53,140 of the other database-backed cultural questions out there. 645 00:36:53,740 --> 00:36:55,200 If you have the same math problem 646 00:36:55,200 --> 00:36:56,780 that's being presented in the same format 647 00:36:56,780 --> 00:36:57,480 every single time, 648 00:36:57,680 --> 00:36:59,900 it's a lot easier for a computer to solve that than a human. 649 00:37:00,660 --> 00:37:02,580 If you have cultural questions like this, 650 00:37:02,600 --> 00:37:04,680 then you have to have a huge set of questions. 651 00:37:04,700 --> 00:37:05,720 A set of questions to draw from 652 00:37:05,720 --> 00:37:07,040 in order to make it difficult to break. 653 00:37:15,620 --> 00:37:17,360 That would probably be the most ideal, 654 00:37:17,520 --> 00:37:20,000 but if the spammer can access the same live stream, 655 00:37:20,200 --> 00:37:22,020 then you're limited there as well. 656 00:37:23,320 --> 00:37:24,080 But good question. 657 00:37:42,760 --> 00:37:44,020 That's a great point, 658 00:37:44,120 --> 00:37:47,480 and I think that sort of thing can be somewhat more secure, 659 00:37:47,620 --> 00:37:48,580 but realistically, 660 00:37:48,780 --> 00:37:51,500 spammers have access to a lot more computational resources 661 00:37:51,500 --> 00:37:53,360 than your typical web user, 662 00:37:53,580 --> 00:37:56,600 especially depending on your type of client. 663 00:37:56,820 --> 00:37:58,840 If you're trying to appeal to grandmas 664 00:37:58,840 --> 00:38:00,000 with five-year-old computers, 665 00:38:00,180 --> 00:38:03,000 then it'll be a lot easier for a spammer 666 00:38:03,000 --> 00:38:04,680 with a huge farmhouse, 667 00:38:04,680 --> 00:38:05,820 or a firm of EC2 instances, 668 00:38:06,000 --> 00:38:08,260 to break your CAPTCHA than for the grandma. 669 00:38:11,160 --> 00:38:13,440 I'm personally really quite skeptical 670 00:38:14,140 --> 00:38:18,180 about using that sort of computational problem 671 00:38:18,880 --> 00:38:20,520 to rate limit things like this, 672 00:38:20,660 --> 00:38:24,200 simply because you really end up with this equation saying, 673 00:38:24,320 --> 00:38:25,720 well, the more CPU power I have, 674 00:38:25,820 --> 00:38:27,080 the more evil I'm allowed to do. 675 00:38:27,720 --> 00:38:29,560 And so you drive a very strong incentive, 676 00:38:29,740 --> 00:38:30,180 for example, 677 00:38:30,300 --> 00:38:31,700 for someone to, say, 678 00:38:31,780 --> 00:38:33,520 implement your core problem 679 00:38:33,520 --> 00:38:35,640 on a bank of FPGAs, for example, 680 00:38:36,420 --> 00:38:38,600 at which point they're doing orders of magnitude 681 00:38:38,600 --> 00:38:39,820 more evil than the average person 682 00:38:39,820 --> 00:38:41,320 and still destroying your site. 683 00:38:41,760 --> 00:38:44,660 So I don't think that's a very good solution 684 00:38:44,660 --> 00:38:45,260 in the long run. 685 00:38:54,480 --> 00:38:55,820 All right, well, thank you very much.