Best Practices For Database Security
Best Practices For Database Security
Database Security
Best Practices for Database Security
Databases are a treasure trove of data, often highly sensitive data, and not
surprisingly are an important area of emphasis for compliance programs.
Almost all enterprise compliance regulations feature requirements
concerning who can access what database and when, and managing these
permissions can easily be a full-time job. In this article, we’ll cover the basic
database security requirements necessary for database compliance with
major regulations such as PCI DSS and HIPAA, as well as best practices for
managing database permissions and upkeep in order to maintain compliance
with those regulations.
All five of the most common enterprise core database environments (1.
Microsoft SQL Server; 2. IBM DB2; 3. MySQL; 4. Oracle; 5. Postgres) have
the ability to be appropriately provisioned, hardened, secured and locked
down when conducting an initial installation. The challenge is understanding
the important components that actually need to be in place. It's not just the
database itself; it’s the server the operating system and the database reside
on.
PCI DSS currently requires the following explicit controls for databases:
Page 2 of 12 Sponsored by
Best Practices for Database Security
All user access to any databases, user queries and user actions
(such as move, copy and delete) are done so through programmatic
methods only (such as stored procedures).
Contents
Database and application configuration settings restrict only direct
Best Practices for
Enterprise Database user access or queries to database administrators (DBA).
Compliance
For database applications and the related application IDs, application
Database Monitoring
IDs can only be used by the applications, not by individual users or
Best Practices: Using
DAM Tools other processes.
Regarding the host operating system on the server that supports the
database, the following best practices should be in place:
Page 3 of 12 Sponsored by
Best Practices for Database Security
Database Monitoring
3. Only necessary and secure services, protocols, daemons and other
Best Practices: Using
DAM Tools essential functions should be enabled on the operating systems.
8. The principle of "least privilege," which states users are only given
privileges that are required to efficiently and properly perform their
job function, should be in place regarding operating system access
rights.
For the actual database itself, the following best practices are recommended:
Page 4 of 12 Sponsored by
Best Practices for Database Security
5. For all user default accounts that remain in use, passwords should
have been effectively changed to invoke strong password measures.
10. All relevant and critical security patches should be applied to the
databases as warranted.
Thus, companies should first and foremost have an IT staff that is well-
trained, knowledgeable in database security, and has the necessary
provisioning guidelines and hardening documents for implementing effective
database security. For all existing database platforms in place and for future
Page 5 of 12 Sponsored by
Best Practices for Database Security
There are few IT security challenges more difficult than protecting databases
and the data they store, especially from the most common database and
Web application attack: SQL injection. Even though relational database
management system (RDBMS) vendors, IT security professionals and
application developers are all aware of these attacks, they remain a problem
because the attacks are difficult to detect and stop without compromising
business operations.
What's more, SQL injection is one of many common avenues of assault that
allows attackers to take complete control of a relational database. The
Page 6 of 12 Sponsored by
Best Practices for Database Security
Page 7 of 12 Sponsored by
Best Practices for Database Security
Agents installed on the database platform are common because they capture
all SQL activity, which is desirable for understanding if a query was intended
to be malicious without compromising database performance.
Native audit features collect events, but don't always gather the original SQL
queries, and cost a great deal more in terms of performance overhead.
Network collectors offer a quick and easy way to collect a majority of SQL
activity, but miss some transactions and activity performed by administrators
working at the console.
Agents are the de facto deployment for security of critical databases. Native
auditing for compliance and network monitoring of non-critical databases is
common, but used more in special cases.
Page 8 of 12 Sponsored by
Best Practices for Database Security
Database Monitoring Most policies are enforced by examining attributes of the database query:
Best Practices: Using
whom the user is; what columns the user is viewing; what application they
DAM Tools
are using; how much data did they touch; and time of day are all commonly
used to define security policies. You assign an arbitrary value to each of
these attributes, and the monitoring system will generate alerts when the
user exceeds the defined threshold. For example, you may want to alert on
all queries after midnight, or after 3 failed login attempts, or any time
someone accesses credit card data.
Advanced monitoring
Database activity monitoring systems have greatly advanced their
capabilities in the last couple of years. What used to be purely monitoring
and altering now provides a reliable method of blocking attacks and actively
resisting misuse. The advanced features you should find with most DAM
products include:
But advanced analysis means advanced policies that are specific to your
environment, and these don't come from your vendor. In order to detect and
block SQL injection attacks, you need to define legitimate SQL queries you
wish to allow from the application. If you can't implement a database patch in
a timely fashion, you need to write a policy to detect the attack and deploy
DAM to block the threat. Hopefully, your DAM vendor will help with these
policies if your database vendor does not.
Page 9 of 12 Sponsored by
Best Practices for Database Security
Deploying DAM
There are several operational aspects to managing DAM platforms that you
want to employ from the outset to save yourself time and trouble in the long
run. These include:
Separation of duties: Both for security and compliance reasons, the people
who write policies and review the reports should not be the database
administrators that manage the monitored databases. Similarly, a DBA for
one group should not be allowed to use DAM tools to peer into other groups
of databases. The idea is to provide checks and balances to detect fraud, so
divide up roles and responsibilities within the DAM product.
Page 10 of 12 Sponsored by
Best Practices for Database Security
Page 11 of 12 Sponsored by
Best Practices for Database Security
Page 12 of 12 Sponsored by