当前位置: 首页 > news >正文

注册安全分析报告:熊猫频道

前言

由于网站注册入口容易被黑客攻击,存在如下安全问题:

  1. 暴力破解密码,造成用户信息泄露
  2. 短信盗刷的安全问题,影响业务及导致用户投诉
  3. 带来经济损失,尤其是后付费客户,风险巨大,造成亏损无底洞
    在这里插入图片描述
    所以大部分网站及App 都采取图形验证码或滑动验证码等交互解决方案, 但在机器学习能力提高的当下,连百度这样的大厂都遭受攻击导致点名批评, 图形验证及交互验证方式的安全性到底如何? 请看具体分析

一、 熊猫频道 PC 注册入口

简介:熊猫频道是央视网全力打造的,以大熊猫为主题,以多终端、多语种为媒介的国际化新媒体产品。通过7X24小时全方位全时段直播,海量原创点播微视频,大熊猫野化放归、繁育交配、新生大熊猫宝宝亮相及其他珍稀物种等热点内容移动直播和专题,手机端、网页端及社交平台,对民众普及关于大熊猫和其他珍稀物种保护的知识,向民众展示近年来中国对生物多样性保护和生态环境保护的成果。

在这里插入图片描述

二丶 安全分析:

采用传统的图形验证码方式,具体为4个英文字母,ocr 识别率在 95% 以上。

测试方法:
采用模拟器+OCR识别

1. 模拟器交互


