Home > Articles > Certification > Other IT

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

3.5: Establishing Security Baselines

Before you can recognize abnormal system behavior as a sign of attack, you need to know what normal behavior is. In other words, you need a security baseline. In setting a baseline, it is important to harden or lock down your servers and networks at a level where incursions are less likely to occur. These exercises introduce you to the concepts of operating system, network, and application hardening.

Exercise 3.5.1: Hardening Windows and Unix Operating Systems

Operating system hardening includes locking down files, folders, and applications, as well as the operating system itself. In Chapter 1, you looked at mandatory access control (MAC), discretionary access control (DAC), rule-based access control (RBAC), and role-based access control (also RBAC). Earlier in this chapter, you looked at securing data using EFS. These topics all play a role in the overall picture of hardening the operating system. In this exercise, you look at security baselines in Windows and Unix.

Exercise 3.5.1.1: Microsoft Baseline Security Analyzer

Microsoft provides a tool known as the Microsoft Baseline Security Analyzer (MBSA) that scans Windows-based computers for security vulnerabilities. MBSA scans computers for critical updates and patches and determines the need for further system hardening. In this exercise, you install MBSA and scan your computer for security vulnerabilities. Perform this exercise on a Windows 2000 Professional computer. The steps are the same for Windows XP Professional:

  1. Log on to the computer running Windows 2000 computer as an administrator.

  2. Navigate to http://www.microsoft.com/technet/security/tools/mbsahome.mspx, select the download link, and download the MBSA setup file to your computer.

  3. Double-click the setup file and follow the instructions in the setup wizard that appears. The wizard installs an icon on the desktop.

  4. If you receive a message informing you that you need to install the Microsoft XML Parser version 3.0, follow the link provided to install this parser, and then continue the setup.

  5. Double-click this icon to start MBSA.

  6. On the welcome screen, select the Scan a Computer option to scan your computer.

  7. The Pick a Computer to Scan screen (see Figure 3.14) enables you to select a computer (which is your computer by default) as well as the types of scans that will be performed. Leave all options selected and click Start Scan.

  8. Figure 3.14Figure 3.14 MBSA enables you to select from several types of scans.

  9. MBSA downloads the latest security update information from Microsoft and performs the scan. It displays a security report, as shown in Figure 3.15, which highlights vulnerabilities present on the system.

  10. To obtain information on vulnerabilities, select the Result Details link under the categories of interest. MBSA displays information related to the vulnerabilities present on the system, as shown in Figure 3.16.

  11. To obtain information on correcting problems, select the link labeled How to Correct This. This link connects to the Help and Support Center to display information related to the issue at hand as well as procedures for correcting the problem.

  12. To revisit previously obtained security reports, select the Pick a Security Report to View option from the left side of the MBSA window (refer to Figure 3.15), and then select the report to be viewed from the list that appears.

Figure 3.15Figure 3.15 The MBSA security report provides information on system security vulnerabilities.

Figure 3.16Figure 3.16 A weak password is one type of information that MBSA can display.

CAUTION

Hardening servers and networks involves more than just locating and fixing vulnerabilities using the procedures we have discussed here. You need to pay attention to the general topics we discussed in Chapter 1 as well as physical security recommendations such as locking doors. We discuss physical security in more detail in Chapter 5, "Operational and Organizational Security."

Exercise 3.5.1.2: Security Configuration and Analysis

Another tool provided by Microsoft that analyzes security settings and applies baseline security configurations is the Security Configuration and Analysis (SCA) console. This tool uses a security template to analyze a computer against a predefined level of security and apply the security settings against the computer. These templates are useful because they provide the ability to configure a series of computers with consistent security settings and reapply the settings should a problem arise. The security template is a series of configuration settings that affect items such as the following:

  • Account Policy—Defines settings related to user account logon such as password strength and expiration, lockout of accounts after entering incorrect passwords, and settings related to Kerberos authentication.

  • Local Policy—Defines which types of events will be audited; which groups are granted which rights on the system; and additional security options, such as the use of digital signing and encryption, the display of legal messages, the installation of unsigned drivers, the use of smart cards, and so on.

  • Event Log—Defines settings related to the size of and access to security logs as well as their retention methods.

  • Restricted Groups—Defines the membership of groups that have the capability to administer the system.

  • System Services—Defines whether certain services running on the system are started, stopped, or disabled (prevented from starting). We discussed the disabling of unnecessary services in Chapter 1.

  • Registry—Defines access permissions placed on portions of the system Registry.

  • File System—Defines access permissions placed on files and folders.

