Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1179821
  • 博文数量: 272
  • 博客积分: 3899
  • 博客等级: 中校
  • 技术积分: 4734
  • 用 户 组: 普通用户
  • 注册时间: 2012-06-15 14:53
文章分类

全部博文(272)

文章存档

2012年(272)

分类: 网络与安全

2012-06-26 11:04:03

近日有人写了个GreaseMonkey的脚本来破解验证码,其中用到了Canvas 的 getImageData 这个API

演示了如何识别  所使用的验证码。

John Resig 为此专门写了一篇blog来分析这个脚本的原理

http://ejohn.org/blog/ocr-and-neural-nets-in-javascript/

  1. The HTML 5 Canvas getImageData API is used to get at the pixel data from the Captcha image. Canvas gives you the ability to embed an image into a canvas (from which you can later extract the pixel data back out again).
  2. The script includes an implementation of a , written in pure JavaScript.
  3. The pixel data, extracted from the image using Canvas, is fed into the neural network in an attempt to divine the exact characters being used - in a sort of crude form of .

对于奋斗在第一线的跨站师们来说,这绝对是一个好的不能再好的消息,至少曙光初现。这意味着以后可以在XSS后,调用一个javascript函数,识别验证码了。

DEMO的演示不是很复杂,我们甚至可以改进他的算法,从而破解更多更复杂的验证码,这是一项需要有耐心的工作。
阅读(1679) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~