oracle資料庫sys使用者的審計(網文摘錄)
(一)開啟資料庫關鍵操作日誌審計開關
Alter system set audit_sys_operations=true;
審計日誌產生在$ORACLE_HOME/rdbms/audit目錄下,因該日誌所佔空間較大,儲存時間較短,如一週。
檔案樣本:
Audit file /oracle/app/oracle/product/9.2.0.6/rdbms/audit/ora_10010.aud
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning and Real Application Clusters options
JServer Release 9.2.0.6.0 - Production
ORACLE_HOME = /oracle/app/oracle/product/9.2.0.6
System name: HP-UX
Node name: order_ht1
Release: B.11.23
Version: U
Machine: 9000/800
Instance name: order1
Redo thread mounted by this instance: 1
Oracle process number: 1250
Unix process pid: 10010, image: oracle@order_ht1 (TNS V1-V3)
Alter system set audit_sys_operations=true;
審計日誌產生在$ORACLE_HOME/rdbms/audit目錄下,因該日誌所佔空間較大,儲存時間較短,如一週。
檔案樣本:
Audit file /oracle/app/oracle/product/9.2.0.6/rdbms/audit/ora_10010.aud
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning and Real Application Clusters options
JServer Release 9.2.0.6.0 - Production
ORACLE_HOME = /oracle/app/oracle/product/9.2.0.6
System name: HP-UX
Node name: order_ht1
Release: B.11.23
Version: U
Machine: 9000/800
Instance name: order1
Redo thread mounted by this instance: 1
Oracle process number: 1250
Unix process pid: 10010, image: oracle@order_ht1 (TNS V1-V3)
Mon Feb 13 15:20:21 2006
ACTION : 'CONNECT'
DATABASE USER: '/'
PRIVILEGE : SYSDBA
CLIENT USER: oracle
CLIENT TERMINAL: pts/ta
STATUS: 0
ACTION : 'CONNECT'
DATABASE USER: '/'
PRIVILEGE : SYSDBA
CLIENT USER: oracle
CLIENT TERMINAL: pts/ta
STATUS: 0
Mon Feb 13 15:23:23 2006
ACTION : 'alter system set log_archive_dest_state_2=DEFER scope=spfile'
DATABASE USER: '/'
PRIVILEGE : SYSDBA
CLIENT USER: oracle
CLIENT TERMINAL: pts/ta
STATUS: 0
(二)日誌稽核
因為日誌包含所有sys使用者的所有操作資訊,可能會包含大量查詢select資訊,日誌量較大,使用純人工方式的方式審計費時費力,可以通過指令碼實現。
ACTION : 'alter system set log_archive_dest_state_2=DEFER scope=spfile'
DATABASE USER: '/'
PRIVILEGE : SYSDBA
CLIENT USER: oracle
CLIENT TERMINAL: pts/ta
STATUS: 0
(二)日誌稽核
因為日誌包含所有sys使用者的所有操作資訊,可能會包含大量查詢select資訊,日誌量較大,使用純人工方式的方式審計費時費力,可以通過指令碼實現。
其中audconf.txt 可以根據需要,包含被審計的action,如比較重要的操作:
startup
shutdown
alter tablespace
alter database
alter system
drop
truncate
delete
create user
alter user
grant
revoke
startup
shutdown
alter tablespace
alter database
alter system
drop
truncate
delete
create user
alter user
grant
revoke
每天1點系統自動排程/oracle/audit.sh
0 1 * * * /oracle/audit.sh
/oracle/audit.sh指令碼如下:
. /oracle/.profile
cd $ORACLE_HOME/rdbms/audit
filename=aud`date +%y%m`.log
filedir=aud`date +%y%m`_detail
if [ ! -f $filename ]
then
>$filename
fi
if [ ! -d $filedir ]
then
mkdir $filedir
fi
egrep 'ACTION :' *.aud|egrep -if audconf.txt|egrep -v 'alter system archive log current'>>$filename
if [ $? -eq 1 ]
then
exit
fi
egrep 'ACTION :' *.aud|egrep -if audconf.txt|egrep -v 'alter system archive log current'|cut -d : -f 1|xargs grep -l 'ACTION
0 1 * * * /oracle/audit.sh
/oracle/audit.sh指令碼如下:
. /oracle/.profile
cd $ORACLE_HOME/rdbms/audit
filename=aud`date +%y%m`.log
filedir=aud`date +%y%m`_detail
if [ ! -f $filename ]
then
>$filename
fi
if [ ! -d $filedir ]
then
mkdir $filedir
fi
egrep 'ACTION :' *.aud|egrep -if audconf.txt|egrep -v 'alter system archive log current'>>$filename
if [ $? -eq 1 ]
then
exit
fi
egrep 'ACTION :' *.aud|egrep -if audconf.txt|egrep -v 'alter system archive log current'|cut -d : -f 1|xargs grep -l 'ACTION
:'|while read file
do
mv $file ./$filedir/$file.sys
done
do
mv $file ./$filedir/$file.sys
done
該指令碼實現如下功能,
每月自動生成審計彙總檔案$ORACLE_HOME/rdbms/audit/audyymm.log,該彙總檔案儲存時間可以較長,如儲存一年
彙總檔案樣本aud0602.log:
ACTION : 'alter system set log_archive_dest_state_2=DEFER scope=spfile'
每天自動從日誌檔案中查詢日誌中是否包含關鍵操作,如果包含關鍵操作新增到彙總檔案
每月自動生成審計彙總檔案$ORACLE_HOME/rdbms/audit/audyymm.log,該彙總檔案儲存時間可以較長,如儲存一年
彙總檔案樣本aud0602.log:
ACTION : 'alter system set log_archive_dest_state_2=DEFER scope=spfile'
每天自動從日誌檔案中查詢日誌中是否包含關鍵操作,如果包含關鍵操作新增到彙總檔案
中$ORACLE_HOME/rdbms/audit/audyymm.log,同時將詳細日誌檔案備份到$ORACLE_HOME/rdbms/audit/audyymm_detail目錄下
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/11088128/viewspace-64875/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 清理Oracle資料庫大量的SYS使用者審計跟蹤檔案Oracle資料庫
- 審計Oracle資料庫的使用Oracle資料庫
- 【AUDIT】審計並記錄使用者連線資料庫資訊資料庫
- ORACLE 資料庫審計詳解Oracle資料庫
- ORACLE資料庫標準審計Oracle資料庫
- Oracle的日誌管理攻略(網文摘錄)Oracle
- Oracle資料庫審計功能介紹Oracle資料庫
- 【審計】標準資料庫審計資料庫
- Oracle資料庫內部安全威脅:審計特權使用者Oracle資料庫
- Oracle FGA細粒度審計——基於內容的資料庫審計(一)Oracle資料庫
- Oracle FGA細粒度審計——基於內容的資料庫審計(二)Oracle資料庫
- Oracle FGA細粒度審計——基於內容的資料庫審計(三)Oracle資料庫
- 舉例說明Oracle資料庫審計的用法Oracle資料庫
- Oracle資料庫SYS使用者密碼忘了怎麼辦??Oracle資料庫密碼
- Oracle資料庫中SYS、SYSTEM、DBSNMP、SYSMAN四使用者的區別Oracle資料庫
- 資料庫審計-hexorbase資料庫HexoORB
- 【FGA】將FGA細粒度審計功能的審計結果記錄在資料庫中資料庫
- 【實驗】【審計】【FGA】使用Oracle的審計功能監控資料庫中的可疑操作Oracle資料庫
- 拍拍貸資料庫審計資料庫
- 資料庫DDL操作審計資料庫
- Linux版對sys使用者進行審計的示例Linux
- Linux Crontab(網文摘錄)Linux
- DBA必讀:Oracle資料庫審計七宗罪Oracle資料庫
- MySQL資料庫審計系統MySql資料庫
- Access資料庫審計工具mdbtools資料庫
- 資料庫安全審計在資料安全中的功能資料庫
- 忘記oracle的sys密碼該如何重置;附如何修改oracle資料庫使用者密碼Oracle密碼資料庫
- 【原創】Linux版 對sys使用者進行審計的示例Linux
- Oracle資料庫DDL審計觸發器觸發的bug問題Oracle資料庫觸發器
- 資料庫審計技術進化資料庫
- 開啟mysql 資料庫審計功能。MySql資料庫
- openGauss 設定資料庫審計資料庫
- oracle10g audit--審計sys使用者(as sysdba或者sysoper)特權操作行為Oracle
- BO & SAP 資料整合方案[網路文摘]
- 安全管理:polardb資料庫審計功能資料庫
- mysql 5.7 sys資料庫初探MySql資料庫
- MySQL預設資料庫之sys庫MySql資料庫
- 將ORACLE資料庫審計相關的表移動到其他表空間Oracle資料庫