[ER] Scanning databases

Introduction

All information and guides regarding database scanning shall be documented here.

  • Only a Windows system with the 'Database Runtime' Node Agent would be able to serve as a proxy scanning agent should your scan target not have an agent package installed.



  • If using a native Node Agent installed in a Unix-based (including Linux, FreeBSD, AIX, and Solaris) scan target, please note that the native agent would only be able to scan live local PostgreSQL and MySQL databases.
    For all other types of databases, a Windows system with the 'Database Runtime' Node Agent would be needed.
  • When using a Windows proxy agent, connection to PostgreSQL and Sybase databases is established via ODBC.
    For all other types of databases, a direct connection would be established.
  • For all cases, a database account with minimum SELECT access is required.

Oracle

Please ensure port 1521 is open for communications between the Node Agent and Oracle DB server.

Instructions

  1. In your Enterprise Recon web console, start a new search
  2. Click on 'Add Unlisted Target'
  3. Select 'Server' and enter your database server hostname
  4. On the next page, select 'Database' and click 'Customise' beside "Oracle"

    oracle_db.png

  5. For 'Path', leave blank to scan all locations.
    You may also enter your catalog name and you can further specify which table to scan (eg. "CATALOG/TABLE").
    If using a custom port instead of the default 1521 to connect to the DB, please include your port number with a colon in front
    (eg. ":4321" or "CATALOG/TABLE:4321").

    The entire syntax should look like below, with <CATALOG> and <TABLE> being optional fields.

        <DB SERVER FQDN> <CATALOG>/<TABLE>(SERVICE_NAME=XXX):4321

    (eg. dbhost01.groundlabs.com.au Catalog/Table (SERVICE_NAME=GLAB.WORLD)(SERVER=DEDICATED):1521 )

    If you run into TNS errors, please use the following syntax as the 'Path';

        <DB SERVER FQDN> (SERVICE_NAME=XXX)(SERVER=DEDICATED):4321

    (eg. dbhost01.groundlabs.com.au(SERVICE_NAME=GLAB.WORLD)(SERVER=DEDICATED):1521 )

    If you're unsure of your 'SERVICE_NAME' or do not use that field, use your SID instead;

       <DB SERVER FQDN>(SID=XXX)(SERVER=DEDICATED):4321

    (eg. dbhost01.groundlabs.com.au(SID=GLAB)(SERVER=DEDICATED):1521 )

    You may have to check with your DB Admin for the "Service Name", "SID", "Catalog" and "Table". (Check tnsnames.ora)

    For the 'Credentials' section, make sure to use a database account with minimum SELECT access to the database you wish to scan.

    Select your scan target as the "proxy host", otherwise select a Windows proxy which has the runtime agent package installed.

    oracledb.png

  6. Proceed to start scan

 

If using an older version of Oracle DB (version 9)

You would need to download the Version 11 Instant Client Package and patch your Drivers.
To do this, follow the instructions below:

  1. Download the Instant Client Package (v.11.2.0.4.0)
    Windows 32-bit
    Windows 64-bit
  2. Backup the ER2 'Oracle' folder in your Node Agent host
    Navigate to your Enterprise Recon Node Agent installation directory (eg. C:\Program Files\Ground Labs\Enterprise Recon 2), rename the existing 'Oracle' folder to 'Oracle.bak', and make a new 'Oracle' folder
  3. Extract all the .DLL files of the downloaded Instant Client Package zip file into the new 'Oracle' folder, also extract 'oraocci11.dll' from the 'vc9' folder

 

MySQL

Please ensure port 3306 is open for communications between the Node Agent and MySQL DB server.

Instructions

  1. In your Enterprise Recon web console, start a new search
  2. Click on 'Add Unlisted Target'
  3. Select 'Server' and enter your database server hostname
  4. On the next page, select 'Database' and click 'Customise' beside "MySQL"

    mysqlcust.png

  5. Fill in your MySQL database server details

    Path 
    = Name of database to scan
    Stored Credentials = Use previously saved credentials
    Credential Label = Any name you wish for your new set of credentials
    Username = Your MySQL username
    Password = Your MySQL password

    Please make sure to use an account with minimum SELECT access.

    mysqlconf.png

  6. Proceed to start scan

 

