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

【奇某信-注册_登录安全分析报告】

前言

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

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

一、 奇某信PC 注册入口

简介:奇某信科技专注于网络空间安全市场,向政府、企业用户提供新一代企业级网络安全产品和服务,2023年营业总收入超64亿元,在人员规模、收入规模和产品覆盖度上均位居行业第一。

在这里插入图片描述

安全分析:

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

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

1. 模拟器交互


@Override
	public RetEntity send(WebDriver driver, String areaCode, String phone) {
		RetEntity retEntity = new RetEntity();
		try {
			String INDEX_URL = "https://passport.qianxin.com/register";
			driver.get(INDEX_URL);
			Thread.sleep(1 * 1000);
			// 1 输入手机号
			WebElement phoneElemet = ChromeDriverManager.waitElement(driver, By.xpath("//input[@placeholder='请输入手机号']"), 1);
			phoneElemet.sendKeys(phone);
			Thread.sleep(1 * 1000);
			// 2 获取图形验证码
			WebElement imgElement = driver.findElement(By.xpath("//img[@class='q-tooltip captcha-img']"));
			String base64Str = imgElement.getAttribute("src");
			byte[] imgByte = GetImage.imgStrToByte(base64Str);
			int len = (imgByte != null) ? imgByte.length : 0;
			String imgCode = (len > 0) ? ddddOcr.getImgCode(imgByte) : null;
			if (imgCode == null || imgCode.length() < 1) {
				System.out.println("len=" + len + ",imgCode=" + imgCode);
				return retEntity;
			}
			// 3 输入识别出来的图形验证码
			driver.findElement(By.xpath("//input[@placeholder='请输入图片验证码']")).sendKeys(imgCode);

			// 4 点击获取验证码
			Thread.sleep(1 * 1000);
			WebElement getCodeElement = driver.findElement(By.xpath("//button/span[text()='获取验证码']"));
			getCodeElement.click();

			Thread.sleep(1 * 1000);

			WebElement gtElement = ChromeDriverManager.waitElement(driver, By.xpath("//button/span[contains(text(),'后再次获取')]"), 10);
			String gtInfo = (gtElement != null) ? gtElement.getText() : null;
			retEntity.setMsg(imgCode + "->" + gtInfo);
			boolean isSend = (gtInfo != null && gtInfo.contains("后再次获取"));
			if (!isSend) {
				System.out.println("gtInfo=" + gtInfo);
				return retEntity;
			}
			retEntity.setRet(0);
			ddddOcr.saveFile("Qianxin", imgCode, imgByte);
			return retEntity;
		} catch (Exception e) {
			System.out.println(e.toString());
			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. 测试返回结果:

在这里插入图片描述

三 丶测试报告 :

在这里插入图片描述

四丶结语

奇某信作为安全领域的巨头,创始团队来自奇虎360, 具备不凡的实力, 专注于网络空间安全市场,向政府、企业用户提供新一代企业级网络安全产品和服务,但在验证方面不够重视用户体验, 采用的还是老一代的图形验证码已经落伍了,按传统手法,对图形增加了干扰和扭曲, 导致用户体验很差,但在AI普及的今天,简单的图形验证码被识别变得非常容易导致安全隐患, 一旦被国际黑客发起攻击,将会对老百姓形成骚扰,影响声誉。

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

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

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

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

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

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


http://www.kler.cn/news/284312.html

相关文章:

  • 鸿蒙高级开发者认证题库(2)
  • RKNPU2从入门到实践 --- 【4】RKNN 模型构建【使用pycharm一步一步搭建RKNN模型】
  • GO Date数据处理
  • Python知识点:如何使用Selenium进行自动化Web测试
  • python-矩阵交换行
  • AI学习指南深度学习篇-长短时记忆网络python实践
  • 使用uniapp制作录音功能(VUE3)
  • 鸿蒙OS试题(4)
  • DSP48E2使用以及FIR滤波器定点设计实现与优化
  • 小琳AI课堂:生成对抗网络(GANs)
  • HarmonyOS开发实战( Beta5版)Web组件开发性能提升指导
  • 处理.NET Core中的时区转换问题
  • 帕金森患者在运动时有哪些类型的运动推荐?
  • SpringWeb后端开发-登录认证
  • CSS中的`z-index`属性是如何工作(注意事项)
  • (苍穹外卖)day03菜品管理
  • 5Kg负重30分钟长航时多旋翼无人机详解
  • MySQL简介和管理
  • 为什么我的手机卡需要快递员给激活?这到底安全吗?
  • Web攻击-XSS、CSRF、SQL注入
  • SimpleTranslationAIAgent:基于C#与LLM的翻译AI Agent
  • 国产游戏行业的技术进步与未来展望
  • Java | Leetcode Java题解之第385题迷你语法分析器
  • Linux 配置wireshark 分析thread 使用nRF-Sniffer dongle
  • kafak推送消息。
  • jenkins安装k8s插件发布服务
  • 项目中Redis常见的一些问题(缓存穿透,缓存雪崩,内存耗尽等)
  • Elasticsearch - SpringBoot 查询 es 相关示例
  • Linux Debian12安装flameshot火焰截图工具
  • 线段树维护更多类型的信息