Oracle数据库安全评估工具(DBSAT)

工具概述:

Oracle数据库安全评估工具(DBSAT)是一个流行的命令行工具,它可以帮助识别数据库配置、操作或实施引入风险的领域,并建议改变和控制以减少这些风险。DBSAT帮助评估数据库配置的安全程度,确定谁是用户和他们的权利,并确定敏感数据在数据库中的位置。DBSAT可以区分企业内部的Oracle数据库、自主数据库(共享的和专用的)和DBCS。根据数据库的目标类型,DBSAT执行不同的检查,并提供针对目标的注释。

DBSAT有三个组成部分: 收集器、报告器和发现器。收集器和报告器一起工作,发现风险区域,并就这些风险区域产生报告–数据库安全评估报告。发现器是一个独立的模块,用于定位和报告敏感数据–数据库敏感数据评估报告。

  • 收集器负责通过执行SQL查询和操作系统命令从目标数据库收集原始数据。

  • 报告器读取收集到的数据,对其进行分析,并产生带有发现的报告。报告器输出四种报告,分别是:HTML、XLS、JSON和文本格式。

  • 发现器对数据库字典视图执行SQL查询以发现敏感数据,并以HTML和CSV格式的报告。从12.2.0.8版本开始,Discoverer CSV报告可以加载到Oracle Audit Vault和Database Firewall、以在新的数据隐私报告中添加敏感数据背景。关于此功能的更多信息,请参见将敏感数据导入

    敏感数据导入AVDF库,见《Oracle审计库和数据库防火墙审计员指南》。

先决条件:

一、支持的操作系统及DB版本:

1.支持的操作系统

数据库配置收集查询可以在大多数支持的Oracle数据库平台上运行。然而,目前在Windows平台上,操作系统数据收集将被跳过

Oracle DBSAT运行在:

• 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.支持的数据库版本

你可以在Oracle数据库11.2.0.4及以后的版本中,在企业内部或云端,在Oracle数据库标准版2和Oracle数据库企业版上运行Oracle DBSAT。

注意:
Oracle数据库标准版2从Oracle数据库12c版本1(12.1.0.2)。对于12.1.0.1,Oracle数据库标准一版和Oracle数据库标准版可用。
参考资料:https://docs.oracle.com/database/121/DBLIC/editions.htm#DBLIC109

二、评估工具的前提条件:

1.所需安装包及工具

DBSAT需要在Unix/Linux系统上安装bash shell,Zip和UnZip
Oracle DBSAT使用Zip和Unzip来压缩或解压生成的文件。
Oracle DBSAT在默认位置搜索Zip和Unzip工具,如下所示。
下的默认位置。为了使用其他的Zip和Unzip工具,请在相关脚本中更新以下几行。
相关脚本中的以下几行。
Windows(dbsat.bat脚本):

SET ZIP_CMD=%ORACLE_HOME%\bin\zip.exe
SET UNZIP_CMD=%ORACLE_HOME%\bin\unzip.exe

注意:
Oracle数据库12.2及更高版本中不包括Unzip工具。请确保确保您已经安装了诸如 WinZip 或 WinRar 等工具,并在 SET UNZIP_CMD 中添加工具的路径。并在 SET UNZIP_CMD 参数中添加该工具的路径。
所有其他平台(dbsat脚本):

ZIP=/usr/bin/zip
UNZIP=/usr/bin/unzip
DBZIP=${ORACLE_HOME}/bin/zip
2.Collector的先决条件

为了收集完整的数据,Oracle DBSAT收集器必须在包含数据库的服务器上运行。
为了收集完整的数据,Oracle DBSAT采集器必须在包含数据库的服务器上运行,因为它执行了一些操作系统命令来收集不能从数据库中获得的进程和文件系统信息。
数据库中获得。此外,Oracle DBSAT采集器必须以操作系统用户的身份运行,并具有ORACLE_HOME下的文件和目录的读取权限,以便使用操作系统命令收集和处理文件系统数据。
使用操作系统命令来收集和处理文件系统数据。
Oracle DBSAT收集器通过查询数据库视图来收集大部分的数据。
它必须作为一个有足够权限的用户连接到数据库,以便从这些视图中进行选择。

