December 20, 2020

Overview of DBSAT(Database Security Assessment Tool)


What is DBSAT?

 Database Security Assessment Tool aka DBSAT is a free tool that basically scan your database and find out security loop holes and it also gives recommendation to mitigate those loop holes. DBSAT automatically collects information and displays it as HTML,Excel,Json or text format.

 

How to Download:-

  MOS Note:2138254.1 – Oracle Database Security Assessment Tool (DBSAT)

 

You can download the tool from above My Oracle Support Note ID.

 

DBSAT Components:-

·         Collector:- As the name states , the collector basically collects data by executing various SQL queries and OS commands from the target database. By meaning target database here I refer to the database for which we are going to generate a DBSAT report. Once data is collected it saves in a JSON file which is used by another component namely Reporter.

 ·         Reporter:-Reporter basically analysed  the data collected by collector and generates a Database Security Assessment Report in HTML, Excel ,Text or Json format.

 

 ·          Discoverer:- The Discoverer executes SQL queries and collects data from the system to be assessed, based on the settings specified in the configuration files. It does this primarily by querying database dictionary views. The collected data is then used to generate a Database Sensitive Data Assessment Report in HTML and CSV formats.

  

 

Prerequisites: -

DBSAT runs on:

·         Solaris x64 and Solaris SPARC64

·         Linux x86-64

·         Windows x64

·         HP-UX IA (64-bit)

·         IBM AIX (64-bit) & Linux on zSeries (64-bit)

 

Supported Database Versions

We can execute DBSAT tool from 10.2.0.5 release onwards.

Security Requirements

DBSAT output files are sensitive because they may reveal weaknesses in the security posture of your database. To prevent unauthorized access to these files, you must implement the following security guidelines:

·         Ensure that the directories holding these files are secured with the appropriate permissions.

·         Delete the files securely after you implement the recommendations they contain.

·         Share them with others in their (by default) encrypted form.

·         Grant user permissions on a short-term basis and revoke these when no longer necessary.


Installation

Step 1.

Create directory to extract the DBSAT tool

[devdb@server1]$mkdir -p /DEV/backup/DBSAT

[devdb@server1]$ unzip dbsat.zip -d /DEV/backup/DBSAT

[devdb@server1]$ unzip dbsat.zip -d /DEV/backup/DBSAT

Archive:  dbsat.zip

  inflating: /DEV/backup/DBSAT/dbsat

  inflating: /DEV/backup/DBSAT/dbsat.bat

  inflating: /DEV/backup/DBSAT/sat_collector.sql

  inflating: /DEV/backup/DBSAT/sat_reporter.py

  inflating: /DEV/backup/DBSAT/sat_analysis.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/app.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/chart_area.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/chart_bar.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/chart_column.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/chart_doughnut.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/chart_line.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/chart_pie.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/chart.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/chart_radar.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/chart_scatter.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/chartsheet.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/chart_stock.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/comments.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/compatibility.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/contenttypes.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/core.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/custom.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/drawing.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/exceptions.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/format.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/__init__.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/packager.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/relationships.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/shape.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/sharedstrings.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/styles.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/table.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/theme.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/utility.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/vml.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/workbook.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/worksheet.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/xmlwriter.py

  inflating: /DEV/backup/DBSAT/xlsxwriter/LICENSE.txt

  inflating: /DEV/backup/DBSAT/Discover/bin/discoverer.jar

  inflating: /DEV/backup/DBSAT/Discover/lib/ojdbc8.jar

  inflating: /DEV/backup/DBSAT/Discover/lib/oraclepki.jar

  inflating: /DEV/backup/DBSAT/Discover/lib/osdt_cert.jar

  inflating: /DEV/backup/DBSAT/Discover/lib/osdt_core.jar

  inflating: /DEV/backup/DBSAT/Discover/conf/sample_dbsat.config

  inflating: /DEV/backup/DBSAT/Discover/conf/sensitive_en.ini

  inflating: /DEV/backup/DBSAT/Discover/conf/sensitive_es.ini

  inflating: /DEV/backup/DBSAT/Discover/conf/sensitive_de.ini

  inflating: /DEV/backup/DBSAT/Discover/conf/sensitive_pt.ini

  inflating: /DEV/backup/DBSAT/Discover/conf/sensitive_it.ini

  inflating: /DEV/backup/DBSAT/Discover/conf/sensitive_fr.ini

  inflating: /DEV/backup/DBSAT/Discover/conf/sensitive_nl.ini

  inflating: /DEV/backup/DBSAT/Discover/conf/sensitive_el.ini

 


