Does an known account name like sa, pose a security threat to database? When using windows authentication on SQL Server does it impose the same password policy(if it was set to say account lockout after 5 times)?
|
A "god" user account with a known name is generally considered a worse idea than a god user with a less well known name. It makes brute force attacks that bit easier as the attacker only has to guess the password and not the username and the password. Also having a god user anyway can be dangerous. You are generally better off having specific users with specific rights for what they need to do. This sort of privilege based security is easier to implement from scratch than it is to retrofit into your environment later. Disabling sa and giving specific users specific admin rights as needed in SQL server is essentially the same recommendation as disabling
When using Windows Integrated Authentication SQL server has no control over account lockouts and such - it just maps a Windows user to an SQL user and asks the OS to vouch for the fact that the user has provided appropriate credentials. For interactive human users this means any lockout would occur as the user attempted to authenticate with Windows, not as they logged in to SQL Server. |
||||
|
|
|
It's not a bad idea to make it so that the default admin user (admin/root/postgres/sa/etc) don't actually exist in your system. You can always create a privileged account under a different name. If nothing else, people trying to exploit your system don't have quite as easy of a time as if they're working blind (eg, sql injection without having some interactive shell nor being able to see direct output from their commands) As for account lockouts -- if someone's managed to get far enough to even be able to attempt to log into your machine, unless you specifically allow direct login from users, you've already lost the battle. Personally, I'm not in favor of lockouts for the most part, because it gives someone the ability to create a denial of service if they manage to get the name of any of your users. (and having them lock out the super user? not fun). I'd recommend looking over the CIS Benchmarks ... they don't have them for every database, but they have recommendations for Oracle, MS SQL, DB2 and MySQL. If you're running something else, it's still worth looking over the general sorts of things they recommend. |
|||
|
|
|
I didn't see anyone else mention this so I'll add it. With SQL Server 2005+ if your server is part of a domain and the domain has a password policy you can enable the password policy to be enforced on SQL logins. This includes password complexity requirements and the ability to force password changes at login. Note that this can at times cause problems with some software installers that haven't been updated to work with SQL 2005+ and create SQL logins with insecure passwords. |
|||
|
|
|
The sa account, when enabled can do anything on the SQL Server. If an attacker were to get into this account they could do anything on the SQL Server instance (and possibly the host OS) that they wanted. |
|||
|
|
|
The SA (and other well known account names) are well known points that hackers can attack. Some of the Oracle ones were poorly documented and thus the default passwords were not always changed. Once you've got control of the SA account in SQL Server, you control the server it is running on and can run any code or install anything you wish. In my more cowboy days, I remember not being allowed (it needed paperwork I wasn't going to fill out) to install an ActiveX control on a webserver that was also hosting the SQL Server - so I used xp_cmdshell to copy and install the control. |
|||||
|