授予DBSAT用户以下权限:

• 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的先决条件

报告器是一个独立于平台的Python程序,需要Python 2.6或更高版本才能运行。

4.Discoverer的先决条件

发现器是一个Java程序,需要Java Runtime Environment (JRE)1.8(jdk8-u172)或更高版本才能运行。
发现者从数据库字典视图中收集元数据,并将它们与指定的模式相匹配,以发现敏感数据。
与指定的模式相匹配以发现敏感数据。发现者必须以具有足够权限的用户身份连接以一个有足够权限的用户连接到数据库,以便从这些视图中进行选择。

工具下载:

Download DBSAT (oracle.com)

工具使用:

1.安装 DBSAT
  1. 登录到数据库服务器
  2. 创建dbsat目录
mkdir -p /home/oracle/dbsat
  1. 下载并上传dbsat.zip文件到数据库服务器/tmp, 并且解压文件
chown oracle:oinstall /tmp/dbsat.zip
unzip /tmp/dbsat.zip -d /home/oracle/dbsat

- d指定解压路径

2.创建数据库用户

创建dbsat用户作为数据库安全评估工具使用

-- 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.运行收集器
./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: 	#设置压缩包解压密码
Verify password: 	#再次确认密码
  adding: output_ORCL.json (deflated 87%)
zip completed successfully.
4.运行报告器
./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:		#设置报告解压密码
Verify password:	#再次确认密码
	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及以后版本,在运行收集器时,如果使用远程登录数据库或使用服务名连接到数据库其他节点,导致报错:ORA-20002: Complete without OS Commands. When DBSAT is Executed Remotely and not from DB server (Doc ID 2736491.1)

此时需要登录数据库服务器使用VIP指定数据库节点如./dbsat collect dbsat/dbsat123@192.168.245.10:1521/orcl /home/oracle/dbsat/output_ORCL

5.分析报告

解压报告压缩包后共四种格式报告:

  • output_ORCL_report.html
  • output_ORCL_report.json
  • output_ORCL_report.txt
  • output_ORCL_report.xlsx

html格式报告展示:
在这里插入图片描述

对报告的分析请参阅:(Doc ID 2138254.1) 中的 “database-security-assessment-tool-user-guide”

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Oracle数据库有多种性能分析工具可供使用,其中包括Statspack和ADDM。 Statspack是一个从Oracle 8.1.6版本开始引入的工具,它能够帮助收集数据库的性能数据,并通过这些数据来分析和确定数据库的瓶颈所在。Statspack在9i、10g、11g和12c版本中都适用,但在AWR出现后,Oracle建议用户使用AWR来替代Statspack。 ADDM(Automatic Database Diagnostic Monitor)是Oracle数据库中的一个自诊断引擎。它通过检查和分析从AWR中获取的数据,来判断数据库中可能存在的问题。ADDM是Oracle内部的一个顾问系统,能够自动完成一些数据库优化方面的建议,例如SQL的优化、索引的创建、统计信息的收集等。 除了Statspack和ADDM之外,还有其他一些Oracle数据库性能分析工具可供选择。根据你提供的引用内容,有人使用了Oracle database来解决数据库性能问题,并对其进行了相关配置。 综上所述,Oracle数据库的性能分析工具包括Statspack和ADDM,它们可以帮助收集和分析数据库性能数据,以及提供相应的优化建议。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [Oracle 自带性能诊断工具介绍](https://blog.csdn.net/li815517253/article/details/128207858)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [sqlserver做链接服务器连接Oracle完整版教程](https://download.csdn.net/download/pxfpxf/88244026)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值