Step 2.

Run the collector to gather data

            Syntax : dbsat collect <connect_string> <destination>

The dbsat collect command has the following options and arguments:

·         connect_string which specifies the connection string to connect to the database.

Example: user@tns_alias

·         destination

Specifies the location and file name for the Database Security Assessment report.

Example: /u01/dbsat/db04

Note: Collector will prompt for password to protect the .zip file  it will create. It will ask for password again when running reporter process later.

[devdb@server1 DBSAT]$ ./dbsat collect system@DEV dbsat_report_201220

Database Security Assessment Tool version 2.2.1 (May 2020)

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 11.2.0.4.0 Production on Sun Dec 20 20:33:58 2020

 

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

 

Enter password:

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

Setup complete.

SQL queries complete.

OS commands complete.

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

DBSAT Collector completed successfully.

 

Calling /DEV/R12DEV/db/tech_st/11.2.0.4/bin/zip to encrypt dbsat_report_201220.json...

 

Enter password:

Verify password:

  adding: dbsat_report_201220.json (deflated 90%)

zip completed successfully.



Step 3. 

Run the reporter to generate report

Syntax. dbsat report <pathname>

Note. Here provide the zip file name that was created in last step . But do not use the .zip extension else it will error out.


[devdb@server1  DBSAT]$ ./dbsat report /DEV/backup/DBSAT/dbsat_report_201220

 

Database Security Assessment Tool version 2.2.1 (May 2020)

 

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:  dbsat_report_201220.zip

[dbsat_report_201220.zip] dbsat_report_201220.json password:

  inflating: dbsat_report_201220.json

DBSAT Reporter ran successfully.

 

Calling /usr/bin/zip to encrypt the generated reports...

 

Enter password:

Verify password:

        zip warning: dbsat_report_201220_report.zip not found or empty

  adding: dbsat_report_201220_report.txt (deflated 83%)

  adding: dbsat_report_201220_report.html (deflated 85%)

  adding: dbsat_report_201220_report.xlsx (deflated 3%)

  adding: dbsat_report_201220_report.json (deflated 86%)

zip completed successfully.



[devdb@server1 DBSAT]$ ls -ltrh

total 712K

-r-xr-xr-x 1 r12devdb dba  14K May  5  2020 dbsat

-rw-rw-r-- 1 r12devdb dba 290K May  6  2020 sat_reporter.py

-rw-rw-r-- 1 r12devdb dba  61K May  6  2020 sat_collector.sql

-rw-rw-r-- 1 r12devdb dba  26K May  6  2020 sat_analysis.py

-r-xr-xr-x 1 r12devdb dba  14K May  6  2020 dbsat.bat

drwxr-xr-x 5 r12devdb dba 4.0K Dec 20 20:01 Discover

-rw------- 1 r12devdb dba  26K Dec 20 20:06 sat_analysis.pyc

drwxr-xr-x 2 r12devdb dba 4.0K Dec 20 20:06 xlsxwriter

-rw------- 1 r12devdb dba 106K Dec 20 20:34 dbsat_report_201220.zip

-rw------- 1 r12devdb dba 150K Dec 20 20:42 dbsat_report_201220_report.zip 

[devdb@server1 DBSAT]$ unzip dbsat_report_201220_report.zip

Archive:  dbsat_report_201220_report.zip

[dbsat_report_201220_report.zip] dbsat_report_201220_report.txt password:

  inflating: dbsat_report_201220_report.txt

  inflating: dbsat_report_201220_report.html

  inflating: dbsat_report_201220_report.xlsx

  inflating: dbsat_report_201220_report.json



