Protecting Against Common SQL DBMS Exploits

 Using OpenLink's Universal Data Access Drivers (Multi-Tier Edition)

The table below provides a breakdown of typical SQL DBMS vulnerabilities, typical cause of the vulnerability, and how vulnerability is addressed by Session Rules.

Session Rules are a feature of the OpenLink Request Broker; a server side component of the OpenLink Multi-Tier data access drivers for ODBC, JDBC, ADO.NET, and OLEDB.

Vulnerability

 Routes

Cause

UDA Rule Book Solution

DB Defaults

Native CLI, ODBC, JDBC, ADO.NET, and OLEDB

Database installations always include default usernames and passwords for DBA and other privileged user accounts.

 

Users and DBAs are prone to taking these defaults when “getting up and running” is the typical focus of an installation effort. Even more so a DBA skills diminish.

Create default rule that deems all default logins

“insecure” and have any of the following rules in place

 

·        Reject all connections

 

·        Permit connections, but enforce read-only mode.

 

Create a custom domain (an identifier for your connection) that totally obscures your destination database. Instead of value "Oracle xx" or "SQL Server" you have values such as "Dept. X DB" or "Sales Data Source". None of these Domain names identify the database type which makes the default databases vulnerability exploit harder to decern.

Authentication

ditto

Some databases maintain their own user pools while others may simply authenticate against the OS, and others a combination of both.

Create a rule that enforces OS or DB level authentication – whichever is the company standard.

 

Create a rule that encrypts sessions with the DB Server along the following lines:

 

·        Login only

 

·        Login and data transmission

DB Privileges

ditto

DB level privileges are User, Role, Columns, and Rows based. They have no concept of client application.

 

The problem here (which is severe) is that applications introduce databases to enterprises and these applications tend to handle matrix of user, roles, and privileges relative to the applications’ use within the application itself. In most cases this implies minimal if any use of DB level privileges, roles, column, or row security.

One of the most timelessly distinct and powerful features of the Rule Book is that it enables data access session rules to be scoped to actual applications.

 

You can have a session rule in play that enforces no-access, read-only access, or full read-write access (with or without encryption)  on an application by application basis.

 

If a specific application introduces a mission critical DB to your enterprise, and you want to protect it from access outside of the application that it serves, or you want to provide limited access. All you need is an application specific rule.

Buffer Overuns

ditto

SQL Statements assembled from String concatenation, and then stored on the client (typically a dynamic web page; asp, jsp, php, perl,python etc.).

 

The attacker derives knowledge of DB schema from SQL text or from his/her general knowledge of DB schemas (you get to know all schemas if you write ODBC Drivers for numerous databases).

 

There is no substitute for keeping DB connection and authentication attributes residing on the Server. Even the recent introduction of "Web.config" style files that are referenced from asp.net based pages still do not cut it.

Authentication code doesn’t need to be written on the client since user credentials (per application, OS, DB combination) can be maintained in the rule book.

 

A DSN can have all its connection attributes server based via the SQL book. The Rule Book in question is then advertised via Rendezvous such that client simply connect to a Rendezvous server with actual connection attributes stored on the server (they are none the wiser and same applies to attackers).

SQL Injections

ditto

Compromise of DBA login details and associated privileges.

Scope DBA privileged access to DB in read/write mode to specific machine(s). For instance a rule can be constructed that only allows full read/write mode if DBA is working from machine alias ‘X” or at IP address ‘x.x.x.x’.

 

Some important points to note about the Session Rules Book:

 

1.     Although it is a text file, you can secure it at the operating system level such that only its creator is able to view it

 

2.     Rules can be built to address any combination of the scenarios above and beyond

 

3.     Rules apply to all data access mechanisms (ODBC, JDBC, ADO.NET, OLEDB), this is due to the generic nature of the multi-tier architecture. You do not get this security feature matrix when using single-tier drivers from OpenLink Software or any other data access driver vendor. You have to be ready to offset perceived “Simplicity or ease of use” against perceived “installation complexity” en route to securing your corporate databases.

 

 

Additional information about the use and configuration of Session Rules Book are available from the following product documentation chapters: