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

news/2024/10/26 8:39:19/

前言

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

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

一、 永中软件 PC 注册入口

简介: 永中软件股份有限公司(简称“永中软件”)是国产办公软件产品和政企数字信息化服务提供商,二十余年专注国产办公软件的研发与推广, 始终坚持做中国人自己的办公软件。
永中软件不断丰富和完善产品结构体系,完成了以永中Office为核心,覆盖桌面办公、网络办公、移动办公、云办公、版式办公软件等领域的产品战略布局, 形成了“基础办公能力+通用工具+行业数字化应用系统+数据支撑平台”的综合解决方案能力。产品以云服务为基础,实现了文档多屏多端互联互通,满足用户随时随地协同办公的多元化需求, 帮助用户化繁为简,开启自由创作和高效办公的智能方式。

在这里插入图片描述

在这里插入图片描述

二丶 安全分析:

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

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

1. 模拟器交互

private final String INDEX_URL = "http://auth.yozocloud.cn/newaccount/register?success=https://www.yozosoft.com/";@Overridepublic RetEntity send(WebDriver driver, String areaCode, String phone) {try {RetEntity retEntity = new RetEntity();driver.get(INDEX_URL);// 1 输入手机号WebElement phoneElemet = driver.findElement(By.name("phone"));phoneElemet.sendKeys(phone);// 2 输入密码String password = "qwe123.";WebElement passwordElemet = ChromeDriverManager.waitElement(driver, By.name("password"), 1);passwordElemet.sendKeys(password);// 3 点击发送验证码按钮WebElement sendElemet = driver.findElement(By.xpath("//button/span[contains(text(),'获取验证码')]"));sendElemet.click();Thread.sleep(100);// 4 获取图形验证码WebElement imgElement, errElement, inputElement;String imgCode = null;byte[] imgByte = null;String gtInfo = null;for (int i = 0; i < 3; i++) {imgElement = driver.findElement(By.xpath("//img[contains(@src,'/api/challenge/captcha')]"));String imgUrl = imgElement.getAttribute("src");imgByte = GetImage.callJsByUrl(driver, imgUrl);int len = (imgByte != null) ? imgByte.length : 0;imgCode = (len > 0) ? ddddOcr.getImgCode(imgByte) : null;if (imgCode == null || imgCode.length() < 1) {System.out.println("len=" + len + ",imgCode=" + imgCode);return retEntity;}// 5 输入识别出来的图形验证码inputElement = driver.findElement(By.name("captcha"));inputElement.clear();inputElement.sendKeys(imgCode);sendElemet.click();Thread.sleep(1000);gtInfo = sendElemet.getText();if (gtInfo != null && gtInfo.contains("重新发送")) {break;}imgElement.click();Thread.sleep(1000);}retEntity.setMsg("[imgCode:" + imgCode + "]->" + gtInfo);if (gtInfo != null && gtInfo.contains("重新发送")) {retEntity.setRet(0);ddddOcr.saveFile("YozoSoft", imgCode, imgByte);} 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.图形验证码识别(Ddddocr)


private OcrClientDddd ddddOcr = new OcrClientDddd();private static String INDEX_URL = "https://passport.tuniu.com/register";@Overridepublic RetEntity send(WebDriver driver, String areaCode, String phone) {RetEntity retEntity = new RetEntity();try {driver.get(INDEX_URL);Thread.sleep(1 * 1000);// 1 输入手机号WebElement phoneElemet = driver.findElement(By.id("tel"));phoneElemet.sendKeys(phone);Thread.sleep(1 * 1000);// 2 获取图形验证码String imgCode = null;byte[] imgByte = null;String errInfo = null;WebElement imgElement = driver.findElement(By.id("identify_img"));for (int i = 0; i < 6; i++) {imgByte = GetImage.callJsById(driver, "identify_img");int len = (imgByte != null) ? imgByte.length : 0;imgCode = (len > 0) ? ddddOcr.getImgCode(imgByte) : null;if (imgCode != null && imgCode.length() >= 4) {// 3 输入识别出来的图形验证码driver.findElement(By.id("identify")).sendKeys(imgCode);Thread.sleep(500);WebElement errElement = ChromeDriverManager.waitElement(driver, By.id("code_ok"), 10);errInfo = (errElement != null) ? errElement.getText() : null;if (errInfo != null && errInfo.contains("验证码正确")) {ddddOcr.saveFile("Tuniu", imgCode, imgByte);break;}System.out.println("imgCode=" + imgCode + "->errInfo=" + errInfo);}imgElement.click();Thread.sleep(1000);continue;}// agreedriver.findElement(By.id("travel-info")).click();// 4 点击获取验证码Thread.sleep(1 * 1000);WebElement getCodeElement = driver.findElement(By.xpath("//a[text()='获取动态密码']"));getCodeElement.click();Thread.sleep(1 * 1000);WebElement tipElement = ChromeDriverManager.waitElement(driver, By.xpath("//span[contains(text(),'动态口令已发送')]"), 10);String gtInfo = (tipElement != null) ? tipElement.getText() : null;if (gtInfo == null) {WebElement msgElement = ChromeDriverManager.waitElement(driver, By.xpath("//a[contains(text(),'重新发送')]"), 10);gtInfo = (msgElement != null && msgElement.isDisplayed()) ? msgElement.getText() : null;}retEntity.setMsg(imgCode + "->" + gtInfo);if (gtInfo != null && (gtInfo.contains("动态口令已发送") || gtInfo.contains("重新发送"))) {retEntity.setRet(0);return retEntity;}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();}}

4. 图形OCR识别结果:

在这里插入图片描述

5. 测试返回结果:

在这里插入图片描述

三 丶测试报告 :

在这里插入图片描述

四丶结语

关于永中
永中软件股份有限公司(简称“永中软件”)是国产办公软件产品和政企数字信息化服务提供商,二十余年专注国产办公软件的研发与推广, 始终坚持做中国人自己的办公软件。
永中软件不断丰富和完善产品结构体系,完成了以永中Office为核心,覆盖桌面办公、网络办公、移动办公、云办公、版式办公软件等领域的产品战略布局, 形成了“基础办公能力+通用工具+行业数字化应用系统+数据支撑平台”的综合解决方案能力。产品以云服务为基础,实现了文档多屏多端互联互通,满足用户随时随地协同办公的多元化需求, 帮助用户化繁为简,开启自由创作和高效办公的智能方式。作为知名的软件厂商,拥有雄厚的技术研发实力, 技术实力也应该不错,但采用的还是老一代的图形验证码已经落伍了, 用户体验一般,容易被破解, 一旦被国际黑客发起攻击,将会对老百姓形成骚扰,影响声誉。

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

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

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

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

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

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


http://www.ppmy.cn/news/1542060.html

相关文章

web前端--html 5---qq注册

<!DOCTYPE html> <html lang"en"> <head> <meta charset"UTF-8"> <meta name"viewport" content"widthdevice-width, initial-scale1.0"> <title>qq注册</title> <link rel"impo…

一站式能源解决方案:加油与充电的创新结合

随着新能源汽车在全球范围内的迅速普及&#xff0c;市场对于充电基础设施的需求也呈现出爆炸性的增长态势。加油站与充电站相结合的模式&#xff0c;作为一种创新的行业发展趋势&#xff0c;正逐渐成为业界关注的焦点。这种结合模式不仅能够满足传统燃油车的加油需求&#xff0…

ASP.NET Core开发Chatbot API

本文介绍基于ASP.NET Core的Chatbot Restful API开发&#xff0c;通过调用大语言模型的SDK&#xff0c;完成一个简单的示例。并且通过容器化进行部署. 安装 首先需要安装.NET环境&#xff0c;笔者在Ubuntu 22.04通过二进制包进行安装&#xff0c;Windows和Mac下都有installer…

TortoiseSVN 添加日志模板

1、找到项目文件夹&#xff0c;“右键-TortoiseSVN-属性” 2、“新建-其他” 3、增加属性 属性选择&#xff1a;“tsvn:logtemplate” 在“取值”中填写格式&#xff1a; 添加完成&#xff1a;

云原生后端开发之道

云原生后端开发之道 在现代软件开发中&#xff0c;云原生后端正如一道光芒&#xff0c;照亮了我们通往高效与灵活的道路。那么&#xff0c;究竟什么是云原生后端&#xff1f;它的魅力何在&#xff1f;今天&#xff0c;我们就带你深入这个充满可能性的领域。 1. 云原生后端概述…

MySql中使用findInSet和collection实践

FIND_IN_SET 需求如下&#xff1a;有张用户表&#xff0c;表里有个字段叫school&#xff0c;意为这个用户上过哪些学校&#xff0c;数据库里存的就是字符串类型&#xff0c;存的值类似"2,5,12"&#xff0c;要求就是查询出上过id为2的学校有哪些用户 解决方法&#x…

【C++修炼】初识C++:命名空间、缺省参数、函数重载、引用、内联函数、指针空值

目录 一、命名空间 1.1 命名空间的定义 1.2 命名空间的使用 二、缺省参数 2.1 缺省参数的概念 2.2 缺省参数的分类 三、重载函数 四、引用 4.1 引用的概念 4.2 引用特性 4.3 常引用/const引用 4.4 使用场景 4.5 传值与传引用的效率对比 4.6 引用和指针的区别 五…

【安全解决方案】深入解析:如何通过CDN获取用户真实IP地址

一、业务场景 某大型互联网以及电商公司为了防止客户端获取到真实的ip地址&#xff0c;以及达到保护后端业务服务器不被网站攻击&#xff0c;同时又可以让公安要求留存网站日志和排查违法行为&#xff0c;以及打击犯罪的时候&#xff0c;获取不到真实的ip地址&#xff0c;发现…