DBSAT脚本快速收集方法
DBSAT是Oracle官方提供的脚本,用于数据库的安全评估检查,用户可以放心下载使用。
下载链接具体参见MOS:
- Oracle Database Security Assessment Tool (DBSAT) (Doc ID 2138254.1)
下面介绍DBSAT脚本快速收集方法:
1.上传dbsat脚本并解压到指定目录
将从官方下载的DBSAT工具上传到数据库服务器主机,并创建相应的目录:
使用Oracle用户登录数据库服务器,创建相应目录
mkdir -p /home/oracle/dbsat
将DBSAT工具包进行解压
unzip dbsat.zip -d /home/oracle/dbsat
2.使用dbsat采集必要信息
DBSAT只对数据库执行查询,不会在数据库中创建对象。
之前文档写的示例是用system用户收集,但需要用户提供system用户密码。
但实际情况,很多客户或实际操作人员并不清楚system用户的密码,或是需要时间去确认,这会严重影响收集效率。
所以,更好的方法是可以使用SYS用户,实现免密码采集。
这里的前提是客户环境支持 `sqlplus / as sysdba` 登陆的情况下(大部分客户默认都适用),否则还是需要提供密码。
$ ./dbsat collect sys output_DEMO
实际执行如下:
[oracle@bogon dbsat]$ ./dbsat collect sys output_DEMO
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 Thu Mar 30 16:08:50 2023
Version 19.16.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Enter password: <--- 这里只需要输入 as sysdba 回车即可。
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.16.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.16.0.0.0
DBSAT Collector completed successfully.
Calling /u01/app/oracle/product/19.3.0/db_1/bin/zip to encrypt output_DEMO.json...
Enter password: <--- 这里需要指定压缩包的密码,随意,我这里就用oracle
Verify password: <--- 这里再次输入密码确认
adding: output_DEMO.json (deflated 82%)
zip completed successfully.
[oracle@bogon dbsat]$ ls
dbsat dbsat.bat Discover output_DEMO.zip sat_analysis.py sat_collector.sql sat_reporter.py xlsxwriter
3.生成报告文件(可选)
这一步不需要在服务端执行,只需把上一步生成的文件拿到自己的机器解析,或是直接发给我们即可。
当然要记得把上面设置的压缩密码也告诉我们。
生成报告文件需要Python 2.6以上的环境。
执行报告的生成:
$ ./dbsat report output_DEMO
我这里环境具备,直接执行,实际执行过程如下:
[oracle@bogon dbsat]$ ./dbsat report output_DEMO
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_DEMO.zip
[output_DEMO.zip] output_DEMO.json password: <--- 这里需要输入前面压缩包的密码oracle
inflating: output_DEMO.json
DBSAT Reporter ran successfully.
Calling /usr/bin/zip to encrypt the generated reports...
Enter password: <--- 这里需要指定压缩包的密码,随意,我这里示例就还用oracle
Verify password: <--- 这里再次输入密码确认
zip warning: output_DEMO_report.zip not found or empty
adding: output_DEMO_report.txt (deflated 77%)
adding: output_DEMO_report.html (deflated 83%)
adding: output_DEMO_report.xlsx (deflated 3%)
adding: output_DEMO_report.json (deflated 81%)
zip completed successfully.
最后将这个output_DEMO_report.zip和对应解压密码发给我们即可。
DBSAT脚本快速收集方法的更多相关文章
- Windows下通过脚本快速修改IP地址
Windows下通过脚本快速修改IP地址 如果通过Windows的网络属性修改Ip/网关,真是太麻烦了. 经常要切换ip,所以我写了两个脚本: c:\办公室.bat netsh interface i ...
- 如何用脚本快速修改IP地址(Netsh)
如何用脚本快速修改IP地址(Netsh) 如果通过Windows的网络属性修改Ip/网关,真是太麻烦了.最近一个项目经常要切换ip,所以我写了两个脚本:c:\116.bat netsh interfa ...
- SED单行脚本快速参考(Unix 流编辑器)(转)
sed.sourceforge.net被封杀,特在此处贴上官方的sed 使用说明文档 SED单行脚本快速参考(Unix 流编辑器) 2005年12月29日 英文标题:USEFUL ONE-LINE S ...
- SED单行脚本快速参考(Unix 流编辑器)
------------------------------------------------------------------------- SED单行脚本快速参考(Unix 流编辑器) 200 ...
- awk单行脚本快速参考
AWK单行脚本快速参考 2008年4月28日编辑: Eric Pement eric [at] pement.org 版本 0.26翻译: 董一粟 yisudong [at] gmail.com 最新 ...
- Oracle快速收集AWR的方案
记一种方便的awr收集方法,该脚本可以按小时收集目标时段的awr 素材:awr_generate.sql(具体脚本内容请见本文末尾) (1)将awr_generate.sql置于数据库服务器本地路径, ...
- CocoaPods 的简单快速安装方法
CocoaPods 的简单快速安装方法(Setting up CocoaPods master repo 卡着不动,是因为淘宝镜像已经不能用了. 一.git clone方法安装cocoapods 镜像 ...
- ThinkPHP函数详解:F方法(快速缓存方法)
在Think中S方法的用法,F方法其实是S方法的一个子集功能, 仅用于简直数据缓存,并且只能支持文件形式,不支持缓存有效期,因为采用 的是PHP返回方式,所以其效率较S方法较高,因此我们也称之为快速缓 ...
- 【转】第6篇:Xilium CefGlue 关于 CLR Object 与 JS 交互类库封装报告:自动注册JS脚本+自动反射方法分析
作者: 牛A与牛C之间 时间: 2013-11-21 分类: 技术文章 | 暂无评论 | 编辑文章 主页 » 技术文章 » 第6篇:Xilium CefGlue 关于 CLR Object 与 JS ...
- 【转】第5篇:Xilium CefGlue 关于 CLR Object 与 JS 交互类库封装报告:自动注册JS脚本+委托回调方法分析
作者: 牛A与牛C之间 时间: 2013-11-19 分类: 技术文章 | 暂无评论 | 编辑文章 主页 » 技术文章 » 第5篇:Xilium CefGlue 关于 CLR Object 与 JS ...
随机推荐
- 【转载】内存基本概念-watermark&lowmem_reserve
概述 当系统内存短缺的情况下仍去申请内存,可能会触发系统对内存的回收,那什么时候应该进行回收,回收到什么标准又可以停止回收,参考依据是什么?即本文将介绍的watermark(内存水位线),当检查wat ...
- java进阶(42)--注解
文档目录: 一.概念 二.注解的使用方法 三.JDK内置注解 四.元注释 五.注解中定义属性 六.反射注解的对象 七.反射注解对象的属性值 ------------------------------ ...
- 万字血书Vue—Vue的核心概念
MVVM M:模型(Model):data V:视图(View):模板 VM:视图模型(ViewModel):Vue实例对象 Vue收到了MVVM模型的启发,MVVM是vue实现数据驱动视图和双向数据 ...
- Visual Studio实用的搜索、查找、替换技巧
前言 对于.NET开发者而言Visual Studio是我们日常工作中比较常用的开发工具,掌握一些Visual Studio实用的搜索.查找.替换技巧可以帮助我们大大提高工作效率从而避免996. Vi ...
- MCU芯片设计流程
MCU设计流程 1.产品开发整体流程 Integrated Product Development(IPD) TR-Technique Review-技术评审 xDCP-管理层决定是否开发 这里的验证 ...
- SpringBoot03:首页国际化
页面国际化 有的时候,我们的网站会去涉及中英文甚至多语言的切换,这时候我们就需要学习国际化! 1.配置文件编写 首先在resources资源文件下新建一个i18n目录,存放国际化配置文件 新建一个lo ...
- [转帖]谁动了我的 CPU 频率 —— CPU 性能之迷 Part 2
https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/ 目录: 为何有本文 什么是动态 CPU 频率 什么是 p-state ...
- [转帖]一个小操作,SQL 查询速度翻了 1000 倍
https://tidb.net/book/tidb-monthly/2022/2022-04/usercase/sql-1000 背景介绍 某一天早上来到公司,接到业务同学反馈,线上某个SQL之前 ...
- [转帖]Linux性能优化(十五)——CPU绑定
一.孤立CPU 1.孤立CPU简介 针对CPU密集型的任务,CPU负载较高,推荐设置CPU Affinity,以提高任务执行效率,避免CPU进行上下文切换,提高CPU Cache命中率. 默认情况下, ...
- [转帖]龙芯 vs 飞腾:各种测试数据看国产CPU水平
https://zhuanlan.zhihu.com/p/99921594 2019年年末,龙芯.飞腾两大国产CPU巨头更是相继组织了规模宏大的年会,发布了新型桌面芯片及其整机产品,顿时硝烟四起.各大 ...