Microsoft SQL DB Compliance Checks

Plugin ID: 149647

The MS_SQL DB plugin connects to targets that host Microsoft SQL Server databases. The plugin connects to the target, runs a query against the database, and evaluates the output for specific expressions.

Scan Requirements

Credentials

The plugin requires Database credentials with the “Database Type” of “SQL Server” for scanning.

Permissions

Tenable recommends running a database compliance scan with a user account having the following permissions or privileges:

  • MS SQL:

    • Add the scanning user to the sysadmin server role

This ensures thorough scan results and reports because some system or hidden tables and parameters can only be accessed by an account with such high level privileges. These settings were obtained by testing Tenable’s published CIS and DISA STIG audits, which primarily target system databases and tables. Custom audits with user-created databases will require independent testing to achieve maximum results.

Checks

All Microsoft SQL Server DB compliance checks must be bracketed with the check type encapsulation and the MS_SQLDB designation. This is required to differentiate .audit files intended specifically for systems running Microsoft SQL Server databases from other types of compliance audits.

<check_type:"MS_SQLDB">

   [audit content]

</check_type>

See the following topics to learn more about the Microsoft SQL Server DB plugin:

Notes

  • If scans that utilize this plugin are not producing any compliance results, the following items should be checked:

    • Check that the credentials provided to the scan policy work from a remote host using a native SQL client.

    • Check the audit trail for the plugin that test for database login. For Microsoft SQL, this would be plugin 91827 - Microsoft SQL Server Login Possible.

    • Check the audit trail to see if there is a result for the compliance plugin. For Microsoft SQL, this would be plugin 149647 - Microsoft SQL Server DB Compliance Checks.