工具概述:
Oracle數(shù)據(jù)庫安全評(píng)估工具(DBSAT)是一個(gè)流行的命令行工具,它可以幫助識(shí)別數(shù)據(jù)庫配置、操作或?qū)嵤┮腼L(fēng)險(xiǎn)的領(lǐng)域,并建議改變和控制以減少這些風(fēng)險(xiǎn)。DBSAT幫助評(píng)估數(shù)據(jù)庫配置的安全程度,確定誰是用戶和他們的權(quán)利,并確定敏感數(shù)據(jù)在數(shù)據(jù)庫中的位置。DBSAT可以區(qū)分企業(yè)內(nèi)部的Oracle數(shù)據(jù)庫、自主數(shù)據(jù)庫(共享的和專用的)和DBCS。根據(jù)數(shù)據(jù)庫的目標(biāo)類型,DBSAT執(zhí)行不同的檢查,并提供針對(duì)目標(biāo)的注釋。
DBSAT有三個(gè)組成部分: 收集器、報(bào)告器和發(fā)現(xiàn)器。收集器和報(bào)告器一起工作,發(fā)現(xiàn)風(fēng)險(xiǎn)區(qū)域,并就這些風(fēng)險(xiǎn)區(qū)域產(chǎn)生報(bào)告–數(shù)據(jù)庫安全評(píng)估報(bào)告。發(fā)現(xiàn)器是一個(gè)獨(dú)立的模塊,用于定位和報(bào)告敏感數(shù)據(jù)–數(shù)據(jù)庫敏感數(shù)據(jù)評(píng)估報(bào)告。
-
收集器負(fù)責(zé)通過執(zhí)行SQL查詢和操作系統(tǒng)命令從目標(biāo)數(shù)據(jù)庫收集原始數(shù)據(jù)。
-
報(bào)告器讀取收集到的數(shù)據(jù),對(duì)其進(jìn)行分析,并產(chǎn)生帶有發(fā)現(xiàn)的報(bào)告。報(bào)告器輸出四種報(bào)告,分別是:HTML、XLS、JSON和文本格式。
-
發(fā)現(xiàn)器對(duì)數(shù)據(jù)庫字典視圖執(zhí)行SQL查詢以發(fā)現(xiàn)敏感數(shù)據(jù),并以HTML和CSV格式的報(bào)告。從12.2.0.8版本開始,Discoverer CSV報(bào)告可以加載到Oracle Audit Vault和Database Firewall、以在新的數(shù)據(jù)隱私報(bào)告中添加敏感數(shù)據(jù)背景。關(guān)于此功能的更多信息,請(qǐng)參見將敏感數(shù)據(jù)導(dǎo)入
敏感數(shù)據(jù)導(dǎo)入AVDF庫,見《Oracle審計(jì)庫和數(shù)據(jù)庫防火墻審計(jì)員指南》。
先決條件:
一、支持的操作系統(tǒng)及DB版本:
1.支持的操作系統(tǒng)
數(shù)據(jù)庫配置收集查詢可以在大多數(shù)支持的Oracle數(shù)據(jù)庫平臺(tái)上運(yùn)行。然而,目前在Windows平臺(tái)上,操作系統(tǒng)數(shù)據(jù)收集將被跳過
Oracle DBSAT運(yùn)行在:
? Solaris x64 and Solaris SPARC64
? Linux x86-64
? Windows x64
? HP-UX IA (64-bit)
? IBM AIX (64-bit) & Linux on zSeries (64-bit)
2.支持的數(shù)據(jù)庫版本
你可以在Oracle數(shù)據(jù)庫11.2.0.4及以后的版本中,在企業(yè)內(nèi)部或云端,在Oracle數(shù)據(jù)庫標(biāo)準(zhǔn)版2和Oracle數(shù)據(jù)庫企業(yè)版上運(yùn)行Oracle DBSAT。
注意:
Oracle數(shù)據(jù)庫標(biāo)準(zhǔn)版2從Oracle數(shù)據(jù)庫12c版本1(12.1.0.2)。對(duì)于12.1.0.1,Oracle數(shù)據(jù)庫標(biāo)準(zhǔn)一版和Oracle數(shù)據(jù)庫標(biāo)準(zhǔn)版可用。
參考資料:https://docs.oracle.com/database/121/DBLIC/editions.htm#DBLIC109
二、評(píng)估工具的前提條件:
1.所需安裝包及工具
DBSAT需要在Unix/Linux系統(tǒng)上安裝bash shell,Zip和UnZip
Oracle DBSAT使用Zip和Unzip來壓縮或解壓生成的文件。
Oracle DBSAT在默認(rèn)位置搜索Zip和Unzip工具,如下所示。
下的默認(rèn)位置。為了使用其他的Zip和Unzip工具,請(qǐng)?jiān)谙嚓P(guān)腳本中更新以下幾行。
相關(guān)腳本中的以下幾行。
Windows(dbsat.bat腳本):
SET ZIP_CMD=%ORACLE_HOME%\bin\zip.exe
SET UNZIP_CMD=%ORACLE_HOME%\bin\unzip.exe
注意:
Oracle數(shù)據(jù)庫12.2及更高版本中不包括Unzip工具。請(qǐng)確保確保您已經(jīng)安裝了諸如 WinZip 或 WinRar 等工具,并在 SET UNZIP_CMD 中添加工具的路徑。并在 SET UNZIP_CMD 參數(shù)中添加該工具的路徑。
所有其他平臺(tái)(dbsat腳本):ZIP=/usr/bin/zip UNZIP=/usr/bin/unzip DBZIP=${ORACLE_HOME}/bin/zip
2.Collector的先決條件
為了收集完整的數(shù)據(jù),Oracle DBSAT收集器必須在包含數(shù)據(jù)庫的服務(wù)器上運(yùn)行。
為了收集完整的數(shù)據(jù),Oracle DBSAT采集器必須在包含數(shù)據(jù)庫的服務(wù)器上運(yùn)行,因?yàn)樗鼒?zhí)行了一些操作系統(tǒng)命令來收集不能從數(shù)據(jù)庫中獲得的進(jìn)程和文件系統(tǒng)信息。
數(shù)據(jù)庫中獲得。此外,Oracle DBSAT采集器必須以操作系統(tǒng)用戶的身份運(yùn)行,并具有ORACLE_HOME下的文件和目錄的讀取權(quán)限,以便使用操作系統(tǒng)命令收集和處理文件系統(tǒng)數(shù)據(jù)。
使用操作系統(tǒng)命令來收集和處理文件系統(tǒng)數(shù)據(jù)。
Oracle DBSAT收集器通過查詢數(shù)據(jù)庫視圖來收集大部分的數(shù)據(jù)。
它必須作為一個(gè)有足夠權(quán)限的用戶連接到數(shù)據(jù)庫,以便從這些視圖中進(jìn)行選擇。
授予DBSAT用戶以下權(quán)限:
? CREATE SESSION
? READ or SELECT on SYS.REGISTRY$HISTORY
? Role SELECT_CATALOG_ROLE
? Role DV_SECANALYST (if Database Vault is enabled or if Database Vault Operations Control is enabled)
? Role AUDIT_VIEWER (12c and later)
? Role CAPTURE_ADMIN (12c and later)
? READ or SELECT on SYS.DBA_USERS_WITH_DEFPWD (11g and later)
Note:
If you plan to run only the Collector component, you can assign only the following privileges:
? CREATE SESSION
? Role SELECT_CATALOG_ROLE
In order to successfully collect Database Vault information in a Database Vault protected
environment, you must connect as a non-SYS user with the DV_SECANALYST role.
3.Reporter的先決條件
報(bào)告器是一個(gè)獨(dú)立于平臺(tái)的Python程序,需要Python 2.6或更高版本才能運(yùn)行。
4.Discoverer的先決條件
發(fā)現(xiàn)器是一個(gè)Java程序,需要Java Runtime Environment (JRE)1.8(jdk8-u172)或更高版本才能運(yùn)行。
發(fā)現(xiàn)者從數(shù)據(jù)庫字典視圖中收集元數(shù)據(jù),并將它們與指定的模式相匹配,以發(fā)現(xiàn)敏感數(shù)據(jù)。
與指定的模式相匹配以發(fā)現(xiàn)敏感數(shù)據(jù)。發(fā)現(xiàn)者必須以具有足夠權(quán)限的用戶身份連接以一個(gè)有足夠權(quán)限的用戶連接到數(shù)據(jù)庫,以便從這些視圖中進(jìn)行選擇。
工具下載:
Download DBSAT (oracle.com)
工具使用:
1.安裝 DBSAT
- 登錄到數(shù)據(jù)庫服務(wù)器
- 創(chuàng)建dbsat目錄
mkdir -p /home/oracle/dbsat
- 下載并上傳dbsat.zip文件到數(shù)據(jù)庫服務(wù)器
/tmp
, 并且解壓文件
chown oracle:oinstall /tmp/dbsat.zip
unzip /tmp/dbsat.zip -d /home/oracle/dbsat
- d指定解壓路徑
2.創(chuàng)建數(shù)據(jù)庫用戶
創(chuàng)建dbsat用戶作為數(shù)據(jù)庫安全評(píng)估工具使用
-- Create user
create user dbsat identified by dbsat123;
grant CONNECT to dbsat;
grant SELECT on SYS.REGISTRY$HISTORY to dbsat;
grant SELECT_CATALOG_ROLE to dbsat;
grant DV_SECANALYST to dbsat;
grant SELECT on SYS.DBA_USERS_WITH_DEFPWD to dbsat;
grant AUDIT_VIEWER to dbsat;
grant CAPTURE_ADMIN to dbsat;
-- Verify permissions
set lines 200
col GRANTEE for a20
col OWNER for a20
col GRANTOR for a20
col PRIVILEGE for a20
col GRANTED_ROLE for a20
SELECT * FROM DBA_TAB_PRIVS WHERE GRANTEE = 'DBSAT';
SELECT * FROM DBA_SYS_PRIVS WHERE GRANTEE = 'DBSAT';
SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTEE = 'DBSAT';
3.運(yùn)行收集器
./dbsat collect dbsat/dbsat123@ORCL /home/oracle/dbsat/output_ORCL
Database Security Assessment Tool version 2.2.2 (June 2021)
This tool is intended to assist you in securing your Oracle database
system. You are solely responsible for your system and the effect and
results of the execution of this tool (including, without limitation,
any damage or data loss). Further, the output generated by this tool may
include potentially sensitive system configuration data and information
that could be used by a skilled attacker to penetrate your system. You
are solely responsible for ensuring that the output of this tool,
including any generated reports, is handled in accordance with your
company's policies.
Connecting to the target Oracle database...
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jun 26 09:54:35 2023
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Last Successful login time: Mon Jun 26 2023 09:43:40 +08:00
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
Setup complete.
SQL queries complete.
Warning: Exit status 256 from OS rule: dbcs_status
OS commands complete.
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
DBSAT Collector completed successfully.
Calling /u01/app/oracle/product/19.3.0/dbhome_1/bin/zip to encrypt output_ORCL.json...
Enter password: #設(shè)置壓縮包解壓密碼
Verify password: #再次確認(rèn)密碼
adding: output_ORCL.json (deflated 87%)
zip completed successfully.
4.運(yùn)行報(bào)告器
./dbsat report /home/oracle/dbsat/output_ORCL
Database Security Assessment Tool version 2.2.2 (June 2021)
This tool is intended to assist you in securing your Oracle database
system. You are solely responsible for your system and the effect and
results of the execution of this tool (including, without limitation,
any damage or data loss). Further, the output generated by this tool may
include potentially sensitive system configuration data and information
that could be used by a skilled attacker to penetrate your system. You
are solely responsible for ensuring that the output of this tool,
including any generated reports, is handled in accordance with your
company's policies.
Archive: output_ORCL.zip
[output_ORCL.zip] output_ORCL.json password: #輸入壓縮包解壓密碼
inflating: output_ORCL.json
DBSAT Reporter ran successfully.
Calling /usr/bin/zip to encrypt the generated reports...
Enter password: #設(shè)置報(bào)告解壓密碼
Verify password: #再次確認(rèn)密碼
zip warning: output_ORCL_report.zip not found or empty
adding: output_ORCL_report.txt (deflated 78%)
adding: output_ORCL_report.html (deflated 84%)
adding: output_ORCL_report.xlsx (deflated 3%)
adding: output_ORCL_report.json (deflated 82%)
zip completed successfully.
注意: 在19.0.0.0及以后版本,在運(yùn)行收集器時(shí),如果使用遠(yuǎn)程登錄數(shù)據(jù)庫或使用服務(wù)名連接到數(shù)據(jù)庫其他節(jié)點(diǎn),導(dǎo)致報(bào)錯(cuò):ORA-20002: Complete without OS Commands. When DBSAT is Executed Remotely and not from DB server (Doc ID 2736491.1)
此時(shí)需要登錄數(shù)據(jù)庫服務(wù)器使用VIP指定數(shù)據(jù)庫節(jié)點(diǎn)如
./dbsat collect dbsat/dbsat123@192.168.245.10:1521/orcl /home/oracle/dbsat/output_ORCL
5.分析報(bào)告
解壓報(bào)告壓縮包后共四種格式報(bào)告:
- output_ORCL_report.html
- output_ORCL_report.json
- output_ORCL_report.txt
- output_ORCL_report.xlsx
html格式報(bào)告展示:文章來源:http://www.zghlxwxcb.cn/news/detail-734629.html
對(duì)報(bào)告的分析請(qǐng)參閱:(Doc ID 2138254.1) 中的 “database-security-assessment-tool-user-guide”文章來源地址http://www.zghlxwxcb.cn/news/detail-734629.html
到了這里,關(guān)于Oracle數(shù)據(jù)庫安全評(píng)估工具(DBSAT)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!