IBM DB2

 It is required to have a data source set up, here's how;

  1. Go to Start > Administrative Tools > Data Sources (ODBC) > System DSN
  2. Click 'Add' and select 'SQL Server Native Client'
  3. Enter a name
  4. Select your DB server from the dropdown menu and click next to finish the process

Instructions

  1. In your Enterprise Recon web console, start a new search
  2. Click on 'Add Unlisted Target'
  3. Select 'Server' and enter your database server hostname
  4. On the next page, select 'Database' and click 'Customise' beside "IBM DB2"

    ibmdb.png

  5. Fill in your IBM DB2 database server details

    Path 
    = Name of database to scan
    Stored Credentials = Use previously saved credentials
    Credential Label = Any name you wish for your new set of credentials
    Username = Your IBM DB2 username
    Password = Your IBM DB2 password

    Please make sure to use an account with minimum SELECT access.

    Adding the "(ODBCDSN=FOOBAR)" option to the 'Path' will force the scanner to use the FOOBAR DSN using the ODBC driver.
    Adding the "(CLIDSN=FOOBAR)" option to the 'Path' will force the scanner to use the FOOBAR DSN using the CLI driver.
    * If the agent is running as the SYSTEM user, the DSN must be set up as a System DSN, otherwise it should be a User DSN for the user the agent is running as.


    ibmcust.png

  6. Proceed to start scan

 

MS SQL

 It is required to have a data source set up, here's how;

  1. Go to Start > Administrative Tools > Data Sources (ODBC) > System DSN
  2. Click 'Add' and select 'SQL Server Native Client'
  3. Enter a name
  4. Select your DB server from the drop-down menu and click next to finish the process

Instructions

  1. In your Enterprise Recon web console, start a new search
  2. Click on 'Add Unlisted Target'
  3. Select 'Server' and enter your database server hostname
  4. On the next page, select 'Database' and click 'Customise' beside "Microsoft SQL"

    msdb.png

  5. Fill in your MS SQL database server details

    Path 
    = Name of database to scan
    Stored Credentials = Use previously saved credentials
    Credential Label = Any name you wish for your new set of credentials
    Username = Your MS SQL username
    Password = Your MS SQL password

    Please make sure to use an account with minimum SELECT access.

    mssqlcust.png

  6. Proceed to start scan

Scanning MS SQL using ODBC DSN

There are 2 methods to scan your MS SQL database via ODBC DSN.

Method 1: Using a System DSN

If the Node Agent is running as the default user (SYSTEM), then you need to set up a system DSN.
Follow the steps below:

  1. On the Node Agent, go to Start > Administrative Tools, Data Sources (ODBC)
  2. Select the 'System DSN' tab then click 'Add'
  3. Select the appropriate SQL server driver
  4. Enter your respective details, including authentication
  5. Now go back to your Enterprise Recon web console and edit/add the Path to your scan location in the following syntax;
    MYCATALOG(DSN=MYSQLDSN)/MYSCHEMA/MYTABLE
    (please replace 'MYCATALOG', 'MYSQLDSN', 'MYSCHEMA', 'MYTABLE' with your own information)

Method 2: Using a User DSN

If the Node Agent is running as a logged in user, then you need to set up a user DSN.
Follow the steps below:

  1. On the Node Agent, go to Start > Administrative Tools, Data Sources (ODBC)
  2. Select the 'User DSN' tab then click 'Add'
  3. Select the appropriate SQL server driver
  4. Enter your respective details, including authentication
  5. Now go back to your Enterprise Recon web console and edit/add the Path to your scan location in the following syntax;
    MYCATALOG(DSN=MYSQLDSN)/MYSCHEMA/MYTABLE
    (please replace 'MYCATALOG', 'MYSQLDSN', 'MYSCHEMA', 'MYTABLE' with your own information)

 

 

All information in this article is accurate and true as of the last edited date.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.