12 ms·
How to break a Captcha system in 15 minutes with Machine Learning
- bob_theslob646 9y agoThe problem is that CAPTCHA's have evolved. Some you have to click objects in an image, others you have to click something to prove you are not human. Unfortunately, I think those mentioned in the post, will be a thing of the past.
- ibelimb 9y agoAnd sadly it seems the bots have improved even more then the CAPTCHA's. Googles latest variation of "Click on all boxes that contain X until none are shown" takes a significant amount of time to complete. It also seems that the faster you are in clicking the images the longer the next image takes to load, often leading to me hitting submit only to have to start all over again since the next image still contained what Google was looking for. Sometimes I think it might be easier to just run a ML algorithm to complete them for me...
- brango 9y agoThe book is $645?!?!?
- zionsrogue 9y agoHi, Adrian here, author of the book you are referencing. You are referring to the highest tier of the book. There are other lower tiers as well that are cheaper. The highest tier (again, which you are referring to) includes 800+ pages, detailed experiment journals on how to reproduce the state-of-the-art publications (ResNet, SqueezeNet, VGG, etc.) on ImageNet (which is 1.2 million images). I demonstrate how to implement each model from scratch and then train them, detailing which parameters to change and when. The highest tier is for people looking to train really large networks on massive datasets where you could be spending thousands of dollars in the cloud for GPU costs (you can't train these networks without a GPU, or ideally multiple GPUs). I've also included the pre-trained models as well if people want to get started with them and skip training. This tier is really for researchers/practitioners who need to save time and finances by starting with experiment journals that detail how to replicate the results. The lower tiers are for people just (1) getting started with deep learning in context of computer vision and/or (2) looking to apply best practices. Each book also includes video tutorials/lectures once I have finished putting them together. Realistically I should rebrand the book as a course as it's much more in line with something you would get from Udacity (only with more theory and more detailed code and implementations). If anyone has any questions about the book do feel free to ask.
- brango 9y agoI see. Rebranding as a course might help. If I were you I'd also consider A/B testing without the hard-sell/marketing hype style page. Personally I equate these sorts of 'You're probably wondering... "Is this book right for me?"' things as massive scammy red flags and a complete turn-off.
- zionsrogue 9y agoA/B testing is absolutely on my roadmap. I'm finishing up a few bonus chapters for the book/course now. Based on previous A/B tests on the site (for other products) I have a good idea of what works well for the general audience of my viewers. But I totally understand that the messaging will not work for everyone and it's something I hope I can address in 2018. Thanks for the comment.
- sytelus 9y agoNo offense, but your book website looks lot like a late night TV ads and frankly leaves a bad taste. The way I like to buy a book is go to Amazon, look at table of content, read few pages and most importantly read some reviews. Your book currently doesn't even appear in Amazon search (or even Google search). Despite myself being quite active in the field, I had never heard about your book before (I know of at least other dozen books on the subject). I wonder this is why you might have relatively much lower volume and such a high price to make up for your revenue target. I would think putting your book on Amazon would increase your volume by an order of a magnitude (or two) and help reduce price to may be 1/7th or 1/8th without requiring tiered pricing (which again is a huge turnoff) while increasing your net revenue actually more than before (probably by an order of magnitude). You might want to look in the theory and economics of price-volume curves. The biggest problem with your book website is that you as an author comes out as hard-selling hard-charging marketer who wants to maximize profits and make a sell like an old car salesman to anyone who is walking by rather than experienced calm expert for who learning, teaching, academic honesty and integerity is more important than making money. Again, not saying this is who you are, it just feels that way from the style and content of the book website. Hope this helps.
- 9y ago
- verroq 9y agoHow difficult is it to include the separation step as part of the ML pipeline to make it end to end?
- GistNoesis 9y agoIt can be almost as easy, but it can be made as hard as you want. These kind of Captcha exercises are a fun way to test ideas especially if you want to work on "attention" models (spatial Transformers, ROI, deformable convolutions, soft attention, hard attention). You can also try to "read" one letter at a time using a RNN. You may even test the new capsule networks for their rotation invariance. All these different network architectures, encode various strategies one can use to decode a picture. Obviously all will work at > 99% on the simple cases, but as you increase the captcha difficulty you will see that the more modern architectures can trade computation for increased accuracy.
- quadrature 9y agothis is exactly what the "you only look once" model does. It will give you bounding boxes and a classification for every object in the image it recognizes. https://pjreddie.com/darknet/yolo/ https://pjreddie.com/darknet/yolo/
- adrianN 9y agoI'm pretty sure you could break these trivial captchas with nothing more than a kNN classifier. There is no need to involve deep neural networks here.
- dangerlibrary 9y agoYou might be right. But who cares if using a deep neural network takes 15 minutes? There’s also no need to use a chainsaw to cut down a Christmas tree, but if you’re already holding a chainsaw...
- Blazespinnaker 9y agoIs dnn a chainsaw? I dunno. More like a Home Depot multipurpose power tool.
- zionsrogue 9y agoThe model used in the post (LeNet) is very small compared to what we typically think of in terms of modern deep neural networks. The LeNet architecture itself was published in the 1990s and was designed for character recognition so this is a natural application of it. kNN would work for many characters in this example, but you would run into a problem with overlapping text. kNN on raw pixel intensities requires a nice segmentation of the ROI. More image processing/segmentation/morphological operations could be applied to help in that case, but given a small network architecture that will naturally learn these filters a tiny CNN works well with little preprocessing.
- philipodonnell 9y agoWhen someone solves a problem with a thing and you're not that impressed, the best response is "cool" or "learning new things is fun" or, like, nothing. Telling someone they didn't need to do it with that tool is presuming that a) you know why they did it, b) that you are able to judge the suitability for that of that tool for that purpose and under those constraints, and c) that there is no one else who has ever needed to use that exact tool to solve that exact problem under those same constraints.
- 9y ago
- orliesaurus 9y agoGood article! I don't know what you call those new Google captcha, where you have to press "I am not a robot" and then you are given a bunch of images and a question that goes something like: "Select all images that contain cars" Do you consider that a CAPTCHA? Or is it something else? Now that's one system that I would like to see beaten. From the article: Yep, it generates 4-letter CAPTCHAs using a random mix of four different fonts. And we can see that it never uses “O” or “I” in the codes to avoid user confusion. this seems to be a very simple CAPTCHA system to beat from a ML problem perspective, right?
- eXpl0it3r 9y agoI would like this NOT to be broken. reCAPTCHA is currently one of the few captcha systems the still work to some extend. It locks out most spam bots and keeps my sites clean. Of course it's a good idea to try and break it, to see how "secure" it is.
- tyteen4a03 9y agoOne thing I find works really well is context-based question captchas. You ask human visitors some very simple question about your site, and unless the robot brute-force, it's very hard for robot spammers to get it right.
- JorgeGT 9y agoYep, I saw this in rtl-sdr.com! They ask, for instance what does the S in SDR stands for, which obviously any legitimate commenter in such a niche site knows.
- sp332 9y agoI think it mostly works by inspecting your browser environment to see if it looks like a bot. I'm not really convinced that the pictures do much.
- ibelimb 9y agoUnfortunately the latest revision of reCAPTCHA has become such a pain that I've come very close to just giving up on signing up for whatever service it is I'm trying to use that has it implemented. I have to go through several attempts to verify myself because Google didn't like that I missed one box with a car in it and have to start all over looking for street signs.
- EGreg 9y agoSince Machine Learning via CNNs and MCTS became mainstream, is there any CAPTCHA that makes any sense today?
- IshKebab 9y agoThere are some tasks that haven't been solved well by machine learning algorithms yet. Like visual question answering. However I'm not sure how easy it would be to get them into the form of a CAPTCHA without making it easy for a bot to just guess and get it right a lot of the time. And even though they haven't been solved well, it's probably good enough to get past a CAPTCHA a lot of the time. I expect these sort of systems will move to 'social proofs' - do you have a long-standing account etc.
- EGreg 9y agoWhy not ask the kind of questions Cyc was designed for? Maybe it will spur research in that area. https://en.m.wikipedia.org/wiki/Cyc https://en.m.wikipedia.org/wiki/Cyc
- nytf3 9y agoCool writeup! Although I agree those captcha's are fairly trivial. In college I wrote a term paper on breaking Microsoft's captcha (which is a little harder but not by much) twice: first with a simple template-based classification method and then a CNN approach. https://www.dropbox.com/s/jfp5xbv3eh589f6/6_857_CAPTCHA.pdf?dl=0 https://www.dropbox.com/s/jfp5xbv3eh589f6/6_857_CAPTCHA.pdf?... At the end, we go over approaches that would help captchas fight attacks. I think the quick flickering approach would work best (split the image into uneven parts, flicker them quickly so the human eye can read the aggregate image but any single slice doesn't show the full picture, and the superimposed image is incorrect)
- ageitgey 9y agoCool idea and thanks for sharing! One of the challenges here (which I'm sure you are very aware of) is that perception tricks that fool computers like flickering images also can block out users with different types of visual impairments. Sometimes users with even minor or infrequently-symptomatic visual impairments won't be able to read an image[1] that uses a special "trick" like this. For example, consider the risk of triggering an epileptic seizure with flickering. At a certain point it becomes an accessibility/legal issue. [1] The animated example from nytf3's paper - please note that in contains strong flickering: http://people.csail.mit.edu/recasens/images/captcha.gif http://people.csail.mit.edu/recasens/images/captcha.gif
- ChristianGeek 9y agoWould flickering even be necessary? Why not just overlay several transparent GIFs/PNGs? It’s still hackable (so is the flickering solution), but you could also add in a few more tricks to make it more work for the hackers. For example, combine the layers dynamically into a single image with a separate HTTP request to retrieve the (random) positions of each layer within that image. (Just a thought...you could make it as simple or as complex as you want.)
- lozenge 9y agoThat seems more like security by obscurity - as soon as somebody realises you are doing that, they can visit your site with headless Chrome and break it easily.
- lhuser123 9y agoI really liked this article. Even with a very limited basic understanding about machine learning or image processing, I was able to understand what the author was talking about. Well done.
- flavio81 9y ago>Since we have the source code to the WordPress plug-in, we can modify it to save out 10,000 CAPTCHA images along with the expected answer for each image. This is the key to doing this in the easiest way possible. The training set is created almost automatically!
- username223 9y agoHah! Come to think of it, CAPTCHA is basically the definition of "security through obscurity," except worse: it's "security through the difference between obscurity to machines and clarity to humans," and that's a game that will keep getting harder to win.
- kernelbandwidth 9y agoThis is supposedly a feature and not a bug of CAPTCHA, at least according to the apocryphal story John Lafferty told me. IIRC, this was at CMU so he must have been referring to the 2003 CAPTCHA claim by von Ahn et al. The idea was primarily to stop spammers, but also secondarily to make them more useful. The argument was that if spammers managed to "break" CAPTCHA, then whatever technology was used to break it would necessarily be a useful (compared to 2003 knowledge) advance in AI, so it was a win-win whether it stopped spammers or just made them do free out-of-band research.
- username223 9y agoYes, back in the day, CAPTCHA was a good way to use human time trying to submit forms to both block spam-bots, and do useful work (e.g. label training data). This worked well when ML was bad at image recognition, but that's no longer the case. Unfortunately, as ML got better at the tasks, CAPTCHAs forced humans to do more work, and we're now at a point where either the machines are better, or it's not worth the humans' time. If your site has a CAPTCHA, there's a good chance I'll just close the tab and move on.
- pixl97 9y ago
- bogomipz 9y agoI have a tangential question regarding this post. I have notice more recently at I am asked to identify object(signs, roads etc.)using multiple iterations. It's not unusual to be asked to identify these on 3 separate iterations. This is despite identifying all cells correctly on both the first and second passes. I don't believe it was always this way. What is the reason for this? Is there some heuristic in the captcha program that decides to ask for further identification or is this randomly generated?
- ageitgey 9y agoGoogle is literally using you as unpaid labor to label/validate their image datasets. My guess is that either (1) your first attempt at validation didn't match what their automated system identified so it didn't have high enough confidence to proceed or (2) the first image is one you are classifying from scratch but the second/third image is the one that you are only validating against their guess. In either case, it's amazing to me that Google is able to get the whole world to do unpaid menial work for them by offering a free product to website owners.
- ranie93 9y ago>In either case, it's amazing to me that Google is able to get the whole world to do unpaid menial work for them by offering a free product to website owners. Its an example of the https://en.wikipedia.org/wiki/Principal%E2%80%93agent_problem https://en.wikipedia.org/wiki/Principal%E2%80%93agent_proble....
- granitosaurus 9y ago> Google is literally using you as unpaid labor to label/validate their image datasets. Can't believe people are not going up in arms about it. This malware makes public access points unusable.
- sebleon 9y agoHa, I believe Duolingo is doing the same - getting their users to translate huge bodies of text while learning new languages
- michaelmcmillan 9y agoGreat post, but could you not have saved a lot of time by generating CAPTCHA images with a single characters, instead of separating them after the fact?
- cypherpunks01 9y agoI think the point is to use a realistic example
- kejaed 9y agoThey could have done that but then the data wouldn't have been the same as it would be when they were trying to solve real CAPTCHAs. The OpenCV part where they found the characters in the CAPTCHA leads to some messiness in the training data, which will also be there in the 'real' CAPTCHA data when the system is tested. I'd say training the model on this messy data would lead to better results, especially for the case where the letters overlap.
- sAbakumoff 9y agoTo me it's very strange that someone is using some alternative to google captcha which has 2 obvious advantages: 1) it's not hackable 2) with every click you contribute to the driverless cars vision improvement.
- amorphid 9y ago> with every click you contribute to the driverless cars vision improvement Interesting I hadn't heard that. Supporting links: --neural nets captcha analysis-- https://spectrum.ieee.org/tech-talk/robotics/artificial-intelligence/artificial-intelligence-beats-captcha https://spectrum.ieee.org/tech-talk/robotics/artificial-inte... --obligatory XKCD-- https://xkcd.com/1897/ https://xkcd.com/1897/
- sAbakumoff 9y agoI think it's kind of obvious - most of those pictures you face in the captcha are bridges, cars, street signs, these are free training data for google cars.
- WalterBright 9y agoI'll be impressed when they can decipher my grandmother's Suetterlin handwriting.
- badrabbit 9y agoThis makes me think,why not use trained humans to come up with challenges that can't be solved easily or efficiently with training data. As an example, a team of 2,000 humans can come up with about 10,000 challenges an hour to be solved by 1,000,000 visitors an hour. The key being humans trained to generate questions and challenges that they themselves wouldn not have to solve as part of any regular activity or event. The labor cost can obviously be outsourced(or not) and it makes sense to charge as a service to sites. However,this makes me ask one more question - what if popularity in ML creates meanial jobs for humans similar to my theoretical solution? Everyone looks at the benefits of ML,but all good technologies get abused and it's hard to imagine even more ML countering abused ML.
- firethief 9y agoCreating menial jobs isn't a problem. People being in situations where they need to settle for menial jobs is the problem.
- sattoshi 9y agoWhat questions? It would need 1) Not easily searchable 2) Not math-based 3) Easy 4) Internationalizable I would see "spot the grammar mistake" as one that furfills 1-3, but can't figure out oone that does all 4.
- emilfihlman 9y agoOne wouldn't even need to generate those 10k images. Simply integrate the code together and generate on the fly. Much faster and simpler!
- Dolores12 9y agoAuthor did not explain how he created X_train, Y_train, X_test, Y_test. I am pretty sure he was fast enough to create it in 10 seconds or less.