登录接口验证码识别爆破

admin 2023年10月19日17:29:11评论48 views字数 1352阅读4分30秒阅读模式


在渗透测试中我们可能遇到如下的验证码。

登录接口验证码识别爆破

很漂亮的验证码,可以进行图像识别

burpsuite现在常用的验证码识别的插件有

captcha-killer-modified:https://github.com/f0ng/captcha-killer-modified

下载后,在extender模块加载

登录接口验证码识别爆破

下载py文件,

登录接口验证码识别爆破

识别模板如下:

POST /reg HTTP/1.1Host: 127.0.0.1:8888Connection: closeCache-Control: max-age=0Authorization: Basic f0ngauthUpgrade-Insecure-Requests: 1User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36Sec-Fetch-Mode: navigateSec-Fetch-User: ?1Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3Sec-Fetch-Site: noneAccept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9Content-Type: application/x-www-form-urlencodedContent-Length: 55
<@BASE64><@IMG_RAW></@IMG_RAW></@BASE64>



注意:如果在运行的时候报如下错误

AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

登录接口验证码识别爆破



解决办法参考:

https://baijiahao.baidu.com/s?id=1775432196700665405&wfr=spider&for=pc

方案一,修改ddddocr的_init_.py文件,将其中的ANTIALIAS替换为新方法:

# image = image.resize((int(image.size[0] * (64 / image.size[1])), 64), Image.ANTIALIAS).convert('L')image = image.resize((int(image.size[0] * (64 / image.size[1])), 64), Image.LANCZOS).convert('L')

方案二,降级Pillow的版本,比如使用9.5.0版本

先卸载,再重新安装

pip uninstall -y Pillow

pip install Pillow==9.5.0

登录接口验证码识别爆破

登录接口验证码识别爆破

登录接口验证码识别爆破

登录接口验证码识别爆破

注意,插件要勾选使用

登录接口验证码识别爆破

参考链接

https://mp.weixin.qq.com/s/R9AN2v66Mc7t5BlHFR9_0Q

https://mp.weixin.qq.com/s/_P6OlL1xQaYSY1bvZJL4Uw


原文始发于微信公众号(进击的HACK):登录接口验证码识别爆破

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年10月19日17:29:11
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   登录接口验证码识别爆破https://cn-sec.com/archives/2125164.html

发表评论

匿名网友 填写信息