[devdb@server1 DBSAT]$ ls -ltrh

total 1.6M

-r-xr-xr-x 1 r12devdb dba  14K May  5  2020 dbsat

-rw-rw-r-- 1 r12devdb dba 290K May  6  2020 sat_reporter.py

-rw-rw-r-- 1 r12devdb dba  61K May  6  2020 sat_collector.sql

-rw-rw-r-- 1 r12devdb dba  26K May  6  2020 sat_analysis.py

-r-xr-xr-x 1 r12devdb dba  14K May  6  2020 dbsat.bat

drwxr-xr-x 5 r12devdb dba 4.0K Dec 20 20:01 Discover

-rw------- 1 r12devdb dba  26K Dec 20 20:06 sat_analysis.pyc

drwxr-xr-x 2 r12devdb dba 4.0K Dec 20 20:06 xlsxwriter

-rw------- 1 r12devdb dba 106K Dec 20 20:34 dbsat_report_201220.zip

-rw------- 1 r12devdb dba  22K Dec 20 20:42 dbsat_report_201220_report.xlsx

-rw------- 1 r12devdb dba 246K Dec 20 20:42 dbsat_report_201220_report.txt

-rw------- 1 r12devdb dba 289K Dec 20 20:42 dbsat_report_201220_report.json

-rw------- 1 r12devdb dba 309K Dec 20 20:42 dbsat_report_201220_report.html

-rw------- 1 r12devdb dba 150K Dec 20 20:42 dbsat_report_201220_report.zip



Now analyze any of the generated report to evaluate the security assessment for the database.

This is how we can generate DBSAT report .

A glimpse of the report is given below:-







December 14, 2020

Useful scripts for E Business Suite R12

 In this topic I have explained the purpose of various script that we use for E business suite R12 instance


Script Name

Details

addbctl.sh

This script basically calls adstrtdb.sql to start the DB  or adstopdb.sql to stop the database

Example:-

To start DB :- sh addbctl.sh start

To Stop DB :-

sh addbctl.sh stop normal | immediate|abort

Script location :- $ORACLE_HOME/appsutil/script/<$CONTEXT_NAME>

addlnctl.sh

This script is used to start or stop database listener.

Example:-

To start  Listener:- sh addlnctl.sh start <Listener_name>

To Stop  Listener:- sh addlnctl.sh stop <Listener_name>

To check listener status :- sh addlnctl.sh status <Listener_name>

Script location :- $ORACLE_HOME/appsutil/script/<$CONTEXT_NAME>

adautocfg.sh

This script basically is used to run autoconfig . Autoconfig calls adconfig.sh and adconfig.sh is also calls another perl script namely adconfig.pl

Example:- sh adautocfg.sh

 

Script location for DBTier :-

<RDBMS_ORACLE_HOME>/appsutil/scripts/<CONTEXT_NAME>

 

Script location for Apps Tier :-

<INST_TOP>/admin/scripts

adstrtal.sh

This script starts all the services related to E Business Suite on application tier.Using this single  script we can start multiple service components which are required to run EBS .

 

Example:- sh adstrtal.sh apps/<apps_pwd>

 

Script location:-

<INST_TOP>/admin/scripts

adstpal.sh

This script stops all the services related to E Business Suite on application tier. Using this single  script we can stop multiple service components which are related to run EBS .

Example:- sh adstpal.sh apps/<apps_pwd>

 

 

Script location:-

<INST_TOP>/admin/scripts

adalnctl.sh

We can run this script to start/stop/check status of application RPC listener.

sh adalnctl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

adapcctl.sh

This script is used to start/stop or check the oracle http server.

Example:- sh adapcctl.sh apps/<apps_pwd>

 

Example:-

sh adapcctl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

adcmctl.sh

This script is used to start or stop or check status of concurrent managers.

 

Example:-

sh adcmctl.sh start/stop/status apps/<apps_pwd>

 

Script location:-

<INST_TOP>/admin/scripts

adformsctl.sh

This script basically used to start,stop and check status of forms server in servlet mode.

 

