Implementing Best Practices
Basic Hygiene
-
Send administrative-related activity logs to a centralized logging system.
-
Log all network traffic, both accepted and dropped.
-
Alert on the following conditions:
-
Failed and successful logins.
-
Changes in roles and assigned privileges.
-
Configuration changes.
-
Software installation and deletion.
-
System or native database errors and alerts.
-
-
Only allow connections from trusted sources.
-
Disable external administrative access.
-
Disable default network ports.
-
Users and systems (e.g., applications) should have the least privileges necessary to perform their job functions or tasks.
-
Schemas should be limited to function with a minimum set of information.
-
-
Restrict administrative privileges to authorized users (such as DBA’s Systems administrations, Application administrators).
-
Conduct regular audits of privileges.
-
Place database servers in a dedicated segment apart from applications and other services.
-
Patching:
-
Install the latest operating system patches.
-
Install the latest database security and stability updates.
-
-
Utilize separate database servers.
-
Do not Install databases on the same system the application runs on.
-
-
Utilize encryption.
-
If available, utilize encryption of all data held within the database.
-
-
Create regular backups.
-
Back up databases regularly and schedule testing of these backups often.
-
Store backups separately, even physically separated, from the database when possible.
-
Restrict authorization to backup, access, and restore data to a smaller or different set of users than regular database users.
-
Patch the host operating system regularly.
-
-
Secure default accounts.
-
Remove default accounts, if possible.
-
Disable any default accounts if removing them is not an option.
-
Set a random, complex password that is not shared among users if removing or disabling default accounts is impossible.
-
Advanced Hygiene
-
Implement alerts from security controls, local firewall, EDR, and anti-malware.
-
Log queries, including user identity and size of results. 1.Alert on:
-
First-time access by a user to a database.
-
Large query results.
-
Creation or destruction by users.
-
-
Implement application control on database servers preventing unnecessary applications from executing.
-
Only allow connections over a local socket.
-
Disable TCP access.
-
-
Place the database in a separate isolated environment.
-
Ensure databases are not in the same network segment as application servers, ideally in a network segment only for databases.
-
-
Separate DEV & UAT environments from production.
-
Do not share accounts between environments.
-
Do not store production data in development & UAT environments.
-
-
Do not use built-in database accounts like root, SA, or SYS.
-
Lock database administration accounts down to local-only access.
-
Store transaction logs on a separate disk.
-
Create backups
-
Ensure that backups are encrypted.
-
Ensure backups have appropriate permissions assigned.
-
-
Invest in FIM (File Integrity Monitoring)
Resilient Operations
-
Implement behavior analytics with alerting for:
-
Successive or simultaneous logins from physically distant geographies.
-
Source IP addresses used to access databases.
-
Source ISPs for remote user access.
-
Queries issued by users.
-
Amount of data returned by queries per user.
-
-
For administrative users, use more sensitive alerting for behavior analysis.
-
Only allow connections from encrypted sources.
-
Configure the database to bind on localhost.
-
Implement an application layer firewall allowing the minimal set of operations required for normal use.
-
Utilize granular access controls for table, column, and row access.
-
Place each database server in a dedicated segment with filtering capabilities.
-
Segment data within databases. For example, partitioning data based on user or customer accounts prevents accidental data leakage or cross-pollination.
-
Ensure change management procedures are well documented and followed.
-
Utilize encryption key management systems to ensure the regular rotation of encryption keys