private static String INDEX_URL = "https://www.beiwaiclass.com/user/login.do?method=signup";	@Overridepublic RetEntity send(WebDriver driver, String areaCode, String phone) {RetEntity retEntity = new RetEntity();try {driver.get(INDEX_URL);WebElement tabElement = driver.findElement(By.xpath("//span[contains(text(),'手机快捷登录')]"));tabElement.click();// 输入手机号WebElement phoneElemet = driver.findElement(By.id("p_mobile_reg_phone"));phoneElemet.sendKeys(phone);WebElement getCodelement = driver.findElement(By.className("phoneCode"));getCodelement.click();Thread.sleep(1 * 1000);byte[] imgByte = GetImage.callJsById(driver, "picForVerify");int len = (imgByte != null) ? imgByte.length : 0;// 调用 ddddOcr 识别图像验证码String imgCode = (len > 10) ? ddddOcr.getImgCode(imgByte) : null;if (imgCode == null || "".equals(imgCode)) {System.out.println("len=" + len + ",imgCode=" + imgCode);return null;}By byInput = By.id("validateNumber_quick");driver.findElement(byInput).sendKeys(imgCode);getCodelement.click();Thread.sleep(1000);WebElement msgElement = driver.findElement(By.className("time"));String gtInfo = (msgElement != null && msgElement.isDisplayed()) ? msgElement.getText() : null;retEntity.setMsg(imgCode + "->" + gtInfo);if (gtInfo != null && gtInfo.contains("s")) {retEntity.setRet(0);ddddOcr.saveFile("BeiWaiClass", imgCode, imgByte);} else {gtInfo += ",imgCode=" + imgCode;retEntity.setMsg(gtInfo);}return retEntity;} catch (Exception e) {System.out.println(e.toString());retEntity.setRet(-1);retEntity.setMsg(e.toString());} finally {driver.manage().deleteAllCookies();}return retEntity;}

2. 获取图形验证码


public static byte[] callJsById(WebDriver driver, String id) {return callJsById(driver, id, null);}public static byte[] callJsById(WebDriver driver, String id, StringBuffer base64) {String js = "let c = document.createElement('canvas');let ctx = c.getContext('2d');";js += "let img = document.getElementById('" + id + "'); /*找到图片*/ ";js += "c.height=img.naturalHeight;c.width=img.naturalWidth;";js += "ctx.drawImage(img, 0, 0,img.naturalWidth, img.naturalHeight);";js += "let base64String = c.toDataURL();return base64String;";String src = ((JavascriptExecutor) driver).executeScript(js).toString();String base64Str = src.substring(src.indexOf(",") + 1);if (base64 != null) {base64.append(base64Str);}byte[] vBytes = (base64Str != null) ? imgStrToByte(base64Str) : null;return vBytes;}

3.图形验证码识别(Ddddocr)


public String getImgCode(byte[] bigImage) {try {if (ddddUrl == null) {System.out.println("ddddUrl=" + ddddUrl);return null;}long time = (new Date()).getTime();HttpURLConnection con = null;String boundary = "----------" + String.valueOf(time);String boundarybytesString = "\r\n--" + boundary + "\r\n";OutputStream out = null;URL u = new URL(ddddUrl);con = (HttpURLConnection) u.openConnection();con.setRequestMethod("POST");con.setConnectTimeout(10000);con.setReadTimeout(10000);con.setDoOutput(true);con.setDoInput(true);con.setUseCaches(true);con.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);out = con.getOutputStream();if (bigImage != null && bigImage.length > 0) {out.write(boundarybytesString.getBytes("UTF-8"));String paramString = "Content-Disposition: form-data; name=\"image\"; filename=\"" + "bigNxt.gif" + "\"\r\n";paramString += "Content-Type: application/octet-stream\r\n\r\n";out.write(paramString.getBytes("UTF-8"));out.write(bigImage);}String tailer = "\r\n--" + boundary + "--\r\n";out.write(tailer.getBytes("UTF-8"));out.flush();out.close();StringBuffer buffer = new StringBuffer();BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"));String temp;while ((temp = br.readLine()) != null) {buffer.append(temp);}String ret = buffer.toString();if (ret.length() < 1) {System.out.println("ddddUrl=" + ddddUrl + " ret=" + buffer.toString());}return buffer.toString();} catch (Throwable e) {logger.error("ddddUrl=" + ddddUrl + ",e=" + e.toString());return null;}}public void saveFile(String factory, String imgCode, byte[] imgByte) {try {String basePath = ConstTable.codePath + factory + "/";File ocrFile = new File(basePath + imgCode + ".png");FileUtils.writeByteArrayToFile(ocrFile, imgByte);} catch (Exception e) {logger.error("saveFile() " + e.toString());}}

4. 图形OCR识别结果:

在这里插入图片描述

在这里插入图片描述

5. 测试返回结果:

在这里插入图片描述

三 丶测试报告 :

在这里插入图片描述

四丶结语

熊猫频道作为央视的子频道, 采用的还是老一代的图形验证码已经落伍了, 用户体验一般,容易被破解, 一旦被国际黑客发起攻击,将会对老百姓形成骚扰,影响声誉。

很多人在短信服务刚开始建设的阶段,可能不会在安全方面考虑太多,理由有很多。
比如:“ 需求这么赶,当然是先实现功能啊 ”,“ 业务量很小啦,系统就这么点人用,不怕的 ” , “ 我们怎么会被盯上呢,不可能的 ”等等。

有一些理由虽然有道理,但是该来的总是会来的。前期欠下来的债,总是要还的。越早还,问题就越小,损失就越低。

谷歌图形验证码在AI 面前已经形同虚设,所以谷歌宣布退出验证码服务, 那么当所有的图形验证码都被破解时,大家又该如何做好防御呢?

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • QT定时器QObiect/QTimer
  • Elasticsearch:无状态世界中的数据安全
  • 上海大学《2022年836+915自动控制原理真题及答案》 (完整版)
  • 关于Qt在子线程中使用通讯时发生无法接收数据的情况
  • 【数据库实战】1_Oracle_命中关联人或黑名单或反洗钱客户
  • MapSet之相关概念
  • Windows bat脚本学习九(srec_cat)
  • openGauss 之索引回表
  • 【Netty】netty中都是用了哪些设计模式
  • 端口安全老化细节
  • 软件测试之UI自动化测试
  • 被审稿人批得体无完肤?参考文献这样引用就对了!
  • 抠像拍照技术在展厅设计中的应用,实现了哪些新颖的互动体验?
  • uniapp vite3 require导入commonJS 的js文件方法
  • mysql可重复读不能解决幻读吗?
  • Android 控件背景颜色处理
  • Brief introduction of how to 'Call, Apply and Bind'
  • CSS3 聊天气泡框以及 inherit、currentColor 关键字
  • css属性的继承、初识值、计算值、当前值、应用值
  • ES6, React, Redux, Webpack写的一个爬 GitHub 的网页
  • Idea+maven+scala构建包并在spark on yarn 运行
  • If…else
  • Javascripit类型转换比较那点事儿,双等号(==)
  • python大佬养成计划----difflib模块
  • React 快速上手 - 07 前端路由 react-router
  • Redis的resp协议
  • SpiderData 2019年2月16日 DApp数据排行榜
  • SQLServer之创建显式事务
  • 发布国内首个无服务器容器服务,运维效率从未如此高效
  • 更好理解的面向对象的Javascript 1 —— 动态类型和多态
  • 开放才能进步!Angular和Wijmo一起走过的日子
  • 目录与文件属性:编写ls
  • 三分钟教你同步 Visual Studio Code 设置
  • 新版博客前端前瞻
  • 源码之下无秘密 ── 做最好的 Netty 源码分析教程
  • ​ 全球云科技基础设施:亚马逊云科技的海外服务器网络如何演进
  • ​低代码平台的核心价值与优势
  • ###51单片机学习(1)-----单片机烧录软件的使用,以及如何建立一个工程项目
  • #stm32驱动外设模块总结w5500模块
  • (6)STL算法之转换
  • (C++二叉树05) 合并二叉树 二叉搜索树中的搜索 验证二叉搜索树
  • (HAL库版)freeRTOS移植STMF103
  • (附源码)springboot家庭财务分析系统 毕业设计641323
  • (附源码)ssm失物招领系统 毕业设计 182317
  • (算法)大数的进制转换
  • (新)网络工程师考点串讲与真题详解
  • (一一四)第九章编程练习
  • (原創) 如何將struct塞進vector? (C/C++) (STL)
  • (转)总结使用Unity 3D优化游戏运行性能的经验
  • ****Linux下Mysql的安装和配置
  • *ST京蓝入股力合节能 着力绿色智慧城市服务
  • .net core MVC 通过 Filters 过滤器拦截请求及响应内容
  • .net core webapi 部署iis_一键部署VS插件:让.NET开发者更幸福
  • .Net Core中Quartz的使用方法
  • .net mvc 获取url中controller和action