In continuation to my previous post here :
I have been working with several Financial applications, during my current/Past consulting project.
These financial application are bucketed through SQL Server 2000 and 2005.
Making the SQL Server SOX Compliance is a Milestone in itself.
SOX compliance wants to see: your database server is secure and so is the database residing in it, so that it cannot be tampered, by unwanted or invited guests on the Database Server.
I will list some strategies for making a Database Server SOX Compliance and what i have done hands-on with the database server to make them SOX compliant.
- Check to see unnecessary services are not running (services which are not authorized – Disable).
- Check Local Accounts and their rights.
- Check the server Policies.
- Check permissions for all shared folders. (Remove Unwanted Shares – Specially for Everyone)
- Check all Group accounts. Check the Groups and associated members and Types.(Remove unwanted)
- Check user account properties (Account Type/Association with Group/Pass values etc).
- OS Patch information.
Now let us start with the SQL Server related Auditing:
- 1. Check syslogins Tables for unwanted logins (Get Rid of the logins which are not required as this possesses potential risks with users who can gain access through un-authorized manners).
- Regularly change SA password. (30 days or near about)
- Strong Passwords (min 8 characters Long with a combination of Characters and Numbers with symbols)
- Logins and passwords should not be the same.
- Incase of SQL Server 2008 – Use the Built-in Auditing Features. Check Logs at regular intervals.
- Check you have regular backups and those backups are secured offsite.
- Drop all sample Databases from your prod environment.
- Check the Transaction Logs are included in Critical Databases as a backup plan.
- Try to map all logins to description and use and you will come to know the unwanted logins.
- Check permissions to Extended Stored Procedures.
- Check sysusers tables for unwanted users in the database.
- Check for Orphaned Users in the Databases.(Delete the users not required or correct the mappings) I have a script which can help you do this here:
- Logins created since last Audit Or current Year.
- SQL Server Version and Service Pack Information.
- Check Authentication Modes (Windows or SQL or Mixed) – Auditors will ask Questions if Mixed mode.
- Check Guest User Access to all databases (Guest user should be disabled in all Databases).
- Check xp_cmdshell Status and Explain its usage.
- Check Linked Servers and their usage.
- Track Unwanted Server Activity: Monitor Error Logs and have them signed off by your Security Manager on a weekly basis.
- Explain Allow Remote connection to this Server usage.
There is a UTILITY Called DUMPSEC which can be downloaded here: http://www.systemtools.com/download/dumpacl.zip
All the information Gathering at the OS Level can be Done using DUMPSEC Utility, which was originally DUMPACL
Also Microsoft Baseline Security Analyzer is a great place to Start, which will give you more information about windows as well as SQL Server level security conditions and suggestions.
The SQL Server Related information can be done using Custom Scripts, which i will list down for everyone to use.
1. Check syslogins Tables for unwanted logins
select * from sys.syslogins where sysadmin=1 (All logins who are SA on SQL Server. Get Ready to Explain Who Who and Why they need access.)
2. Check Permissions to Extended SP’s
Select sysobjects.name,sysobjects.id,user_name(syspermissions.grantee) as [Granted to]
from master..sysobjects
Join
master..syspermissions
on sysobjects.id=syspermissions.id
Where sysobjects.type=’X’
order by name
These were some of the scenarios, which deals with core Financial Database Auditing,as well as which should be used to secure your production Database Servers.