Example:-

sh adformsctl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

 

adformsrvctl.sh

This script basically used to start,stop and check status of forms server in socket mode.

 

Example:-

sh adformsrvctl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

 

adoacorectl.sh

This script basically used to start,stop and check status of oacore oc4j service.

 

Example:-

sh adoacorectl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

 

adoafmctl.sh

This script basically used to start,stop and check status of oafm oc4j service.

 

Example:-

sh adoafmctl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

 

adopmnctl.sh

Using this script we can start/stop and check status of opmn service.

 

Example:-

sh adopmnctl.sh {start/stop/status}

 

Script location:-

<INST_TOP>/admin/scripts

 

 

 


December 7, 2020

Bucket named xxxx has pending multipart uploads. Stop all multipart uploads first.


So I received the above error while dropping the bucket in OCI object storage.




As the error reports there is files which are either being uploaded into the bucket or those files are stuck somewhere. As in our case there was no files were getting uploaded when I received the above error.

To find out what files are being uploaded run the following command from OS level. This should be run as os user from which the upload was initiated.

Command:- oci os multipart list –bucket-name <yourbucketname>

[prodtestdb@ccuine23 ~]$ oci os multipart list --bucket-name bucket-201120                                                  {

  "data": [

    {

      "bucket": "bucket-201120",

      "namespace": "bm626zu42e0a",

      "object": "online_L0_PRODTEST_149_1",

      "time-created": "2020-11-24T20:59:47.752000+00:00",

      "upload-id": "2e55d944-e192-ae09-bf4e-8289eb2dcea4"

    },

    {

      "bucket": "bucket-201120",

      "namespace": "bm626zu42e0a",

      "object": "online_L0_PRODTEST_153_1",

      "time-created": "2020-11-24T20:59:47.802000+00:00",

      "upload-id": "73d09a66-689d-558d-5570-4c8ae29fadcf"

    },

    {

      "bucket": "bucket-201120",

      "namespace": "bm626zu42e0a",

      "object": "online_L0_PRODTEST_156_1",

      "time-created": "2020-11-24T20:59:48.094000+00:00",

      "upload-id": "91cad581-82e6-09d5-caf8-a4d4d5fa029a"

    }

  ]

}

 

So as we can see the above objects are stuck and didn’t upload successfully , because of that we are unable to delete the bucket.

To remove pending upload files.

Command:- oci os multipart abort -ns <object_storage_namespace> -bn <bucket_name> --object-name <object_name> --upload-id <upload_ID>

 

 [prodtestdb@ccuine23 ~]$ oci os multipart abort --bucket-name bucket-201120 --object-name online_L0_PRODTEST_149_1  --upload-id 2e55d944-e192-ae09-bf4e-8289eb2dcea4

WARNING: Are you sure you want to permanently remove this incomplete upload? [y/N]: y

[prodtestdb@ccuine23 ~]$ oci os multipart abort --bucket-name bucket-201120 --object-name online_L0_PRODTEST_153_1  --upload-id 73d09a66-689d-558d-5570-4c8ae29fadcf

WARNING: Are you sure you want to permanently remove this incomplete upload? [y/N]: y

[prodtestdb@ccuine23 ~]$ oci os multipart abort --bucket-name bucket-201120 --object-name online_L0_PRODTEST_156_1  --upload-id 91cad581-82e6-09d5-caf8-a4d4d5fa029a

WARNING: Are you sure you want to permanently remove this incomplete upload? [y/N]: y

  

Now check again if anymore pending files are there for upload.

[prodtestdb@ccuine23 ~]$ oci os multipart list --bucket-name bucket-201120

[prodtestdb@ccuine23 ~]$

[prodtestdb@ccuine23 ~]$

 

As there is no files left to upload, we can now safely drop the bucket.




Oracle Database 26ai Installation Using RPM on Oracle Linux 9 (OEL 9) – Step-by-Step Guide

  In this post I will describe the installation of Oracle Database 26ai 64-bit on Oracle Linux 9 (OL8) 64-bit. The installation requires a m...