MS SQL Server security configuration

xiaoxiao2021-03-06  42

SQL Server 2000 Security Prior to performing the security configuration of the SQL Server 2000 database, first you have to securely configure the operating system to ensure your operating system is safe. Then, the necessary security audit you want to use, such as the scripts such as ASP, PHP, this is a safe riscriminally imposed security hazard based on the database-based web application, and the script is mainly a filter problem, it needs to filter Some similar, '; @ / and other characters to prevent destroyers from constructing malicious SQL statements. Then, after installing the SQL Server 2000, please play the latest patch (MS SQL 2005 B1 version already downloaded, but this does not affect the content related to security configuration)

SP3A.

1. Use a secure password policy

SQL Server 2000 Security Prior to performing the security configuration of the SQL Server 2000 database, first you have to securely configure the operating system to ensure your operating system is safe. Then, the necessary security audit you want to use, such as the scripts such as ASP, PHP, this is a safe riscriminally imposed security hazard based on the database-based web application, and the script is mainly a filter problem, it needs to filter Some similar, '; @ / and other characters to prevent destroyers from constructing malicious SQL statements. Then, after installing the SQL Server 2000, please play the latest patch (MS SQL 2005 B1 version already downloaded, but this does not affect the content related to security configuration)

SP3A.

1. Use a secure password policy

We put the password strategy in the first step in all security configurations. Please note that many database accounts are too simple, which is too simple to follow the system password. For SA, you should pay more, do not let the SA account password written in the application or script. The robust password is the first step! When SQL Server2000 is installed, if you use a mixed mode, you need to enter the password of the SA, unless you confirm that you must use an empty password. This has been improved than previous versions. At the same time, develop a good habit of regularly modify the password. Database administrators should regularly check if there is an account that does not meet the password requirements.

For example, use the following SQL statement:

Use master

Select Name, Password from syslogins where password is null

2. Use a secure account policy

Since SQL Server does not change the SA user name, we cannot delete this super user, so we must make the strongest protection for this account, of course, including using a very strong password, it is best not to use the SA account in the database application, SA is only used if there is no other method to log in to the SQL Server instance (for example, when other system administrators are not available or forgotten). It is recommended that the database administrator has newly established a super user with the SA-only authority to manage the database. A secure account policy also includes not to let the accounts of the administrator privilege.

SQL Server's authentication mode has two types of Windows authentication and mixed identity authentication. If the database administrator does not want the operating system administrator to contact the database through the operating system, you can delete the system account "Builtin / Administrators" in the account management. However, the result of this is that once the SA account forgot the password, there is no way to recover. Many hosts use database applications just to do simple features such as queries, modifications, and assign accounts according to actual needs, and give only privileges that can meet application requirements and needs. For example, as long as the query function, you can use a simple public account to select it.

3, strengthen the record of database logs

Review the "failure and success" of the database login event, select "Security" in the instance properties, select the audit level as all, so in the database system and the operating system log, all account login events have been recorded in detail. . Please check the SQL Server log regularly whether there is a suspicious login event, or use the dos command. FINDSTR / C: "Login" D: / Microsoft SQL Server / MSSQL / LOG / *.* 4, Manage Extension Storage Procedures

Big surgery for the stored procedure, and the account call to the extension stored procedure should be cautious. In fact, how many system stored processes are not used in most applications, and so many system stored procedures for SQL Server are only used to adapt to the user needs, so please delete unnecessary stored procedures, because some system stored processes can be very It is easy to use to improve permissions or destruction. If you don't need to extend the stored procedure xp_cmdshell, please remove it. Use this SQL statement:

Use master

sp_dropextendedProc 'XP_cmdshell'

XP_cmdshell is the best shortcut to enter the operating system, which is a large back door to the operating system. If you need this stored procedure, please use this statement to recover.

sp_addextendedProc 'XP_cmdshell', 'XPSQL70.DLL'

If you don't need to discard the OLE auto stored procedure (will cause certain features in the manager to not be used),

These processes include the following:

SP_OACREATE SP_OADESTROY SP_OAGETERRORINFO SP_OAGETPROPERTY

SP_OAMETHOD SP_OASETPROPERTY SP_OASTOP

Remove the stored procedures for unwanted registry access, the registry stored procedure can even read the password of the operating system administrator, as follows:

XP_REGADDMULTISTRING XP_REGDELETEKEY XP_REGDELETE

Value

XP_REGENUM

VALUES XP_REGREAD XP_REGREMOVEMULTISTRING

XP_Regwrite

There are some other extension stored procedures, you also check the inspection. When processing stored procedures, please make sure to avoid harm to databases or applications.

5, use protocol encryption

The Tabular Data Stream protocol used by SQL Server 2000 for network data exchange. If not encrypted, all network transfers are clear, including passwords, database content, etc., which is a big security threat. Can be intercepted to what they need in the network, including database accounts and passwords. Therefore, in the case of the conditions, it is best to use SSL to encrypt the protocol, of course, you need a certificate to support.

6, don't let people detect your TCP / IP port

By default, SQL Server uses a 1433 port to listen, many people say that when SQL Server is configured, this port is changed, so others can't easily know what port used. Unfortunately, UDP probes that Microsoft unapproved 1434 ports can easily know what TCP / IP ports used by SQL Server. However, Microsoft still considers this problem. After all, open and open port will cause unnecessary trouble. Select the properties of the TCP / IP protocol in the instance properties. Select hide the SQL Server instance. If the SQL Server instance is hidden, the broadcast will be prohibited from responding to the broadcast of the client on which the existing SQL Server instance on the network is hidden. In this way, others cannot use 1434 to detect your TCP / IP port (unless PORT SCAN).

7. Modify the port used by TCP / IP Please change the original 1433 port on the basis of the previous configuration. In the instance properties, select the properties of the TCP / IP protocol in the network configuration, turn the default ports used by TCP / IP to other ports.

9, refuse to detect from the 1434 port

Since the 1434 port detection is not limited, some database information can be detected by others, and may also be increased by the DOS attack to increase the CPU load of the database server, so the UDP of the Windows 2000 operating system, IPSec filtering the UDP of the 1434 port Communication, you can hide your SQL Server as much as possible.

10. IP limitations for network connections

The SQL Server 2000 database system itself does not provide a security solution for network connections, but Windows 2000 provides such a security mechanism. Use the operating system's own IPSec to implement the security of the IP packet. Please limit the IP connection, only guarantee your IP to access, and reject port connections to other IPs, which effectively controls security threats from the network. For the use of IPsec, please see:

http://www.microsoft.com/china/technet/security/ipsecloc.asp

Some SQL Server's security configurations are mainly introduced above, and the SQL Server itself has sufficient security capabilities. Of course, it is more important to strengthen internal security control and administrators' security training, and security issues are a long-term settlement process, and more security maintenance is required.

转载请注明原文地址:https://www.9cbs.com/read-77663.html

New Post(0)