NOTE

Security templates available in Windows XP Professional and Windows Server 2003 include additional security settings such as wireless network policies, public-key policies related to EFS, and trusted root certification authorities.

In this exercise, you use SCA to analyze the baseline security settings and apply a security template to a computer running Windows 2000 Professional. You can also do this exercise on a computer running Windows XP Professional:

  1. Log on to the computer running Windows 2000 as an administrator.

  2. Click Start, Run; type mmc; and press Enter. This opens a blank Microsoft Management Console (MMC).

  3. Click Console, Add/Remove Snap-in to open the Add/Remove Snap-in dialog box.

  4. Click Add, select the Security Configuration and Analysis snap-in, click Add, and then click Close.

  5. Click OK. The Security Configuration and Analysis snap-in is added to the blank console.

  6. Click Console, Save As; type a descriptive name such as Security.msc; and then click Save. The console is saved in the Administrative Tools folder unless you select another location such as the desktop.

  7. To analyze your computer's security settings, you need to create a database. Right-click Security Configuration and Analysis and choose Open Database. Type a name for the database (such as Test1) and then click Open.

  8. Select a template from the Import Template dialog box that opens (see Figure 3.17). A good template to use is the securews.inf template, which applies secure settings to a workstation computer. Click Open.

  9. Figure 3.17Figure 3.17 To configure a security database in SCA, you need to import a template from those in the template database.

  10. To analyze the computer's security settings, right-click Security Configuration and Analysis and choose Analyze Computer Now. Click OK to accept the log file path.

  11. The configuration settings are compared against the settings in the security database, and a series of nodes appears in the left pane. To compare the computer settings against those in the database, expand the desired nodes and select the appropriate policy. As shown in Figure 3.18, the settings in a series of policies appear in the right pane. A green check mark indicates that the computer's security settings meet the standard defined by the database, whereas a red X indicates a setting that differs from that in the database.

  12. Figure 3.18Figure 3.18 SCA indicates policies whose settings differ from those in the template with a red "X."

    NOTE

    A red X could indicate a security setting that is actually more secure than that of the database, as well as the more usual security weakness.

  13. Select the various nodes in turn and note how the settings differ from those in the database.

  14. To configure the computer with the database settings, right-click Security Configuration and Analysis and choose Configure Computer Now. Click OK to accept the log file path.

  15. Repeat Steps 9 to 11 and notice that the security settings defined by the database have been applied.

  16. When you are finished, close the console. Click No if you are asked whether to save your settings.

Exercise 3.5.1.3: Developing a System Hardening Checklist

The process of hardening an operating system is little more than reducing the number of vulnerabilities that could allow the system to be compromised. Although every system is unique, you should employ certain strategies for all computers.

This exercise directs you to research general Windows and Unix/Linux hardening strategies and start developing a simple hardening checklist:

  1. From a Web browser, navigate to http://www.sans.org/top20/. This Web page presents the SANS/FBI 20 Most Critical Internet Security Vulnerabilities list. The list actually contains the top-10 vulnerabilities each for Windows and Unix. It is a great place to start hardening your operating system.

  2. Continue to http://staff.washington.edu/dittrich/R870/security-checklist.html and choose several hardening steps from the top of the Unix Security Checklist. Because you can choose from so many options, pick five checklist items from the Account Security section.

  3. Continue to http://labmice.techtarget.com/articles/securingwin2000.htm and choose several hardening steps from the Windows 2000 Security Checklist. Pick the top-five checklist items. Note that the top items on the list deal with account security:

    • Do any of the checklist items exist in both operating systems?

    • Why are account issues near the top of most security checklists?

    • Which of the checklist items should be easiest to address?

  4. Develop a hardening checklist of at least five items you would address for Windows, based on the information you have found. Provide details for each checklist item. For example, one common checklist item suggests that you disable any unneeded protocols and services.

  5. NOTE

    Although you already have one checklist item, choose several common services that make sense to disable. See whether you can document 10 services. (Refer to Chapter 1 if necessary.) You might need to do more searching.

  6. Arrange your security checklist in priority order. Which item should be addressed first? Explain why you chose each item's priority.

  7. Add a section to your security checklist that discusses recurring actions. What steps must you take periodically to keep a system secure?

  8. Complete your sample operating system hardening checklist by adding a brief discussion of items you have chosen not to include. For example, if your system resides behind several firewalls, you might choose not to implement a firewall on your server. What else would you not implement and why?

