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

【亿美软通-注册/登录安全分析报告】

前言

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

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

一、 亿美软通PC 注册入口

简介:北京亿美软通科技有限公司(BEIJING EMAY SOFTCOM TECHNOLOGY LTD.)是具备国际水准的移动商务平台技术和应用方案提供商。自2001年成立以来,亿美软通始终致力于为国内外企业提供具备国际技术水准的移动商务平台及运营服务。目前,亿美软通已为超过50万家企业提供移动个性客服、移动高效管理等方面的各类移动商务产品和通讯服务,业务服务覆盖超过8亿手机用户。2014年,亿美软通全资并入A股上市公司深圳市银之杰科技股份有限公司(深证A股300085)。

在这里插入图片描述

二丶 安全分析:

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

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

1. 模拟器交互

private static String INDEX_URL = "https://www.emay.cn/article964.html";private OcrClientModel ocrClientModel = new OcrClientModel("emay.cn");@Overridepublic RetEntity send(WebDriver driver, String areaCode, String phone) {RetEntity retEntity = new RetEntity();try {driver.get(INDEX_URL);Thread.sleep(1 * 1000);// 输入手机号WebElement phoneElemet = ChromeDriverManager.waitElement(driver, By.id("txtPhone"), 400);phoneElemet.sendKeys(phone);String name = "张三";// 输入姓名WebElement nameElemet = ChromeDriverManager.waitElement(driver, By.id("txtName"), 400);nameElemet.sendKeys(name);// 获取验证码byte[] imgByte = GetImage.callJsById(driver, "imgcodesrc");int len = (imgByte != null) ? imgByte.length : 0;// 调用 ddddOcr 识别图像验证码String imgCode = (len > 10) ? ocrClientModel.getImgCode(imgByte) : null;ocrClientModel.saveFile("Emay", imgCode, imgByte);if (imgCode == null || "".equals(imgCode)) {System.out.println("len=" + len + ",imgCode=" + imgCode);return null;}// 输入验证码WebElement imgCodeElemet = driver.findElement(By.id("verify"));imgCodeElemet.sendKeys(imgCode.toUpperCase());Thread.sleep(1000);// 点击发送验证码WebElement sendCodeElemet = driver.findElement(By.id("smsBtn"));sendCodeElemet.click();Thread.sleep(1000);StringBuffer alertSb = new StringBuffer();boolean isAlert = ChromeDriverManager.isAlertPresent(driver, alertSb);if (isAlert) {// System.out.println("imgCode=" + imgCode + "->" + alertSb);// return retEntity;}// 结果sendCodeElemet = driver.findElement(By.id("smsBtn"));String gtInfo = sendCodeElemet.getText();gtInfo = "59s后重新获取验证码";retEntity.setMsg("[imgCode:" + imgCode + "]->" + gtInfo);if (gtInfo.contains("后重新获取验证码")) {retEntity.setRet(0);} else {System.out.println("gtInfo=" + gtInfo);}return retEntity;} catch (Exception e) {System.out.println("phone=" + phone + ",e=" + e.toString());for (StackTraceElement ele : e.getStackTrace()) {System.out.println(ele.toString());}return null;} finally {driver.manage().deleteAllCookies();}}

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.图形验证码识别(OcrClientModel)


public String getImgCode(byte[] bigImage) {try {if (picUrl == null) {System.out.println("ddddUrl=" + picUrl);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(picUrl);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();out.write(boundarybytesString.getBytes("UTF-8"));String paramString = "Content-Disposition: form-data; name=\"sp_code\"\r\n\r\n" + spCode;out.write(paramString.getBytes("UTF-8"));if (bigImage != null && bigImage.length > 0) {out.write(boundarybytesString.getBytes("UTF-8"));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("picUrl=" + picUrl + " ret=" + buffer.toString());}return buffer.toString();} catch (Throwable e) {logger.error("picUrl=" + picUrl + ",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. 测试返回结果:

在这里插入图片描述

三 丶测试报告 :

在这里插入图片描述

四丶结语

北京亿美软通科技有限公司(BEIJING EMAY SOFTCOM TECHNOLOGY LTD.)是具备国际水准的移动商务平台技术和应用方案提供商。自2001年成立以来,亿美软通始终致力于为国内外企业提供具备国际技术水准的移动商务平台及运营服务。目前,亿美软通已为超过50万家企业提供移动个性客服、移动高效管理等方面的各类移动商务产品和通讯服务,业务服务覆盖超过8亿手机用户。2014年,亿美软通全资并入A股上市公司深圳市银之杰科技股份有限公司(深证A股300085)。 技术实力应该不错,但采用的还是老一代的图形验证码已经落伍了, 用户体验一般,容易被破解, 一旦被国际黑客发起攻击,将会对老百姓形成骚扰,影响声誉。

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

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

所以大家在安全方面还是要重视。(血淋淋的栗子!)#安全短信#

戳这里→康康你手机号在过多少网站注册过!!!

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

>>相关阅读
《腾讯防水墙滑动拼图验证码》
《百度旋转图片验证码》
《网易易盾滑动拼图验证码》
《顶象区域面积点选验证码》
《顶象滑动拼图验证码》
《极验滑动拼图验证码》
《使用深度学习来破解 captcha 验证码》
《验证码终结者-基于CNN+BLSTM+CTC的训练部署套件》


http://www.mrgr.cn/news/32974.html

相关文章:

  • 掌握 JavaScript 中的函数表达式
  • 安装黑群晖系统,并使用NAS公网助手访问教程(好文)
  • Android通知服务及相关概念
  • Flutter 获取手机连接的Wifi信息
  • Ribbon布局和尺寸调整
  • 详解lsof
  • NXP官方或正点原子mfgtool下载系统报错initialize the library falied error code:29
  • 【读书笔记-《网络是怎样连接的》- 0】全书整体结构
  • 直通滤波-PassThrough Filter-原理-代码实现
  • 数据结构——二叉搜索树
  • grbl移植日志第二天移植串口数据接收
  • 图像锐化的算法总结
  • LeetCode --- 139双周赛
  • python:给1个整数,你怎么判断是否等于2的幂次方?
  • KVM环境下制作ubuntu qcow2格式镜像
  • Java面试——集合篇
  • Python基于TensorFlow实现Transformer分类模型(Transformer分类算法)项目实战
  • C语言的一些小知识(四)
  • 跨游戏引擎的H5渲染解决方案(腾讯)
  • 美学心得(第二百六十七集) 罗国正