Exercise 3.5.2: Hardening a Network

Much of the activity involved in network hardening involves actions that we have already examined. These include configuring access control lists (ACLs) on sensitive files and folders, configuring router access policies, disabling unnecessary services, and configuring auditing, all of which we discussed in Chapter 1, and configuring remote access and VPN access, specifying IPSec policies, securing Web and FTP servers, and configuring wireless network security, all of which we discussed in Chapter 2.

Another part of hardening a network is knowing what is out there that might cause a problem. In Chapter 1, we looked at port scanning tools such as Nmap, which you can use to scan networks for open ports that intruders might use to initiate an attack. Another component of network hardening is the removal of services (including disabling of NetBIOS over TCP/IP), which we discussed in Chapter 1.

In Exercise 3.5.1.2, we looked at using SCA to harden a computer by applying a security template. In this exercise, we harden a Windows-based network by applying the security template to the network in Group Policy. Perform this exercise from a computer running Windows 2000 Server configured as a domain controller:

  1. Log on to the server as an administrator.

  2. Click Start, Programs, Administrative Tools, Active Directory Users and Computers.

  3. Expand the left pane of Active Directory Users and Computers to locate the domain or organizational unit (OU) to which the computers in the network you want to harden belong.

  4. Right-click this domain or OU and choose Properties.

  5. On the Group Policy tab of the Properties dialog box that opens, select the desired Group Policy object (GPO) and click Edit to open the Group Policy console.

  6. Navigate to the Computer Configuration\Windows Settings\Security Settings node.

  7. Right-click this node and choose Import Policy.

  8. From the dialog box shown in Figure 3.19, select the template you want to apply, and then click Open.

  9. Figure 3.19Figure 3.19 You can apply a security template in Group Policy.

  10. This action applies the security settings in the template. To check their application, expand the Security Settings node, select the required subnodes, and verify the settings displayed in the right pane.

Exercise 3.5.3: Securing and Hardening Application Servers

The average network runs many types of servers, including Web servers, email servers, FTP servers, DHCP servers, DNS servers, NNTP servers, file and print servers, and database servers. Default installations of these servers are more often set up for convenience rather than security, so it is important that you secure these servers to the level that is appropriate to the services they provide.

MBSA analyzes components of various server applications as part of its installation. In this exercise, you run MBSA on a server configured with one or more of the applications mentioned here and note the results. Perform this exercise on a computer running Windows 2000 Server. The steps are similar in Windows Server 2003:

NOTE

Performing this exercise on a computer running a default version of Windows 2000 Server with a few services such as Internet Information Services (IIS) will yield more security vulnerabilities than it will on Windows Server 2003. Microsoft has hardened the default settings of server applications considerably with the new server release.

  1. Log on to the server as an administrator.

  2. If you are working at a test server (which you should be for this type of exercise), you might want to install additional services such as the FTP, SMTP, and NNTP components of IIS and a DHCP server.

  3. Use the procedure of Exercise 3.5.1.1 to install and run MBSA on the server.

  4. Scroll the security report to note the vulnerabilities and obtain information on correcting them. For example, a default installation of IIS 5.0 on Windows 2000 yields the vulnerabilities shown in Figure 3.20.

Figure 3.20Figure 3.20 MBSA reports several vulnerabilities in the default installation of IIS 5.0 on a computer running Windows 2000 Server.

CAUTION

Application servers hosting specific applications such as email need additional hardening actions. For example, you need to prevent email servers from being used as open relays. You might encounter questions with respect to specific application servers on the Security+ exam. For more information on hardening specific application servers, refer to the Exam Cram 2 or Training Guide books in the "Need to Know More?" section.

Exercise 3.5.4: Securing Data Repositories and Databases

Databases present a special security challenge because users and customers must have the proper level of access for the purpose to which the database has been built, but at the same time you are preventing all types of unauthorized access. In this exercise, you take a look at some of the problems facing administrators of databases running on Microsoft SQL servers:

  1. From a Web browser, connect to the Internet and navigate to http://www.sql-server-performance.com/vk_sql_security.asp. The author, Vyas Kondreddi, provides a comprehensive review of SQL Server security. Locate answers to the following questions:

    • What types of authentication does an SQL database accept, and what recommendation is suggested for improving login security?

    • What three roles does SQL Server use for controlling access to objects within the database, and how are these roles used in assigning permissions?

    • In what way do the best practices suggested by Kondreddi correspond to general recommendations suggested by Microsoft for controlling access by users to regular files and folders?

    • What recommendation does Kondreddi make with regard to the default system administrator (sa) account?

    • Note that security recommendations are in many cases similar to those for securing other servers. What additional precaution is available with regard to backups of SQL Server databases?

  2. SQL Server has been the target of several worms, most notably the Slammer worm that struck in 2003. Go to http://www.microsoft.com/sql/techinfo/administration/2000/security/securingsqlserver.asp. What are the 10 steps that they recommend for hardening the SQL server? Summarize the types of vulnerabilities that each step is designed to help protect against.

  3. Marcin Policht has produced a series of articles on SQL security for Database Journal. Navigate to http://www.databasejournal.com/features/mssql/article.php/3334851 for the first article. Note the use of net libraries by SQL Server and the need to balance performance and security concerns. What means can you employ in SQL Server 2000 to encrypt net libraries?

  4. Continue to Policht's second article at http://www.databasejournal.com/features/mssql/article.php/3341651. He discusses the need for secure authentication methods, again emphasizing the two authentication modes and the need for securing the sa account password. What are several advantages of operating the SQL server in an Active Directory domain environment? What is impersonation, and how is it used on SQL Server? Summarize the uses and drawbacks of the delegation process.

  5. Continue to Policht's third article at http://databasejournal.com/features/mssql/article.php/3349561. Note the services associated with SQL Server. What recommendations does Policht make with regard to these services? Why should you not use the Local System Account when configuring these services?

  6. The second segment of Policht's third article, found at http://databasejournal.com/features/mssql/article.php/10894_3349561_2, continues the discussion of accounts used by services. Why should you use a newly created user account for SQL Server Agent Services? What user rights and permissions do you need to assign to this account? Note that you should not add this account to a privileged group such as Administrators or Power Users unless certain actions need to be performed, as detailed in this article.

  7. Policht's fourth article, found at http://databasejournal.com/features/mssql/article.php/3357861, discusses authorization, which determines the level of privileges granted to accounts accessing the databases and objects in SQL Server. What are server roles used for? Name the most important server roles and describe the capabilities granted to these roles. Describe some of the factors that determine what access rights are granted to each database. What are the two types of database roles, and what do the default roles provide? Note that you can define your own custom database roles.

  8. Policht's fifth article, found at http://www.databasejournal.com/features/mssql/article.php/3363521, defines application roles in SQL Server. How do application roles differ from the database roles discussed in the previous article? Summarize his recommendations regarding the use and management of database roles and application roles.

  9. Policht's sixth article, found at http://databasejournal.com/features/mssql/article.php/3370701, focuses on ownership and object permissions. What are two main factors that help determine the access to objects in SQL Server? Note that ownership of a database object confers a set of rights and permissions. How are these similar to the case of NTFS folders and files? What is ownership chaining, when does it take place, and what potential vulnerability can it introduce?

  10. Those of you involved with Oracle database servers should go to http://www.petefinnigan.com/orasec.htm and peruse the links to a large number of papers related to Oracle database security.

What Did I Just Learn?

Now that you have looked at system, network, and database hardening, let's take a moment to review all the critical items you've experienced in this lab:

  • Microsoft provides MBSA and SCA, both of which you can use to analyze computers on a network for security vulnerabilities.

  • You can use SCA to configure a fixed set of security parameters on an individual computer or import these settings to a GPO for configuring a series of computers on a network.

  • Various application servers might present additional vulnerabilities. You can use MBSA to locate these vulnerabilities and obtain recommendations for fixing them.

  • Databases such as SQL Server present specific vulnerabilities, some of which have been exploited by worms such as SQL Slammer. You need to follow both general and specific recommendations for hardening database servers.

  • + Share This
  • 🔖 Save To Your Account